Files
homelab/services/plex/docker-compose.yml
2026-09-13 17:00:56 +02:00

42 lines
1.2 KiB
YAML

services:
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
restart: unless-stopped
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- VERSION=docker
- PLEX_CLAIM=${PLEX_CLAIM}
volumes:
- plex_config:/config
- ${TV_PATH}:/media/tv:ro
- ${MOVIES_PATH}:/media/movies:ro
tmpfs:
- /transcode:size=4g
ports:
# Plex clients (Apple TV, mobile) don't use the Traefik domain — they connect
# directly to the addresses Plex advertises. These must be reachable on the LAN.
- "32400:32400" # main web UI + client connections
- "8324:8324" # Plex Companion
- "32469:32469" # DLNA
- "32410:32410/udp" # GDM local discovery
- "32412:32412/udp"
- "32413:32413/udp"
- "32414:32414/udp"
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.plex.rule=Host(`plex.home.jens.pub`)"
- "traefik.http.routers.plex.entrypoints=websecure"
- "traefik.http.services.plex.loadbalancer.server.port=32400"
volumes:
plex_config:
networks:
proxy:
external: true