Guides · Get your server ready

Install Docker

Docker runs Yarr Media and the optional apps in tidy, self-contained containers. Install it yourself, or let the Yarr Media installer do it.

About 10 minutes

Do you need this guide?

The Yarr Media installer installs Docker automatically if it is missing. Use this guide if you want Docker in place first, for example to run the download apps before Yarr Media.

1. Add Docker's package repository

These commands follow Docker's official instructions and work on both Debian and Ubuntu:

sudo apt update && sudo apt install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
. /etc/os-release
sudo curl -fsSL https://download.docker.com/linux/$ID/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources > /dev/null <<EOF
Types: deb
URIs: https://download.docker.com/linux/$ID
Suites: ${UBUNTU_CODENAME:-$VERSION_CODENAME}
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update

2. Install Docker and Compose

sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

3. Check it works

sudo docker run --rm hello-world
docker compose version

You should see "Hello from Docker!" and a Compose version number.

Optional: use Docker without sudo

sudo usermod -aG docker $USER

Log out and back in for it to take effect.

Members of the docker group effectively have full control of the server. Only add accounts you trust.

Everyday commands

  • sudo docker ps: what is running
  • sudo docker logs -f sonarr: follow an app's log (Ctrl+C to stop)
  • sudo docker compose up -d: start the app in the current folder
  • sudo docker compose pull && sudo docker compose up -d: update it
  • sudo docker compose down: stop and remove it (its settings folder is kept)

More

Docker's own guides: Debian, Ubuntu.