📺 My Sonarr Setup#
This Sonarr setup runs in a Docker container and is used to manage TV series downloads. It includes configurations for environment variables, volume mounts, and networking.
⚙️ My Configuration Details#
🌍 Environment Variables#
Variable | Description |
---|---|
PUID=0 | User ID for permission management (root user) |
PGID=0 | Group ID for permission management (root group) |
TZ=Europe/London | Timezone configuration |
📂 Volume Mounts#
Volume | Description |
---|---|
~/sonarr/config:/config | Mounts Sonarr configuration data for persistence |
~/downloads:/downloads | Mounts the downloads directory |
/mnt/main_nas/tv_shows:/main_nas/tv | Optional: Mounts the main NAS TV shows directory |
/mnt/sean_nas/tv_shows:/sean_nas/tv | Optional: Mounts the secondary NAS TV shows directory |
🔗 Networking#
Port Mapping | Function |
---|---|
8989:8989 | Sonarr web interface for managing TV series |
📜 My Docker Compose Configuration#
services:
sonarr:
image: lscr.io/linuxserver/sonarr:latest # Sonarr latest image
container_name: sonarr # Container name for identification
environment:
- PUID=0 # Set user ID (root user)
- PGID=0 # Set group ID (root group)
- TZ=Europe/London # Set timezone
volumes:
- ~/sonarr/config:/config # Mount Sonarr configuration directory
- ~/downloads:/downloads # Mount downloads directory
- /mnt/main_nas/tv_shows:/main_nas/tv # Optional: Mount main NAS TV shows directory
- /mnt/sean_nas/tv_shows:/sean_nas/tv # Optional: Mount secondary NAS TV shows directory
ports:
- "8989:8989" # Expose port 8989 for the Sonarr web interface
restart: unless-stopped # Restart the container unless stopped manually
🔐 Using Docker Secrets for Environment Variables#
You can set any environment variable from a file by using a special prepend FILE__
.
For example:
FILE__MYVAR=/run/secrets/mysecretvariable