← Back to Blog

Complete Plex Docker Compose Stack Deployment

Updated November 19, 2026 · PlexBeam

The Full Media Stack

A production Plex setup is not just Plex. It is an ecosystem of tools that handle content acquisition, organization, monitoring, user requests, and reverse proxying — all running as Docker containers orchestrated by a single docker-compose.yml file. This guide walks through each service, its role, and how they connect.

The stack we are building includes:

Directory Structure

Before writing the Compose file, create a clean directory layout. Every container's config lives in its own subdirectory under a common root. Media uses a shared volume that all containers can access with consistent paths.

/opt/mediastack/
  docker-compose.yml
  .env                    ← shared environment variables
  plex/config/
  sonarr/config/
  radarr/config/
  prowlarr/config/
  overseerr/config/
  tautulli/config/
  traefik/
    traefik.yml
    acme.json             ← SSL certificates (chmod 600)
/mnt/media/               ← shared media storage
  movies/
  tv/
  downloads/

The .env file holds variables shared across all services: PUID, PGID, TZ, and DOMAIN (your base domain for Traefik labels). Reference these in the Compose file with ${VARIABLE} syntax.

Plex Service

Plex is the core service. Use the LinuxServer.io image for PUID/PGID support. Map the config volume to /opt/mediastack/plex/config, mount the media root at /data (read-only unless you use DVR), and use a tmpfs mount for /transcode. Set network_mode: host for LAN discovery, or use bridge mode with explicit port mappings if you need network isolation.

The PLEX_CLAIM environment variable is only needed on first run. After the server is claimed, you can remove it from the Compose file. It expires after 4 minutes, so generate it at plex.tv/claim immediately before running docker compose up for the first time.

Sonarr and Radarr

Both services follow the same pattern: LinuxServer.io images with PUID/PGID, config volumes under /opt/mediastack/, and the shared media volume mounted at /data. The critical detail is path consistency: when Sonarr tells a download client to put a file at /data/downloads/completed/, that path must resolve the same way inside both the Sonarr container and the download client container.

Using a single /data mount point that includes both downloads/ and the final library directories (movies/, tv/) enables Sonarr and Radarr to perform atomic moves (hardlinks) instead of copy-and-delete, saving time and preventing incomplete files from appearing in Plex during the transfer.

Pro Tip: Always use the same mount path in every container. If Plex sees media at /data/movies/, Radarr must also see it at /data/movies/. Mismatched paths break import detection and cause "file not found" errors after downloads complete.

Prowlarr: Centralized Indexer Management

Prowlarr replaces the need to configure indexers separately in Sonarr and Radarr. Set up your indexers once in Prowlarr, add Sonarr and Radarr as applications, and Prowlarr automatically syncs the indexer configuration to both. When Prowlarr adds or removes an indexer, the change propagates to all connected apps.

Connect Prowlarr to Sonarr/Radarr by adding them as "Applications" in Prowlarr's settings. Use the internal Docker hostname (the service name from your Compose file, e.g., http://sonarr:8989) and the API key from each service's Settings → General page.

Overseerr: User Request Portal

Overseerr gives your Plex users a clean interface to request movies and TV shows. It connects to Plex for user authentication (users log in with their Plex account), Radarr for movie requests, and Sonarr for TV requests. When a user requests content, Overseerr sends the request to the appropriate arr tool, which handles the download automatically.

Overseerr supports approval workflows: you can auto-approve requests from trusted users while requiring manual approval for others. Set quotas to prevent one user from requesting 50 movies in a day.

Tautulli: Monitoring and Statistics

Tautulli connects to Plex's API and tracks every stream: who is watching, what they are watching, what quality they are getting, whether the stream is transcoding or direct playing, and bandwidth usage. It stores historical data so you can see usage trends over weeks and months.

Key alerts to configure in Tautulli: stream started/stopped (useful for knowing who is using your server), buffer events (indicates bandwidth or transcoding problems), new content added (confirms your automation pipeline is working), and Plex server down.

Traefik: Reverse Proxy with Auto-SSL

Traefik sits in front of all web-facing services and handles HTTPS termination, routing, and certificate management. It reads Docker labels from your containers to automatically configure routes — no manual Nginx config files to maintain.

Each service gets Traefik labels in the Compose file that define its hostname, entrypoint (HTTPS), and certificate resolver. For example, Overseerr might be accessible at requests.yourdomain.com, Tautulli at stats.yourdomain.com, and Sonarr at sonarr.yourdomain.com.

Traefik automatically obtains Let's Encrypt certificates for each hostname using the HTTP-01 or DNS-01 challenge. Certificates are stored in acme.json and renewed automatically before expiration. The DNS-01 challenge is preferred because it works even if ports 80/443 are not publicly accessible (useful behind CGNAT).

Important: Set acme.json permissions to 600 before starting Traefik. If the file has open permissions, Traefik refuses to start as a security precaution. Run chmod 600 /opt/mediastack/traefik/acme.json.

Networking Between Services

All services should be on the same Docker network so they can communicate by container name. Create a custom network in your Compose file (e.g., medianet) and attach every service to it. Containers reference each other by service name: Sonarr connects to Plex at http://plex:32400, Overseerr connects to Radarr at http://radarr:7878.

Only expose ports to the host that need external access. Traefik exposes 80 and 443 for web traffic. Plex exposes 32400 (and optionally DLNA/GDM ports). Everything else stays internal to the Docker network.

Starting and Managing the Stack

Launch everything with docker compose up -d from the directory containing your Compose file. Docker pulls all images, creates the network, and starts services in dependency order. Check status with docker compose ps and view logs with docker compose logs -f servicename.

To update all services: docker compose pull && docker compose up -d. Docker only recreates containers whose images have changed, so the downtime is minimal (usually under 30 seconds per service).

For backups, the most important directories are the config volumes. Media itself should have its own backup strategy (or be considered replaceable). A simple cron job that runs tar czf /backup/mediastack-$(date +%F).tar.gz /opt/mediastack/*/config weekly gives you a restore point for all service configurations.

Troubleshooting the Stack

Build Your Media Stack Right

PlexBeam covers every layer of the Plex ecosystem, from deployment to monitoring to optimization.

Browse All Guides →

Related Articles

More from LuxuriousComputers: LuxuriousComputers · Computer Repair · Remote Fix · Phone Repair · HVAC · Plex Support