Install Docker
Time: about 15 minutes · You’ll need: admin rights on your machine
Companion Hub runs every app as a Docker container. Install Docker, verify that it works, and learn how Hub uses it so you know where to look if a problem occurs.
If you already run Docker, skip to Check what you have.
The page in one picture — whichever route you take, the same three checks at the end tell you Docker is ready:
flowchart TD
A["docker --version"] -->|"prints a version"| V["Verify it works"]
A -->|"command not found"| B{"Which machine?"}
B -->|"macOS, Windows,<br/>Linux desktop"| C["Install Docker Desktop"]
B -->|"Linux server<br/>or VPS"| D["Install Docker Engine<br/>get.docker.com"]
C --> V
D --> E["usermod -aG docker,<br/>then log out and in"]
E --> V
V --> V1["docker info"]
V1 --> V2["docker run --rm hello-world"]
V2 --> V3["docker compose version"]
V3 --> N["Next: Install Ollama"]You don’t need to understand Docker to use Companion Hub. You do need it installed and running. This page gets you there; Docker & Companion Hub explains the concepts afterwards.
Check what you have
Run this first — if Docker is already installed, you can skip most of this page:
docker --versionIf it works, you’ll see something like:
Docker version 29.8.0, build 88096efIf you see command not found, continue to installation below.
Hub needs Docker Compose 2.33 or newer, and recommends Docker Engine 28 or
newer. Before it starts the stack, Hub reads both versions. On an older
Compose it stops and says Companion Hub needs Docker Compose 2.33 or newer,
naming the version it found. On an older Engine it starts anyway and warns
that the Hub, the router, and the Tailscale helper may use the wrong network
for internet traffic. Check them under Verify it works;
the fix for either is to update Docker.
Docker Desktop or Docker Engine?
Docker Desktop is the graphical application — engine, Compose plugin, and a dashboard, available on all three platforms. It needs a paid subscription for organizations over 250 employees or $10M revenue.
Every platform also has a licensing-free alternative, and Hub supports all of them:
| Platform | Docker Desktop | Licensing-free alternative |
|---|---|---|
| macOS | Supported | Colima — Docker Engine in a lightweight VM |
| Windows | Supported | Docker Engine inside WSL2 |
| Linux | Supported | Docker Engine — already licensing-free |
You may not need to install anything manually. When Docker is missing, the
Companion Hub desktop app’s startup screen says Docker isn’t installed and
offers an Install Docker button. It downloads and installs Docker Desktop
on macOS and Windows (Windows may ask you to restart first, to finish enabling
WSL), and Docker Engine on Linux (through a pkexec password prompt, so
pkexec must be installed). For a licensing-free engine, the in-app Docker
guide also offers Auto-Install Colima on macOS and Auto-Install Docker
Engine in WSL2 on Windows. If you’d rather let Hub handle it, skip to
Installing Companion Hub and come back
only if the startup screen reports a problem.
This page covers installing Docker Desktop yourself, plus Docker Engine on Linux. For the licensing-free routes on macOS and Windows, see Docker backends.
On a Linux server or VPS, use Docker Engine. Docker Desktop needs a desktop session and KVM, and its VM costs you memory you’d rather give to your apps.
Install Docker Desktop
macOS
- Download from docker.com/products/docker-desktop — pick Apple silicon or Intel chip to match your Mac
- Open the
.dmgand drag Docker to Applications - Launch Docker from Applications and accept the service agreement
- Wait for the whale icon in your menu bar to stop animating — that means the engine is running
On every platform, Docker Desktop must be running, not just installed. If you quit it, Companion Hub stops with it. Turn on the “start Docker Desktop when you sign in” option in Docker’s settings now.
Install Docker Engine (Linux)
If you’re on a server, or you’d rather not run a VM, install the engine directly. The official convenience script adds Docker’s repository and installs the engine plus the Compose plugin:
curl -fsSL https://get.docker.com | shDo not install docker.io or docker-compose from your distribution’s
package manager. Those packages are frequently too old and ship the obsolete
standalone docker-compose binary rather than the docker compose plugin Hub
requires.
Then add yourself to the docker group so you don’t need sudo for every command:
sudo usermod -aG docker $USERLog out and back in for the group change to take effect. Skipping this step causes the most common Linux error — see Permission denied below.
This step is only needed for Docker Engine. Docker Desktop for Linux uses a socket owned by your own user, so there’s no group to join.
Verify it works
Three checks, in order. Don’t move on until all three pass.
Is the engine running?
docker infoYou should see a block of configuration that includes a Server Version: line. Hub recommends 28 or newer, for example Server Version: 29.8.0.
If you get Cannot connect to the Docker daemon, the engine isn’t running. Launch Docker Desktop and wait for the whale icon to settle — on any platform, including Linux.
For Docker Engine on Linux, start the service instead:
sudo systemctl start docker && sudo systemctl enable dockerRunning Docker Desktop and Docker Engine on the same Linux machine is
possible, but they are separate daemons with separate containers. Check which
one you’re talking to with docker context ls — the active context is marked
with a *.
Can you run a container?
docker run --rm hello-worldDocker downloads a tiny test image and runs it. Expected output:
Hello from Docker!
This message shows that your installation appears to be working correctly.
...This proves the whole chain works: Docker can reach the registry, pull an image, and run a container.
Is the Compose plugin available?
docker compose versionExpected:
Docker Compose version v2.40.0Companion Hub defines every app as a Compose project, so this is not optional, and it needs version 2.33 or newer. If you get docker: 'compose' is not a docker command, you have Docker without the Compose plugin. If the version is older than 2.33, Hub refuses to start and tells you so. Either way, reinstall or update Docker using the official instructions for your platform above.
After all three checks pass, Docker is ready. Next, install Ollama for local AI or go to Installation.
See what Hub does with Docker
Once you’ve installed Hub and an app, come back and run this — it’s the fastest way to understand what Hub actually is:
docker psYou’ll see the Hub’s own containers — ci-hub (the dashboard and API, port 5002), ci-hub-db (PostgreSQL), ci-hub-queue (RabbitMQ), and traefik (the router) — alongside a container for each app you installed. If you connected Cloudflare or Tailscale, cloudflared and hub-tailscale appear too.
Hub provides an interface over Docker. Every app on your dashboard is a container in that list. Nothing is hidden, and nothing locks you in — if you stopped using Hub tomorrow, those containers and their data would still be on your disk.
docker compose lsThis lists Compose projects — one named ci-hub for the Hub stack, one per app.
Common problems
Permission denied
permission denied while trying to connect to the Docker daemon socketThis affects Docker Engine on Linux: you’re not in the docker group, or you haven’t logged out since being added. The Hub startup screen reports the same problem as CI Hub can’t use Docker and shows the usermod command below.
sudo usermod -aG docker $USERThen log out and back in. Verify with:
docker run --rm hello-worldIf it works without sudo, you’re set. Docker Desktop doesn’t hit this — its socket belongs to your user already.
Cannot connect to the Docker daemon
The engine isn’t running. Launch Docker Desktop and wait for the whale icon to settle — this applies on Linux too, if that’s what you installed.
For Docker Engine on Linux:
sudo systemctl start dockerHub can’t find the Docker socket
Companion Hub mounts the Docker socket so it can manage app containers. It picks the engine like this:
- A
CI_HUB_DOCKER_HOSTorDOCKER_HOSTenvironment variable, if you set one. - Otherwise, the engine that already holds the Hub containers.
- Otherwise, on a fresh install, Docker Desktop if it’s reachable, then the first other engine it finds. On Linux it looks at your current Docker context, then Docker Desktop’s sockets (
~/.docker/desktop/docker.sock,~/.docker/run/docker.sock), then Docker Engine’s/var/run/docker.sock, then rootless Docker’s$XDG_RUNTIME_DIR/docker.sockand/run/user/<your uid>/docker.sock.
Hub records its choice in state/docker-engine.json in the Hub data folder.
If Hub reports it can’t reach Docker while docker info works fine for you, find the socket your daemon is actually using:
docker context inspect --format '{{.Endpoints.docker.Host}}'Then start Hub with that address in the environment of the process that starts it:
CI_HUB_DOCKER_HOST=unix:///run/user/1000/docker.sock cihub upUse the same variable when you launch the desktop app or companion-hub --detached. Don’t put DOCKER_SOCKET_PATH in the Hub .env file: the desktop app rewrites that file on every start and recomputes the socket path.
Hub warns and stops when it finds its stack on one Docker engine but a
different engine is selected — for example Docker Desktop and Docker Engine
both running. Point CI_HUB_DOCKER_HOST at the engine that already holds the
Hub containers, or remove the other stack.
Not enough disk space
Docker images are large — budget at least 20 GB free. Check what’s in use:
docker system dfReclaim space from stopped containers and dangling images:
docker system prunedocker system prune -a also removes cached images that aren’t currently in
use. It’s safe for your data, but apps re-download their images on next start,
which takes time and bandwidth.
For more, see Docker issues.