Docker
Volumes
Section titled “Volumes”Narratorr uses three key directories, typically mapped as Docker volumes:
| Container Path | Purpose | Back Up? |
|---|---|---|
/config | Database, settings, configuration files | Yes |
/audiobooks | Your audiobook library | Optional (media can be re-downloaded) |
/downloads | Shared with download client for import | No |
volumes: - ./config:/config # Persist between container recreations - /data/audiobooks:/audiobooks - /data/downloads:/downloadsNetworking
Section titled “Networking”Connecting to Other Containers
Section titled “Connecting to Other Containers”When Narratorr and your download client are in the same docker-compose.yml, use the service name as the hostname:
services: narratorr: image: narratorr/narratorr:latest environment: - PUID=1000 # default: 911 - PGID=1000 # default: 911 - TZ=America/New_York # ... qbittorrent: image: lscr.io/linuxserver/qbittorrent:latest # ...In Narratorr’s download client settings, set host to qbittorrent (the service name), not localhost.
Connecting to Host Services
Section titled “Connecting to Host Services”If a service runs on the host machine (not in Docker):
- Linux: Use
host.docker.internal(Docker 20.10+) or the host’s LAN IP - Windows/macOS: Use
host.docker.internal(built-in)
Custom Networks
Section titled “Custom Networks”If services are in separate compose files, create a shared network:
# In both docker-compose files:networks: shared: external: true
services: narratorr: networks: - sharedCreate the network first: docker network create shared
Health Check
Section titled “Health Check”Narratorr exposes a health check endpoint:
GET /api/healthReturns 200 OK when the server is running. Use this for container orchestration, monitoring, or load balancer health probes.
The image already defines its own HEALTHCHECK (with a built-in start period), so no manual configuration is needed. If you do want to override it — for example in a load balancer or external monitor — match what the image does so it keeps working under a reverse-proxy subpath:
services: narratorr: image: narratorr/narratorr:latest healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:3000${URL_BASE:-}/api/health || exit 1"] interval: 30s timeout: 5s retries: 3Updating
Section titled “Updating”-
Pull the latest image:
Terminal window docker compose pull -
Recreate the container:
Terminal window docker compose up -d
Your data persists in the mounted volumes. Database migrations run automatically on startup.
Backups
Section titled “Backups”Back up the /config directory. It contains:
narratorr.db— your database (books, settings, indexer configs, download history)- Any other configuration files
# Simple backupcp -r ./config ./config-backup-$(date +%Y%m%d)
# Or with a Docker volumedocker run --rm -v narratorr_config:/config -v $(pwd):/backup alpine \ tar czf /backup/narratorr-config-$(date +%Y%m%d).tar.gz /configEnvironment Variables
Section titled “Environment Variables”See Environment Variables for the complete reference. The Docker image sets production defaults automatically.
Because the image is based on LinuxServer.io, it also honors these standard variables:
PUID/PGID— the runtime UID/GID used for file ownership of everything Narratorr writes (config database, imported audiobooks). Default911; set them to match the owner of your host directories. See the volume-permissions note under Common Issues.TZ— the container timezone (e.g.America/New_York), used for log timestamps and scheduling.
Common Issues
Section titled “Common Issues”- Container can’t write to volumes — Narratorr runs as the unprivileged
abcuser (LinuxServer.io base image). SetPUID/PGIDto match the UID/GID that owns your host directories (default911). Runidon the host to find the right values. - Can’t connect to download client — use service names, not
localhost. See Troubleshooting. - Downloads complete but don’t import — the
/downloadsvolume must be accessible to both containers with matching paths. See Remote Path Mappings.