Docker Compose / Ubuntu Server

Media Stack for Ubuntu

Developed by Ronald Goodchild for your pleasure.

DockerVPN kill switchJellyfin
Media Stack for Ubuntu screenshot

Quick start

git clone https://github.com/ronaldgoodchild/media-stack-ubuntu.git
cd media-stack-ubuntu
sudo ./install.sh

Run from an elevated (sudo) shell. It'll interactively ask for your Mullvad WireGuard key (for the qBittorrent VPN kill switch β€” leave blank to skip qBittorrent entirely) and a Samba password, then does everything else unattended.

Command line (technician / unattended):

sudo ./install.sh \
  --mullvad-private-key "abcd..." \
  --mullvad-address "10.x.x.x/32" \
  --smb-password "yourpassword" \
  --non-interactive

Useful flags:

Flag Effect
--install-root PATH Where the compose file/.env live (default /opt/mediastack)
--media-root PATH Where media/downloads/appdata live (default /mnt/media)
--stack-user NAME System user that owns everything + runs Samba (default: whoever ran sudo)
--timezone TZ Container timezone (default America/New_York)
--skip-apps LIST Comma list to leave out: qbittorrent,sabnzbd,bazarr,lidarr,readarr,whisparr,seerr,recyclarr,arr-dashboard,npm (skipping qbittorrent also skips the gluetun VPN container)
--mullvad-private-key / --mullvad-address Your Mullvad WireGuard config (from your Mullvad account page)
--vpn-country COUNTRY Mullvad server country (default USA)
--smb-user / --smb-password Samba share login (defaults to --stack-user)
--skip-samba Don't configure Samba shares
--skip-firewall Don't touch ufw
--skip-tailscale Don't install Tailscale
--tailscale-authkey KEY Join your tailnet unattended (from your Tailscale admin console β†’ Settings β†’ Keys); omit to approve it yourself in a browser after install
--force-env Overwrite an existing .env instead of leaving it alone
--non-interactive Fail instead of prompting when something required is missing

The script is idempotent β€” safe to re-run any time. It won't overwrite an existing .env (so it won't clobber your Mullvad key/API keys) unless you pass --force-env, and every other step checks current state first.

What the installer actually does

  1. Installs Docker + the Compose plugin (skipped if already present).
  2. Creates the directory tree under --media-root (Media/{Movies,TV,Music,Books,Adult}, Downloads/{incomplete,complete}, AppData/<app>, Shared), owned by the stack user.
  3. Copies docker-compose.yml and dashboard/ from this repo into --install-root and writes .env (PUID/PGID, timezone, media root, Mullvad credentials, and which optional apps are enabled).
  4. Brings the whole stack up with docker compose up -d, gated by Compose profiles β€” every optional app (qbittorrent, sabnzbd, bazarr, lidarr, whisparr, seerr, recyclarr, arr-dashboard, npm) is its own profile, toggled by COMPOSE_PROFILES in .env. Core apps (Jellyfin, Prowlarr, Sonarr, Radarr, Portainer, Watchtower, the dashboard) always run.
  5. Routes qBittorrent's entire network namespace through Gluetun (Mullvad WireGuard) β€” if the VPN drops, qBittorrent loses internet instead of leaking your real IP to the swarm. SABnzbd talks Usenet directly since that protocol has no IP-exposure concern. (There's deliberately only one Usenet client β€” SABnzbd and NZBGet do the same job, and running both just means twice the setup for no benefit.)
  6. Registers a mediastack.service systemd unit (Requires=docker.service, WantedBy=multi-user.target) so docker compose up -d runs on every boot, same idea as NSSM on the Windows side.
  7. Configures Samba ([Media], [Downloads], [Shared]) so the same library is reachable from Windows machines on your LAN β€” unless --skip-samba.
  8. Opens the right ports on ufw, scoped to whichever optional apps you actually enabled β€” unless --skip-firewall.
  9. Builds a branded dashboard at http://:8090 β€” a static launcher page (served by a tiny nginx:alpine container) with a link to every app, plus the SMB share paths with a copy button, plus a Storage panel: a gauge per mounted filesystem (green/amber/red at 75%/90%, same thresholds as the Windows dashboard), a Memory gauge, and a live green/amber/red status dot on every app card β€” all fed by tools/update-stats.sh on a 30-second systemd timer (mediastack-stats.timer) that writes dashboard/stats.json from df, free, and docker compose ps β€” no separate API/backend needed. A second tab, Help, is a plain-English walkthrough for someone who's never seen this stack before: what to click first, what every app does, the shared logins, and how to map the SMB shares β€” written for the person using the box, not the person who set it up.
  10. Installs Tailscale so the box is reachable from elsewhere without port-forwarding β€” see the Tailscale section below.
  11. Prints a summary at the end with every enabled app's URL.

