Skip to content

Docker and Compose

The image is ghcr.io/kucukkanat/bunker (multi-arch, distroless, runs as uid 65532). Everything Bunker stores lives in /data inside the container.

Terminal window
docker volume create bunker-data
docker run -d --name bunker -p 8080:8080 \
-v bunker-data:/data --restart unless-stopped \
ghcr.io/kucukkanat/bunker
docker logs bunker # setup URL and one-time code

Open http://<host>:8080/setup, enter the code and create your admin account.

Once Bunker has a real address, tell it: -e BUNKER_URL=https://bunker.example.com. Without it, Bunker learns its URL from the first request with a real hostname and saves it.

docker-compose.yml in the repository:

services:
bunker:
image: ghcr.io/kucukkanat/bunker:latest
container_name: bunker
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- bunker-data:/data # database, uploads and keys: back this up
environment:
BUNKER_URL: ${BUNKER_URL:-}
# BUNKER_SETUP_CODE: change-me
# BUNKER_LOG_FORMAT: text
volumes:
bunker-data:
Terminal window
BUNKER_URL=https://bunker.example.com docker compose up -d
docker compose logs bunker

deploy/compose-with-caddy/ runs Bunker behind Caddy, which gets Let’s Encrypt certificates for you.

  1. Point a DNS record (for example bunker.example.com) at the server.
  2. Open ports 80 and 443.
  3. Start it:
    Terminal window
    cd deploy/compose-with-caddy
    DOMAIN=bunker.example.com docker compose up -d
    docker compose logs bunker

The Caddyfile sets flush_interval -1 so live updates (server-sent events) aren’t buffered. Compose sets BUNKER_TRUST_PROXY=true so Bunker reads the real client IP from X-Forwarded-For.

The simplest way: Admin → Updates → Update. Bunker downloads the release into the data volume and restarts in place; the container keeps running. See Upgrade.

To update the image itself:

Terminal window
docker pull ghcr.io/kucukkanat/bunker
docker rm -f bunker && docker run ... # same command as before

Database migrations run automatically at start. Back up the volume first: see Backups and upgrades.

Some platforms mount volumes owned by root, which uid 65532 can’t write to. Build with --build-arg BUNKER_RUN_UID=0 (Render and Railway do this through a service variable).