Skip to content

Docker Compose

Docker Compose is the recommended way to run Downtify for persistent home-server setups. It makes updates, backups and configuration changes easy.

Minimal setup

Create a docker-compose.yml file:

services:
  downtify:
    container_name: downtify
    image: ghcr.io/henriquesebastiao/downtify:latest
    ports:
      - '8000:8000'
    volumes:
      - ./downloads:/downloads
      - downtify_data:/data
    restart: unless-stopped

volumes:
  downtify_data:

Start it:

docker compose up -d

Open http://localhost:8000.

Custom port

If port 8000 is already in use, map a different host port and set the DOWNTIFY_PORT environment variable so the container listens on the same port internally:

services:
  downtify:
    image: ghcr.io/henriquesebastiao/downtify:latest
    ports:
      - '9090:30321'
    environment:
      - DOWNTIFY_PORT=30321
    volumes:
      - ./downloads:/downloads
      - downtify_data:/data
    restart: unless-stopped

Some ISPs and corporate networks block YouTube. Adding explicit DNS resolvers improves reliability:

services:
  downtify:
    image: ghcr.io/henriquesebastiao/downtify:latest
    ports:
      - '8000:8000'
    volumes:
      - ./downloads:/downloads
      - downtify_data:/data
    dns:
      - 1.1.1.1
      - 1.0.0.1
    restart: unless-stopped

Updating

docker compose pull
docker compose up -d

Your music and settings are preserved in the volumes.

Volumes

Path inside the compose file Purpose
./downloads:/downloads Downloaded audio files (local directory)
downtify_data:/data Application database and settings (named volume)

You can replace the named volume with a local path (./data:/data) if you prefer to manage it yourself.