No Recyclarr sync, no Jellyfin/Seerr first-run-wizard automation β€” unlike the Windows installer, this one stops at "the stack is up and every app's web UI is reachable." Sonarr/Radarr's root folders and download clients, and Jellyfin's setup wizard, are still a few clicks each; the *arr apps auto-discover each other once you add them all inside Prowlarr (Settings β†’ Apps).

Indexers are up to you. Prowlarr is installed with no indexers; add the ones you have accounts with or are entitled to use, then the wiring step below syncs them out to every *arr app.

Nor is the rest of the wiring β€” root folders, download clients, Prowlarr↔*arr app registration, Bazarr↔Sonarr/Radarr, per-app login. Run once the stack is up:

python3 tools/wire-stack.py

Sets forms authentication (username media; a random password is generated on first run, printed at the end and saved to credentials.txt β€” or pass --username/--password) on Sonarr, Radarr, Lidarr, Readarr, Whisparr, and Bazarr; adds each app's root folder on the media drive; registers SABnzbd as a download client (with matching categories) in Sonarr/Radarr/Lidarr/Whisparr; registers those four apps as Prowlarr Applications so every indexer you add in Prowlarr syncs out automatically; connects Bazarr to Sonarr and Radarr. Idempotent β€” safe to re-run after changing anything.

What it deliberately leaves for you: - Indexer and Usenet-provider accounts. These are your own third-party logins; add them in Prowlarr and SABnzbd yourself. - Portainer's, NPM's, and arr-dashboard's admin passwords. All three enforce a complexity/length minimum the shared app login may not meet (Portainer: 12+ chars; NPM: 8+ chars; arr-dashboard: 8+ chars with upper/lower/ number/special), so none were set automatically. Pick a compliant password for these specifically: Portainer prompts for one on first visit to :9000 (grab the one-time setup token with docker logs portainer | grep setup_token, since it printed before you had a chance to use it); NPM prompts for one on first visit to :81; arr-dashboard prompts for one on first visit to :3050.

Requests, TRaSH-Guides sync, and unified control

