Cleanuparr Docker Compose files describe the whole container in one readable YAML document, which makes them the easiest way to keep your setup reproducible. Instead of remembering a long command, you store the configuration next to the rest of your media stack and start everything with a single instruction.

The Documented Compose Example

The project documentation includes a compose file that mirrors its docker run example. Saving it as docker-compose.yml in its own folder is enough to get started.

services:
  cleanuparr:
    image: ghcr.io/cleanuparr/cleanuparr:latest
    container_name: cleanuparr
    restart: unless-stopped
    ports:
      - "11011:11011"
    volumes:
      - /path/to/config:/config
    environment:
      - PORT=11011
      - BASE_PATH=
      - PUID=1000
      - PGID=1000
      - UMASK=022
      - TZ=Etc/UTC

Start it with docker compose up -d from the same folder. Compose creates the container, attaches it to a default network and keeps it running across reboots because of the restart policy.

Breaking Down the File

Every key in the file has a clear job. Knowing what each one controls makes later changes, such as a new port or a different config path, much less risky.

KeyWhat it controls
imageWhich image and tag Compose pulls
container_nameA fixed, readable name for logs and networking
restartAutomatic restart unless you stop it manually
portsHost port to container port mapping for the web UI
volumesPersistent storage for settings and data
environmentRuntime values such as IDs, umask and time zone

Image and Tag

The latest tag always tracks the newest release. Pinning a release tag keeps upgrades under your control, which some users prefer for a service that can delete downloads.

Ports and Volumes

The quoted port string avoids YAML parsing surprises. The config path on the left can be any folder you back up regularly, such as ./config next to the compose file.

Adding Cleanuparr to an Existing Stack

Many people already run Sonarr, Radarr and qBittorrent from one compose file. Adding Cleanuparr as another service in that file puts it on the same network automatically, so it can reach every app by service name.

services:
  qbittorrent:
    # existing service
  sonarr:
    # existing service
  cleanuparr:
    image: ghcr.io/cleanuparr/cleanuparr:latest
    container_name: cleanuparr
    restart: unless-stopped
    ports:
      - "11011:11011"
    volumes:
      - ./cleanuparr:/config
      - /data/downloads:/data/downloads
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC

The extra downloads mount is optional and only matters for features that read files on disk. Keep the container path identical to the one your download client uses so both apps agree on where every file lives.

Useful Compose Commands

A handful of commands cover nearly all day-to-day maintenance. Run them from the folder that holds the compose file.

  • docker compose up -d creates or updates the container
  • docker compose pull downloads the newest image for the tag
  • docker compose logs -f cleanuparr follows the live log output
  • docker compose restart cleanuparr restarts only this service

Common Compose Mistakes

Indentation errors are the most frequent problem, because YAML treats spaces as structure. Use spaces rather than tabs and keep each nested key aligned under its parent.

The second common issue is pointing the config volume at a folder the container cannot write to. Matching PUID and PGID to the folder owner, or adjusting ownership with chown, usually fixes startup errors straight away.

Using an Environment File

Larger stacks often keep shared values such as PUID, PGID and TZ in a .env file beside the compose file. Compose reads it automatically, so every service picks up the same IDs and time zone without repeating them.

# .env
PUID=1000
PGID=1000
TZ=Europe/London

# docker-compose.yml
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}

Keep the .env file out of public repositories if it ever holds secrets. For Cleanuparr itself, API keys live in the config folder rather than in compose, which keeps the YAML safe to share.

Networks and Reverse Proxies

When a reverse proxy such as Traefik or Caddy already runs in Compose, attach Cleanuparr to the same external network. The proxy can then reach the container by name without publishing port 11011 on the host at all.

    networks:
      - proxy
networks:
  proxy:
    external: true

Removing the ports block in that case keeps the interface reachable only through the proxy, which is a tidy way to add HTTPS and login protection in front of it.

Checking the File Before Starting

Compose can validate a file before creating anything. Running docker compose config prints the merged configuration and reports YAML or variable errors immediately.

  • Confirm the image name matches the documented registry path
  • Check that every host folder in volumes already exists
  • Make sure no other service publishes the same host port

Pinning Versions for Stability

A service that removes downloads deserves predictable upgrades. Replacing latest with a release tag from the GitHub releases page means Compose only changes versions when you edit the file yourself.

Pinned tags also make rollbacks trivial. If a new release behaves unexpectedly, set the previous tag again, run docker compose up -d and the earlier version returns with your existing settings intact.

  • Note the current tag in a comment before every upgrade
  • Upgrade one minor version at a time on important servers
  • Read release notes for renamed settings or new defaults

Keeping the compose file in a backed-up folder, or in a private Git repository, means the whole Cleanuparr service can be recreated on new hardware in minutes, with the config volume restored alongside it.

Frequently Asked Questions

Conclusion

Cleanuparr Docker Compose files turn a long command into a tidy, versionable document. Start from the documented example, set a real config path and correct IDs, then add the service to your existing *arr compose file so every container shares a network and stays easy to update.