Plex
Generated on 3 Sep 2026 from the Plex catalog page
Plex Media Server 1-Click Application
Deploy Plex Media Server on DigitalOcean and stream your personal video, music, and photo library to nearly any device. This 1-Click installs the official Plex Docker image with Caddy (automatic TLS), firewall rules, and helper scripts for day-to-day management.
What is Plex Media Server?
Plex organizes your personal media and streams it to phones, tablets, smart TVs, streaming sticks, and browsers. With your own Plex server you keep control of your files while using official Plex clients everywhere.
Key Features
- Official
plexinc/pms-dockercontainer - HTTPS gated behind a setup-pending page until the server is claimed (prevents public claim takeover)
- After claim: HTTPS via Caddy (Let’s Encrypt shortlived TLS) + direct access on port 32400
- Media storage at
/opt/plex/media - Systemd service and start/stop/restart/update/claim/status helpers
- UFW firewall pre-configured for SSH, HTTP, HTTPS, and Plex
- fail2ban for SSH protection
System Components
- Ubuntu 24.04 LTS
- Plex Media Server (
plexinc/pms-docker) - Docker and Docker Compose
- Caddy reverse proxy with Let’s Encrypt
- UFW firewall
- fail2ban
System Requirements
Plex benefits from CPU for transcoding and disk space for your library. Suggested sizes:
| Use case | RAM | CPU | Recommended Droplet |
|---|---|---|---|
| Light / small library | 4GB | 2CPU | s-2vcpu-4gb |
| Medium library / light transcoding | 8GB | 4CPU | s-4vcpu-8gb |
| Large library / frequent transcoding | 16GB+ | 8CPU | s-8vcpu-16gb |
Minimum recommended: 4 GB RAM. Attach Block Storage if your media library is large.
Software Included
| Package | Version | License |
|---|---|---|
| Ubuntu | 24.04 | |
| Docker Compose | 29.1.3 | |
| Caddy | 2.11.4 | Apache License 2.0 |
| fail2ban | 5.4.1 | GNU General Public License version 2.0 |
Creating an App using the Control Panel
Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.
Creating an App using the API
In addition to creating a Droplet from the Plex 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB Plex Droplet in the SFO2 region, you can use the following curl command. You need to either save your API access token to an environment variable or substitute it in the command below.
curl -X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$TOKEN'' -d \
'{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image":"plex"}' \
"https://api.digitalocean.com/v2/droplets"Getting Started After Deploying Plex
-
Deploy this 1-Click from the DigitalOcean Marketplace (4 GB RAM or larger).
-
Wait 2–5 minutes after the Droplet becomes active for first-boot setup.
-
Claim the server (required — HTTPS proxy stays gated until claim):
Visit
https://YOUR_DROPLET_IPto see claim instructions.Option A — SSH tunnel
From your laptop:
ssh -L 8888:127.0.0.1:32400 root@YOUR_DROPLET_IPOpen
http://localhost:8888/web, sign in, and finish setup. Then unlock HTTPS:sudo /opt/enable-plex-proxy.shOption B — Claim token
Open https://www.plex.tv/claim, copy the token, then on the Droplet:
/opt/claim-plex.sh claim-XXXXXXXXThis claims the server and enables HTTPS automatically. Then open
https://YOUR_DROPLET_IP. -
Enable remote access in Plex settings and set public port
32400. -
Upload media to
/opt/plex/mediaand add libraries in the Plex UI (folder/data).
Custom domain (HTTPS)
After claim, point your domain’s A record at the Droplet, then run:
sudo /opt/setup-plex-domain.shUpload media example
mkdir -p /opt/plex/media/movies
scp example_video.mp4 root@YOUR_DROPLET_IP:/opt/plex/media/movies/Then add a Movies library pointed at /data/movies in the Plex UI (container path for /opt/plex/media).
Optional Block Storage
mkdir -p /opt/plex/media/volume
mount /dev/disk/by-id/scsi-0DO_Volume_YOUR_VOLUME /opt/plex/media/volume
echo "/dev/disk/by-id/scsi-0DO_Volume_YOUR_VOLUME /opt/plex/media/volume ext4 defaults,nofail,discard 0 0" >> /etc/fstab
docker restart plexService Management
| Action | Command |
|---|---|
| Start | /opt/start-plex.sh or systemctl start plex |
| Stop | /opt/stop-plex.sh or systemctl stop plex |
| Restart | /opt/restart-plex.sh or systemctl restart plex |
| Update | /opt/update-plex.sh |
| Claim | /opt/claim-plex.sh <token> |
| Unlock HTTPS | /opt/enable-plex-proxy.sh (after SSH-tunnel claim; verifies PlexOnlineToken, use --force to override) |
| Status | /opt/status-plex.sh (checks Docker container health) |
| Domain TLS | /opt/setup-plex-domain.sh (after claim) |
| Logs | docker compose -f /opt/plex/docker-compose.yml logs -f |
Note:
plex.serviceis a oneshot unit that starts Docker Compose. Prefer/opt/status-plex.shoversystemctl is-active plexto confirm the container is still healthy.
Software Included
| Software | Description |
|---|---|
| Plex Media Server | Streams personal media to Plex clients |
| Caddy | Reverse proxy with automatic Let’s Encrypt TLS on 80/443 |
| Docker | Runs the official Plex container |
| UFW | Firewall with ports 22, 80, 443, and 32400 open |
| fail2ban | Protects SSH from brute-force attempts |
Important Ports
| Port | Purpose |
|---|---|
| 22/tcp | SSH |
| 80/tcp | HTTP (Caddy; redirects/ACME) |
| 443/tcp | HTTPS web UI via Caddy |
| 32400/tcp | Direct Plex access / remote streaming (localhost-only until claim; opened by /opt/enable-plex-proxy.sh) |
Only 32400/tcp is published from the container for remote access MVP. Extra Plex discovery ports (DLNA / GDM UDP such as 1900, 32410–32414) are not exposed by default; enable them only if you need LAN discovery features.