Hardened Debian 13 (trixie) runtime wrapper for Plex Media Server (no proprietary binaries).
2.8K
A hardened, multi-arch Debian 13 (trixie-slim) runtime-installer wrapper for Plex Media Server with tini PID 1, SHA-1 verified startup package retrieval directly from plex.tv, non-root daemon execution (plex, UID/GID 1000:1000), and drop-in compatibility with plexinc/pms-docker, maintained by Daniel G. Cosenza from FNX Labs.
dgcosenza/plexghcr.io/dgcosenza/plex (identical signed multi-arch digest)dgcosenza/plex-dockerProprietary — fetched directly by end users at runtime, not bundled)Licensing & Redistribution Notice: Plex Media Server is proprietary software governed by the Plex Terms of Service, which prohibits third-party redistribution of Plex binaries. This image contains zero proprietary Plex binaries. At container startup,
/initfetches the official Debian package directly fromdownloads.plex.tv, verifies its SHA-1 checksum against the officialplex.tvmanifest, caches it in/config/.pms-deb-cache, installs it locally in the running container, and launches Plex Media Server as the non-rootplexuser.
| Component | Resolved Version |
|---|---|
| Wrapper Base OS | Debian 13.8 (trixie-slim) |
| Smoke-Tested PMS Release (runtime-fetched) | 1.43.5.11079-b3b13e506 |
| Proprietary Binaries in Published Image | None (0) |
| Architectures | linux/amd64, linux/arm64 |
| Uncompressed size (per arch) | amd64: 45.6 MB, arm64: 147.3 MB |
| Last verified build (UTC) | 2026-11-28 |
| Published multi-arch digest | dgcosenza/plex@sha256:8087ac2ba8657b1d311e36feb4642c6b4bc5c8a0eb12335e44b3cdc36a08ad81 |
| GHCR mirror | ghcr.io/dgcosenza/plex@sha256:8087ac2ba8657b1d311e36feb4642c6b4bc5c8a0eb12335e44b3cdc36a08ad81 |
| Supply chain | Cosign OIDC signed + SPDX & CycloneDX SBOM attestations + SLSA Build L3 provenance |
| Security gate (Trivy + Grype on SBOM) | 0 fixable findings of any severity (23 upstream-unfixed) |
Recent upstream changes:
1.43.5.11079-b3b13e506 -> 1.43.5.11079-b3b13e506no1.43.5.11079-b3b13e506 (SHA-1 a0a0b8fa92aeea65128af07b7c6cffc994ab8795). Note: binary is downloaded and verif...Identical multi-arch OCI digests are published to Docker Hub (dgcosenza/plex) and GHCR (ghcr.io/dgcosenza/plex), accompanied by an automated signed GitHub Release:
| Tag | Policy | Description |
|---|---|---|
<pms-version>-<YYYYMMDD> (e.g. 1.43.5.11079-20261125) | Immutable | Date-stamped daily wrapper build tested against the listed public PMS release. |
sha-<short> | Immutable | Packaging repository Git commit tag. |
<pms-version> (e.g. 1.43.5.11079) | Moving | Latest verified wrapper build tested against that public PMS release. |
latest | Moving | Latest verified daily Debian 13 runtime wrapper build. |
Production pinning: Pin by immutable registry digest rather than an unpinned moving tag:
image: dgcosenza/plex:latest@sha256:<digest>
# or via GitHub Container Registry (identical digest):
image: ghcr.io/dgcosenza/plex:latest@sha256:<digest>
| Architecture | Status | Verification |
|---|---|---|
linux/amd64 | Published & natively tested | Built, verified zero proprietary binaries, end-to-end smoke-tested with live amd64 .deb download/SHA-1 verify + /identity HTTP 200, Dive-gated, Syft/Trivy/Grype-scanned, and Cosign-signed on native x86_64 CI runners. |
linux/arm64 | Published & natively tested | Built, verified zero proprietary binaries, end-to-end smoke-tested with live arm64 .deb download/SHA-1 verify + /identity HTTP 200, Dive-gated, Syft/Trivy/Grype-scanned, and Cosign-signed on native ARM64 CI runners. |
docker run -d --name plex \
--cap-drop ALL \
--cap-add SETUID \
--cap-add SETGID \
--cap-add CHOWN \
--cap-add FOWNER \
--cap-add DAC_OVERRIDE \
--security-opt no-new-privileges:true \
--network host \
-e TZ=UTC \
-e PLEX_UID=1000 \
-e PLEX_GID=1000 \
-v ./config:/config/Library/Application\ Support/Plex\ Media\ Server \
-v ./tmp:/tmp \
-v ./media:/media:ro \
dgcosenza/plex:latest
See docker-compose.example.yml:
services:
plex:
image: dgcosenza/plex:latest
restart: unless-stopped
cap_drop:
- ALL
cap_add:
- SETUID
- SETGID
- CHOWN
- FOWNER
- DAC_OVERRIDE
security_opt:
- no-new-privileges:true
network_mode: host
environment:
- TZ=UTC
- PLEX_UID=1000
- PLEX_GID=1000
- CHANGE_CONFIG_DIR_OWNERSHIP=true
volumes:
- ./config:/config/Library/Application Support/Plex Media Server
- ./tmp:/tmp
- ./media:/media:ro
healthcheck:
test: ["CMD-SHELL", "/healthcheck.sh || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 3m
| Variable | Description | Default |
|---|---|---|
VERSION | public (latest public release), plexpass / beta (requires PLEX_TOKEN), or docker (skip download if already installed) | public |
PLEX_UID / PLEX_GID | UID/GID used to run Plex Media Server and own /config | 1000 / 1000 |
CHANGE_CONFIG_DIR_OWNERSHIP | Set to false to skip chown on /config and /transcode | true |
PLEX_TOKEN | Optional Plex Pass token for plexpass channel lookups | — |
ADVERTISE_IP | Custom server connection URLs written to Preferences.xml | — |
ALLOWED_NETWORKS | Networks allowed without auth in Preferences.xml | — |
TZ | Container timezone | UTC |
| Path / Port | Purpose |
|---|---|
/config | Plex configuration root (also caches the verified .deb under /config/.pms-deb-cache) |
/config/Library/Application Support/Plex Media Server | Existing PMS database, metadata, and Preferences.xml |
/transcode | Temporary transcode scratch directory |
/media | Media libraries (mount :ro where possible) |
32400/tcp | Primary Plex Media Server HTTP/HTTPS port |
8324/tcp, 32469/tcp, 1900/udp, 32410-32414/udp | Optional discovery / DLNA / GDM ports |
/init runs briefly as root solely to install the SHA-1 verified Debian .deb into /usr/lib/plexmediaserver and apply optional ownership adjustments, then drops privileges via setpriv to non-root plex (UID/GID 1000:1000) before execing Plex Media Server.
/healthcheck.sh
Probes http://127.0.0.1:32400/identity via curl -q (ignoring any user ~/.curlrc inside /config).
plexinc/pms-docker/config/Library/Application Support/Plex Media Server/Plug-in Support/Databases) before switching./config/Library/Application Support/Plex Media Server, /tmp, /media/*), network_mode: host, and /healthcheck.sh unchanged.plex.tv and downloads.plex.tv on startup so the official Debian .deb can be downloaded and SHA-1 verified.image: to dgcosenza/plex:latest@sha256:<digest> (or GHCR), and run docker compose up -d plex.Every published digest (multi-arch index and per-architecture manifests) on both Docker Hub and GHCR is keyless-signed with Sigstore Cosign (GitHub OIDC), attested with SPDX and CycloneDX SBOMs, and backed by SLSA Build L3 provenance (actions/attest-build-provenance).
cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/plex-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/plex:latest
# Or against Docker Hub (identical digest):
cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/plex-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
dgcosenza/plex:latest
cosign verify-attestation \
--type spdxjson \
--certificate-identity-regexp="^https://github\.com/dgcosenza/plex-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/plex@sha256:<arch-digest>
gh attestation verify oci://ghcr.io/dgcosenza/plex:latest --owner dgcosenza
--ignore-unfixed gate) and Grype scanning the SPDX SBOM (--only-fixed --fail-on negligible), and enforces a Dive efficiency gate (>= 95%)..deb downloads are strictly verified against the official SHA-1 checksum published in https://plex.tv/api/downloads/5.json before dpkg -i.Plex Media Server runs as unprivileged plex (1000:1000), compatible with no-new-privileges:true.renovate.json) pins base image digests and GitHub Action commit SHAs; Dependabot security alerts and OpenSSF Scorecard monitoring are enabled.SECURITY.md for responsible disclosure.docker buildx build --platform linux/amd64 --load -t dgcosenza/plex:local .
.github/workflows/daily.yml runs automatically every day at 05:47 UTC, on pushes to main, on pull requests (verification only), and via workflow_dispatch:
https://plex.tv/api/downloads/5.json for the latest public Debian PMS metadata and resolves the latest debian:trixie-slim digest, emitting upstream-changes.md.debian:trixie-slim wrapper natively on linux/amd64 and linux/arm64 runners with --no-cache on schedule and apt-get upgrade.tests/smoke.sh natively on both architectures (verifying zero baked binaries, live SHA-1 verified .deb install, UID 1000 startup, /identity HTTP 200 XML, and negative healthcheck), enforces the Dive efficiency gate (>= 95%), generates Syft SPDX + CycloneDX SBOMs per arch, and gates publication on 0 fixable findings of any severity in both Trivy and Grype (scanning the SPDX SBOM).ghcr.io/dgcosenza/plex) and mirrors the identical digest to Docker Hub (dgcosenza/plex) with tags latest, <version>, <version>-<YYYYMMDD>, and sha-<short>; signs every digest and attaches SPDX/CycloneDX SBOM attestations via Cosign keyless OIDC; emits SLSA Build L3 provenance; and publishes a signed GitHub Release with checksums and SBOMs.versions.json, the README Current Versions block, and a dated CHANGELOG.md entry via github-actions[bot] ([skip ci], validated by public-check.sh), then syncs the Docker Hub overview and short description.ci-failure on any main or scheduled failure, and auto-closes it on the next green run.plexmediaserver binaries in a public third-party image violates Plex's Terms of Service. Keeping the published image strictly open-source Debian 13 + MIT wrapper scripts respects upstream licensing while providing a patched Debian 13 runtime and daily smoke verification against live plex.tv releases.tini + setpriv instead of S6 overlay v2: Eliminates legacy S6 v2 binaries and stale Ubuntu 24.04 layers while staying compatible with no-new-privileges:true and clean SIGTERM propagation.DL3008 ignore: Daily --no-cache security rebuilds intentionally pull the newest Debian 13 security updates via apt-get.highestUserWastedPercent: 0.25: Overall image efficiency remains strictly gated at >= 95%. Because the wrapper installs only tiny runtime utilities (~25 MB delta), daily apt-get -y upgrade overwrites (~5 MB of base layer files) represent ~20% of user bytes while keeping total image efficiency >95%.This repository follows a clear packaging-vs-upstream license split:
packaging: MIT): Licensed under the MIT License — copyright Daniel G. Cosenza from FNX Labs.upstream: Proprietary-ToS): Proprietary software governed by the Plex Terms of Service. No Plex binaries are included or redistributed in this image; end users fetch the official package directly from plex.tv at container startup.Full third-party notices for Debian 13 open-source packages are maintained in THIRD-PARTY-NOTICES.md. Release history is maintained in CHANGELOG.md.
Maintained by Daniel G. Cosenza from FNX Labs.
Content type
Image
Digest
sha256:8087ac2ba…
Size
43.5 MB
Last updated
about 12 hours ago
docker pull dgcosenza/plex