Skip to content

Installing Couchdogs

Needs a Linux host with Docker Compose and a GPU. With a TV on that GPU over HDMI or DisplayPort (AMD, Intel or NVIDIA; NVIDIA needs the NVIDIA Container Toolkit, see host-setup.md) it is the box under the TV. With no TV it is a household that every Moonlight client reaches: ./couchdogs setup finds no output, says so, and sets the install up without one (ADR 0032).

Install folder

An install is one folder anywhere, holding compose.yml, .env, couchdogs, data/ and library/. Images come from ghcr.io (ghcr.io/citizenjc/couchdogs-<x>:latest); nothing is built.

curl -fsSL https://raw.githubusercontent.com/citizenjc/couchdogs/main/install.sh | DRY=0 bash -s -- ~/couchdogs

Without DRY=0 it only prints the plan. It downloads compose.yml, compose.nvidia.yml, compose.no-tv.yml, .env.example and couchdogs into the folder and runs ./couchdogs setup. COUCHDOGS_REF=v1.2.0 takes a release: its images are pinned (IMAGE_TAG=1.2.0). By hand: save those five files (stack/compose.yml, stack/compose.nvidia.yml, stack/compose.no-tv.yml, stack/.env.example, couchdogs), chmod +x couchdogs, run ./couchdogs setup. The script and the pulls need the repository and its packages to be public; CI publishes the images when a v* tag is pushed (docs/releasing.md). Then docker compose up -d in the folder (moving from Wolf? set WOLF_DIR and run import-wolf first, see Moving from Wolf). Update with docker compose pull && docker compose up -d --remove-orphans (it stops containers of services that no longer exist, such as an older install's Wolf). An install made before TV existed keeps its TV on update with nothing to do; to set one up without a TV, save compose.no-tv.yml beside compose.yml first, then run setup.

./couchdogs setup finds the GPU, its HDMI sound and the TV's resolution, asks for two folders, writes .env and creates the folders. On a TV above 1080p it measures the encoder at the TV's size once and picks that size or 1080p; Settings > Resolution on the TV changes it later. With no output connected it says "No TV found", asks once, writes TV=off and picks the GPU by its render node instead: device screens and the encoder need a GPU, not a TV, and the TV's own settings (TV_RESOLUTION, TV_FPS, TV_KMS_CONNECTOR_NAME, SOUND_CARD) keep their defaults so turning a TV on later is setup again.

<install folder>/
  compose.yml  compose.nvidia.yml  compose.no-tv.yml  .env  couchdogs
  data/                  DATA_DIR: everything Couchdogs keeps
    apps/<app id>/       each app's settings and saves (es-de, plex, jellyfin, steam, vacuumtube)
    server/              pairing: certificate, key, paired devices (mode 0700)
    runner/              the sign-in code's key, household settings, the verified store
  library/               LIBRARY_DIR: yours, mostly read-only for the apps
    roms/  bios/  media/  games/

Back up DATA_DIR and you have every pairing, setting and save. Move any folder with DATA_DIR, LIBRARY_DIR or a per-folder override (ROMS_DIR, BIOS_DIR, MEDIA_DIR, GAMES_DIR), or leave a symlink in its place. A symlinked per-system folder inside roms is mounted by its target. Docker never creates these folders for an app (it would make them root-owned): setup makes them (run as root, it gives a games folder it creates to uid 1000, the app user, so Steam can install there), and a container whose folder is missing stops with a message naming it. Apps get library folders as Docker mounts that refuse a missing folder: a missing optional one (media, games) is left out with a log line, a missing required one (BIOS for ES-DE) stops the launch naming the setting, and a ROM system whose link points nowhere is left out so the other systems still play. The runner's own read-only views (LIBRARY_DIR and its roms) are plain Docker binds, so if the library share is not mounted when the stack starts they can appear as empty folders; mount the share first. Every variable is in stack/.env.example. Rebuildable state (Docker's client config, the store's base-image cache) is in the volume couchdogs-runner-cache, not in DATA_DIR.

From a clone

  1. git clone this repo on the host.
  2. ./couchdogs setup (writes stack/.env, data and library default to stack/data and stack/library).
  3. Build the images with a capped buildx builder (stack/images/README.md) and set IMAGE_PREFIX=, IMAGE_TAG=local and COMPOSE_FILE=compose.yml:compose.build.yml in stack/.env so up finds them. up never builds: a missing image stops it with an error. After updating, rebuild the images whose folders changed.
  4. cd stack && docker compose up -d --remove-orphans.

After the first start

  1. With a TV, Gamescope takes it and the home screen comes up on it; our server answers remote Moonlight devices (docs/architecture.md). With no TV (TV=off) those two services are not in the stack at all: every home is a remote device's own, and the first device that connects meets the first-run wizard.
  2. Pair a remote Moonlight device (phone, handheld): add the host in Moonlight. The TV's home screen shows a "Pair ?" card; type the PIN the device shows with the pad (Up/Down change a digit, Left/Right move, A sends). Without a TV, run ./couchdogs pair on the host: it lists the devices waiting and asks for the PIN (or ./couchdogs pair 1234, or ./couchdogs pair ID 1234 when several wait).
  3. Sign in to the LAN page (pairing and the store from a phone or laptop) with a six-digit code: open Settings on any Couchdogs screen and pick Sign-in code, or with no screen at all run ./couchdogs code on the host. The code changes every minute and only works while a screen (or that command) shows one. The page is at http://<host address>:8970 (WEB_PORT in .env) and uses plain HTTP on the LAN (ADR 0022, ADR 0031).
  4. A phone, tablet, laptop, handheld or TV box opens straight into its Couchdogs home with the Couchdogs client (Windows, macOS, Linux, Android): it finds this machine on the LAN, pairs with the PIN the TV shows, and connects by itself on every start. One install per device; stock Moonlight from moonlight-stream.org keeps working beside it and reaches other hosts. The LAN page's Get the app card links the client's builds.
  5. A remote, keyboard or mouse: pair it in Settings, Bluetooth (with nothing connected yet, a remote or pad in pairing mode pairs by itself within a few seconds), or plug it into the host. Its keys reach the app in front, its volume keys change the box's sound, and a number pad types letters by multi-tap (ADR 0038). A phone can type into any screen from the LAN page's Type box. With a remote that has a mic button, open an app's search box, press the mic, and speak: the words are typed into it. Settings > Voice languages picks what it listens for.

Remotes

There is no HDMI-CEC: the TV's own power, volume and input come from a remote that learns the TV's IR codes. A BOXPUT BPR3S (Bluetooth, with a number pad) is the suggested remote: its Power, Volume and Input keys send IR, the rest goes over Bluetooth. IR learning copies NEC remotes reliably; Samsung and LG are known to work only on those four keys, and other brands are not confirmed, so check that learning works within the return window. The cheapest option, an MX3 air mouse, needs a 2.4 GHz USB dongle (no Bluetooth) and is built less well.

Moving from Wolf

Wolf itself is not part of the stack. Two steps, both optional and both copy only. Do both before the first docker compose up: a server that starts without WOLF_DIR makes its own identity, and Wolf's devices would need a new PIN.

  • Pairings: set WOLF_DIR in .env to Wolf's data folder. On its first start the server imports Wolf's certificate, key and pairings from its cfg/ folder, once, so devices paired with Wolf keep working without a new PIN; it never replaces an identity devices have already paired with.
  • App profiles (ES-DE and Steam settings and saves from Wolf UI's user profile): ./couchdogs import-wolf <Wolf data folder>. It is a dry run that lists what it would copy, skip and leave behind (other profiles are listed as not copied); add DRY=0 to copy WolfES-DE to data/apps/es-de and WolfSteam to data/apps/steam. It never merges or deletes: an app folder that already has files is skipped, a copy goes through data/apps/.<id>.importing (left behind if it fails; remove it and run again), and it refuses while an app is running. An app folder that holds only empty folders (an app's first start) is replaced. Steam's installed games (steamapps) are not copied: the output names the folder to set as GAMES_DIR, or move them into LIBRARY_DIR/games. Crash dumps (core, core.<pid>) at the top of a profile are not copied either (one can be tens of GB); the output names them so you can delete them. Sockets and named pipes (Steam's steam.pipe) are skipped. If the server already has state while Wolf has paired devices, pairing is skipped and the output says how to import them: docker compose stop server, move server/ in DATA_DIR aside by hand, run import-wolf again (it never moves or deletes it itself).

An ES-DE profile from Wolf's image may carry custom find rules pointing at that image's /Applications/*.AppImage emulators; ES-DE then reports "emulator not found". The ES-DE hook sets such a file aside (es_find_rules.xml.before-couchdogs) so ES-DE finds the emulators our image ships.

Recommended host settings are in host-setup.md.