Three more apps round out the stack, each set up through its own first-run web wizard rather than scripted (there's no API to drive until you've clicked through each one at least once):

  • Seerr (:5055) β€” movie/TV request management tied to Jellyfin. Not Jellyseerr: Jellyseerr hasn't had a real release in about a year and can't authenticate against Jellyfin 12.x's new auth API β€” Seerr is the actively-maintained continuation, same app the Windows installer uses. Sign in with your Jellyfin login, point it at http://jellyfin:8096, sync your libraries, and add http://radarr:7878 / http://sonarr:8989 with their API keys (from each app's config.xml) as the request targets β€” pick the TRaSH-Guides quality profile recyclarr already created (HD Bluray + WEB / WEB-1080p) so requests land at the same quality as everything else.
  • Recyclarr (no web UI) β€” syncs TRaSH-Guides custom formats and quality profiles into Sonarr/Radarr on a daily cron (CRON_SCHEDULE=0 6 * * * in docker-compose.yml). Config lives at AppData/recyclarr/configs/*.yml; scaffold more with docker compose exec recyclarr recyclarr config create --template <id> -p /config/configs (docker compose exec recyclarr recyclarr config list templates to see what's available), fill in base_url/api_key, then docker compose exec recyclarr recyclarr sync to run it immediately instead of waiting for the next 6am.
  • arr-dashboard (:3050) β€” a unified control panel across every *arr app: search, calendar, download queue, and requests from one page instead of switching between Sonarr/Radarr/Prowlarr's own UIs. Sign in with a compliant password (see above), then add each app under Settings using their internal hostnames (http://sonarr:8989, etc.) and API keys.

Tailscale

install.sh installs the Tailscale client automatically (skip with --skip-tailscale). Joining a tailnet needs a real account login, so it's the one step that can't be fully unattended unless you pass --tailscale-authkey (from your Tailscale admin console β†’ Settings β†’ Keys) β€” without one, the installer prints a login link at the end for you to open and approve. Decide first whose tailnet it should join β€” if this box is heading to someone else eventually, joining your own tailnet now means you can reach their server indefinitely; consider waiting and letting them join it with their own account once it's theirs.

Once joined, the whole stack is reachable over Tailscale's IP the same way it is over the LAN IP β€” every app, the dashboard, SMB β€” no port-forwarding, no exposing anything to the raw internet.

Whoever ends up owning this box doesn't need SSH commands to find the join link β€” install.sh also drops /etc/update-motd.d/99-tailscale-setup, which prints the current login link on every SSH login for as long as the box is unjoined, and self-clears (stops printing, nothing to remove by hand) the moment it actually connects. Handy for a handoff scenario: give them SSH access, they see exactly what to do the first time they log in, and the reminder disappears on its own once it's done.

Remote support without merging networks: once the box is on its owner's tailnet, Tailscale's own Sharing feature (Tailscale admin console β†’ that device β†’ Share) lets them grant access to one specific person's tailnet β€” quarantined to just that device, nothing else on their network, revocable anytime by either side. That's the intended way to give someone (e.g. whoever set the box up) ongoing remote-support access without adding them to the owner's whole tailnet.

Offline alerts (ntfy.sh)

install.sh generates a random, unguessable ntfy.sh topic (skip with --skip-ntfy, or bring your own with --ntfy-topic NAME) and stores it in .env as NTFY_TOPIC. From then on, update-stats.sh compares each app's status to its previous run on every 30-second tick and fires a push notification β€” sound + vibration on the ntfy app, or just watch https://ntfy.sh/<topic> in a browser β€” the moment something transitions:

  • Was up, now down β†’ urgent-priority alert.
  • Was down, now back up β†’ normal-priority recovery notice.

Deliberately not on every poll while something's still down (that would spam a notification every 30 seconds) and not on the very first run after install (nothing to compare against yet, so it seeds a silent baseline instead of firing false alarms for anything already-known-off, like a deliberately-skipped qBittorrent). Tested live end-to-end while building this β€” stopping and restarting a container produces exactly the two expected notifications and nothing else.

The topic name is shown on the dashboard's Help tab and in the install summary. Treat it like a password β€” ntfy.sh's public server has no authentication by default, so anyone who knows the exact topic name can read (or post to) it too.

Ports

App Port
Dashboard 8090
Portainer 9000 / 9443
Jellyfin 8096
Prowlarr 9696
Sonarr 8989
Radarr 7878
Lidarr 8686
Readarr 8787
Whisparr 6969
Bazarr 6767
qBittorrent 8088 (via Gluetun)
SABnzbd 8085
Seerr 5055
arr-dashboard 3050
Nginx Proxy Manager 80 / 81 (admin) / 443
Samba 137/udp, 138/udp, 139/tcp, 445/tcp

VPN note

If MULLVAD_PRIVATE_KEY is blank, qbittorrent (and gluetun) are simply left out of COMPOSE_PROFILES β€” the rest of the stack runs fine without a torrent client, using Usenet (SABnzbd) only. Add a key later and re-run sudo ./install.sh --force-env to turn qBittorrent on.

Known gaps / what's not built yet

  • No tray app / native client β€” this is a headless server stack, managed through each app's own web UI plus Portainer.
  • No public-indexer auto-population, no Recyclarr/TRaSH-Guides sync, no Jellyfin/Seerr setup-wizard automation β€” see the note above.
  • Dashboard is a static launcher (like the Windows repo's website/ marketing page), not the Windows dashboard's live-polling status tiles.

Legal

You're responsible for what you point these apps at and for complying with your indexers' terms and your local laws. This stack automates library organization; it doesn't include or access any content itself.

Security notes

  • credentials.txt (created by tools/wire-stack.py) and .env hold logins and keys in plain text. Keep the install folder private; both are git-ignored.
  • Expose services to the internet only through a VPN such as Tailscale, never by port-forwarding.
  • Report security problems privately through the repository's Security tab.
← Back to all projects

Windows downloads are unsigned, so SmartScreen may show a warning the first time: choose More info → Run anyway. The full source is on GitHub. Need help or something custom? Request service.