Self-hosted Docker stack for home services, organised by functional profiles.
A single docker-compose.yml uses profiles to group services:
- infrastructure β Traefik, Tailscale, Arcane, Pocket ID, Tinyauth, Homepage, CrowdSec
- dashboard β Homepage
- media β Jellyfin, Seerr, Radarr, Sonarr, Prowlarr, qBittorrent + Gluetun, qui, Tracearr
- devtools β SonarQube, Pocket ID, Tinyauth
- security β CrowdSec
- all β Every service
The databases (Tracearr, SonarQube) start with their parent service.
Only Jellyfin, Seerr, Pocket ID and SonarQube are public (*.${DOMAIN_BASE}, CrowdSec in front), exclusively through a Cloudflare Tunnel: no port is open on the router. Everything else lives on *.lan.${DOMAIN_BASE}, reachable only through the tailnet: a Tailscale sidecar shares Traefik's network namespace, so the node's 100.x IP exposes Traefik :443 to authorized devices. TLS uses a Let's Encrypt DNS-01 wildcard (Cloudflare provider), and SSO (Tinyauth Forward Auth, or native OIDC against Pocket ID where supported) stays on the private UIs as defense-in-depth. Full design, DNS plan and rollback: docs/acces-prive-tailscale.md.
cloudflared (remote-managed, token in .env) has a fixed IP 192.168.97.250 on traefik_net. Every public hostname is configured in the Zero Trust dashboard as https://traefik:443 with Match SNI to Host. Traefik only trusts X-Forwarded-For from that IP (access logs for CrowdSec), and the bouncer reads CF-Connecting-IP from it.
-
Configuration
Secrets live in Proton Pass (vault
Docker-At-Home);.env.tplreferences them and generates.env:pass-cli login pass-cli inject -i .env.tpl -o .env --force
-
Start everything
docker compose --profile all up -d
-
Start a specific profile (infrastructure first)
docker compose --profile infrastructure up -d docker compose --profile media up -d
-
Start several profiles at once
docker compose --profile infrastructure --profile media up -d
docker compose --profile all down
docker compose --profile media down
docker compose logs -f [service]
docker compose --profile media logs -f
docker compose restart [service]
docker compose --profile media restart- Traefik β Reverse proxy with automatic SSL (Let's Encrypt, DNS-01 via Cloudflare)
- Tailscale β Sidecar node
dah-proxysharing Traefik's netns; entry point of the private zone - Arcane β Docker management UI (OIDC SSO via Pocket ID) and image updates: daily check + automatic digest updates (schedules set in the UI, Environments β Local Docker β Automations); infra (Traefik, Tailscale, CrowdSec, Pocket ID, Tinyauth, PostgreSQL, Gluetun, Arcane) is notify-only via the
com.getarcaneapp.arcane.updater=falselabel (getarcaneapp/arcane) - Pocket ID β OIDC identity provider (passkeys), single user/group directory (SQLite)
- Tinyauth β Traefik Forward Auth, login delegated to Pocket ID
- Homepage β Landing dashboard on
lan.${DOMAIN_BASE}, native OIDC login against Pocket ID - CrowdSec β Intrusion detection; feeds the Traefik bouncer middleware on the public routers
- Homepage β Dashboard with customisable widgets, protected by Pocket ID SSO
- Jellyfin β Media streaming server
- Jellyseerr β Media request interface for Jellyfin
- Radarr β Movie automation
- Sonarr β TV show automation
- Prowlarr β Indexer manager for Radarr/Sonarr
- qBittorrent β Torrent client, all traffic routed through Gluetun
- qui β Modern qBittorrent WebUI with native OIDC, plus a client proxy for external apps (autobrr/qui)
- Gluetun β VPN client (WireGuard)
- gluetun-qbt-watchdog β Syncs Gluetun's forwarded port into qBittorrent and restarts it when the tunnel drops (brunoorsolon/gluetun-qbt-watchdog)
- Tracearr β Jellyfin activity history and stats, OIDC via Pocket ID (TimescaleDB + Redis) (connorgallopo/Tracearr)
- iSponsorBlockTV β Skips/mutes YouTube ads and SponsorBlock segments on the Apple TV via the Lounge API (dmunozv04/iSponsorBlockTV)
- SonarQube β Code quality / static analysis (dedicated PostgreSQL)
- Pocket ID, Tinyauth β see infrastructure
- CrowdSec β Behaviour-based intrusion detection; blocks flagged IPs on the public routers (jellyfin/seerr/id/pdf)
Unified layout under ${MEDIA_PATH}:
/srv/.../media/
βββ downloads/
β βββ movies/
β βββ tv/
βββ movies/
βββ tv/
Recommended configuration:
- Radarr β root folder:
/data/movies - Sonarr β root folder:
/data/tv - qBittorrent β downloads:
/data/downloads - Jellyfin β libraries:
/data/moviesand/data/tv
Pairing is required before the daemon can run β it exits while devices is empty. Auto-discovery (--net=host) is Linux-only, so pairing uses a TV code.
- On the Apple TV: YouTube app β Settings β Link with TV code (leave that screen open).
- On the Mac, run the wizard and paste the code:
docker compose run --rm isponsorblocktv setup-cli- Answer
nto the API-key and channel-whitelist questions (whitelisting is the only feature needing a YouTube Data API key), then start it:
docker compose --profile media up -d isponsorblocktvSettings live in isponsorblocktv/config.json (gitignored β it holds the pairing screen_id). Defaults: mute_ads and skip_ads enabled, SponsorBlock categories sponsor, selfpromo, interaction, music_offtopic. Also available: intro, outro, preview, filler, hook, exclusive_access.
Notes:
- YouTube rotates the pairing code format and revokes old
screen_ids; re-run the wizard if skipping stops working. A warning is logged for the old 26-character format. - Ad muting does not work when the Apple TV audio goes to a speaker over AirPlay.
- The first unskippable seconds of an ad still play (muted).
- Pocket ID (
https://id.${DOMAIN_BASE}) β OIDC provider, passkey login, single source of users and groups. Admin created at/setupon first start. - Tinyauth (
tinyauth.lan.${DOMAIN_BASE}) β Forward Auth for apps without native SSO; it has no local users and redirects straight to Pocket ID.
Gated on their private hostnames (*.lan.${DOMAIN_BASE}), each behind a dedicated <service>-access group:
radarr, sonarr, prowlarr, tracearr, glances
Routers use the tinyauth@docker middleware (http://tinyauth:3000/api/auth/traefik). Per-app rules are TINYAUTH_APPS_<APP>_CONFIG_DOMAIN / _OAUTH_GROUPS variables on the tinyauth service (no Docker socket). An app without a rule is open to any account allowed by the tinyauth client.
Arr services: Radarr, Sonarr and Prowlarr have their internal auth disabled (
<AuthenticationMethod>External</AuthenticationMethod>) and rely entirely on Tinyauth for their web UI. If Tinyauth or Pocket ID is down the UI is unreachable but secured.
API clients send an API key, not a session, so Forward Auth would block them. A higher-priority router exposes each service's API path bypassing Tinyauth, on the private hostname:
| Service | Router | Rule | Auth on the API |
|---|---|---|---|
| Radarr | radarr-api |
Host(radarr.lan.β¦) && PathPrefix(/api) |
X-Api-Key |
| Sonarr | sonarr-api |
Host(sonarr.lan.β¦) && PathPrefix(/api) |
X-Api-Key |
| Prowlarr | prowlarr-api |
Host(prowlarr.lan.β¦) && PathPrefix(/api) |
X-Api-Key |
priority=100makes the/apiprefix win over the catch-all UI router. These routes stay reachable when Tinyauth is down.
qBittorrent has no Traefik route: its UI is served by qui (
qui.lan.β¦), and native clients (Helmarr) go through qui's client proxy (/proxy/<key>). qBittorrent stays reachable internally atgluetun:8080, so keep its WebUI auth enabled.
Issuer https://id.${DOMAIN_BASE} (discovery /.well-known/openid-configuration); add the groups scope where group claims are needed.
- qui β OIDC (fully managed by Terraform; built-in login disabled, access gated on the
qui-accessgroup) - Arcane β OIDC (fully managed by Terraform; admin role and access gated on the
arcane-accessgroup) - Homepage β OIDC (fully managed by Terraform; access gated on the
homepage-accessgroup) - Hermes β native Hermes Agent on the Mac (gateway Webapp on
127.0.0.1:9120, routed tohermes.lan.${DOMAIN_BASE}bytraefik-dynamic.yml); OIDC handled by Hermes (fully managed by Terraform; public PKCE client, no secret; access gated on thehermes-accessgroup) - Seerr β OIDC (client created manually in Pocket ID)
- Jellyfin β OIDC via the SSO plugin (manual)
- SonarQube β local login (no SAML in Pocket ID)
Pocket ID asks each user to consent once per client.
Two independent modules under terraform/:
terraform/pocketid/β Pocket ID clients and groups (providertrozz/pocketid)terraform/arr/β Radarr / Sonarr / Prowlarr (providersdevopsarr/{radarr,sonarr,prowlarr})
| File | Purpose |
|---|---|
providers.tf, variables.tf, terraform.tfvars |
Provider + connection (Pocket ID URL & API key, domain_base) |
homepage.tf, qui.tf, arcane.tf, tracearr.tf, hermes.tf |
OIDC clients (+ <app>-access group, generated env file) |
forward_auth.tf |
<service>-access groups + the single tinyauth client (generated/tinyauth.env) |
client_secret is only readable at creation and lives in the state: keep terraform.tfstate out of git (it is).
Usage (from a container on traefik_net, the public URL is not reachable from the host):
cd terraform/pocketid
docker run --rm -it --network traefik_net -v "$PWD":/work -w /work \
--entrypoint sh hashicorp/terraform:latest -c "terraform init && terraform apply"After
apply, add users to the relevant<service>-accessgroups in Pocket ID, otherwise access is denied.
Fresh
pocketid_datavolume: the distroless image runs as uid 65532, sochown 65532:65532the volume once before the first start.
Codifies the Radarr / Sonarr / Prowlarr configuration (quality settings, indexers, download clients, notifications). It talks to each service over its internal URL (container name on traefik_net) authenticated by API key. Requires Terraform β₯ 1.7 (conditional import blocks with for_each).
| File | Purpose |
|---|---|
providers.tf, variables.tf, terraform.tfvars |
Providers + connection (URLs, API keys, qBittorrent, Telegram, paths) |
locals.tf |
TRaSH-style custom formats (MULTi/TRUEFRENCH/FRENCH favoured; VOSTFR/VFQ/unwanted blocked) with per-resolution scores |
radarr.tf, sonarr.tf |
Root folder, qBittorrent download client, custom formats, quality profiles, recycle bin |
prowlarr.tf |
qBittorrent download client, Radarr/Sonarr applications, Telegram notification |
indexers.tf |
Prowlarr Cardigann indexers (Generation-Free, C411, TR4KER, Nostradamus β disabled) β adopted by import, enable per indexer |
sync_profile.tf |
Prowlarr sync profile (minimum-seeders floor for grabbing) |
quality_definitions.tf |
TRaSH quality sizes (min_size = 0 β custom formats do the filtering) |
imports.tf |
Conditional imports β empty *_import_id β resource created; set β existing config adopted |
Usage:
cd terraform/arr
cp terraform.tfvars.example terraform.tfvars
terraform init
terraform plan
terraform applyAdopting an existing setup: fill the
*_import_id/indexer_import_idsvalues interraform.tfvarsso Terraform adopts the existing resources instead of creating duplicates. Leave them empty on a fresh server.
- β Private services reachable only through the tailnet (device identity = first auth layer)
- β Centralised authentication, unified users/groups, passkeys, centralised auth logs
- β CrowdSec + Traefik bouncer on the remaining public edge (jellyfin/seerr/id/pdf)
β οΈ Single point of failure (assumed): if Pocket ID is down, every Forward Auth / OIDC web UI is inaccessible (Tinyauth too for Forward Auth); the/apiroutes stay upβ οΈ Arr web UIs (AuthenticationMethod=External) have no protection of their own without Tinyauth β mitigated by the tailnet boundaryβ οΈ The/apiroutes (and qui's/proxy/<key>) bypass Tinyauth and rely on the tailnet + the service's own key/token. Keep those keys secret and qBittorrent's WebUI auth enabled.
Recommendations:
- Monitor Pocket ID and Tinyauth (healthchecks are configured)
- Back up the PostgreSQL databases regularly
- Alert on Pocket ID downtime
- Periodically test a full-stack startup
Only possible by editing config.xml directly:
<AuthenticationMethod>External</AuthenticationMethod>Procedure:
docker compose stop radarr sonarr prowlarr- Edit the
config.xmlfiles in the Docker volumes docker compose start radarr sonarr prowlarr