Using a bare-metals machine on Hetzner with Ubuntu 24.04 clean installation with Docker (+ Compose) installed only. A domain with proper DNS is mapped to the IP. When started I’m unable to claim the server regardless if I try to do it with an SSH tunnel or directly via web.
Here’s the docker compose file:
services:
traefik:
image: traefik:v3
container_name: traefik
restart: unless-stopped
ports:
- 443:443
- 127.0.0.1:8080:8080
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=******@gmail.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./letsencrypt:/letsencrypt"
plex:
ports:
- 32400:32400/tcp
- 8324:8324/tcp
- 32469:32469/tcp
- 1900:1900/udp
- 32410:32410/udp
- 32412:32412/udp
- 32413:32413/udp
- 32414:32414/udp
container_name: plex
image: plexinc/pms-docker:latest
restart: unless-stopped
environment:
- TZ=Europe/Berlin
- PLEX_CLAIM=claim-*****
- ADVERTISE_IP="https://plex.******.net:443/"
- HOSTNAME=hzPlex
depends_on:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.plex.rule=Host(`plex.******.net`)"
- "traefik.http.routers.plex.entrypoints=websecure"
- "traefik.http.routers.plex.tls.certresolver=myresolver"
- "traefik.http.services.plex.loadbalancer.server.port=32400"
volumes:
- ./plex/db:/config
- ./plex/tmp:/transcode
- ./data:/data
I try with a new claim code. I can open it with either https://plex.*****.net/web or http://localhost:8888 (SSH tunnel) and I will be greeted with the “not authorized” screen after login.
The server appears in the Plex app but it says it can’t reach it. It also appears in approved devices. I guess the app can’t reach it because it should be the 443 port, but I can’t reach the server to configure that.
Edit:
Output to Docker:
plex | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
plex | [s6-init] ensuring user provided files have correct perms...exited 0.
plex | [fix-attrs.d] applying ownership & permissions fixes...
plex | [fix-attrs.d] done.
plex | [cont-init.d] executing container initialization scripts...
plex | [cont-init.d] 40-plex-first-run: executing...
plex | Creating pref shell
plex | Attempting to obtain server token from claim token
plex | % Total % Received % Xferd Average Speed Time Time Time Current
plex | Dload Upload Total Spent Left Speed
100 8210 0 8210 0 0 34351 0 --:--:-- --:--:-- --:--:-- 34351
plex | Token obtained successfully
plex | Plex Media Server first run setup complete
plex | [cont-init.d] 40-plex-first-run: exited 0.
plex | [cont-init.d] 45-plex-hw-transcode-and-connected-tuner: executing...
plex | [cont-init.d] 45-plex-hw-transcode-and-connected-tuner: exited 0.
plex | [cont-init.d] 50-plex-update: executing...
plex | [cont-init.d] 50-plex-update: exited 0.
plex | [cont-init.d] done.
plex | [services.d] starting services
plex | Starting Plex Media Server.
plex | [services.d] done.
plex | Critical: libusb_init failed
Log attached.
Plex Media Server.log (1.2 MB)