Installing Plex Media Server on Daphile (Gentoo/OpenRC)


TL;DR – On Daphile beta you get SSH, so you can shell in, grab the latest
.deb
from Plex’s site, unpack it withar
, drop it into/opt
, add an OpenRC init script (escape those spaces), and stream away. Future upgrades are the same dance in fast-forward.
Prerequisites – SSH into Daphile
Step | Note |
1. Upgrade to a Daphile beta build | Stable releases have SSH disabled. Grab the latest beta ISO/IMG from https://www.daphile.com/firmware/ and update (Settings → System → Install/Upgrade). |
2. Log in | ssh root@<daphile-ip> (default password: zaq ). |
1 . Prepare your toolbox
emerge --sync # refresh Portage
emerge --ask binutils # provides `ar` for .deb extraction
Already have
ar
? Check withwhich ar
; skip the emerge if it’s present.
2. Fetch the current Plex package
Browse to https://www.plex.tv/media-server-downloads.
Choose Plex Media Server → Linux → Ubuntu (16.04+) / Debian.
Copy the direct download link (it ends in
.deb
).wget "<paste-url>"
on your Daphile box – or:
PLEX_DEB_URL="https://downloads.plex.tv/plex-media-server-new/<version>/debian/plexmediaserver_<version>_amd64.deb"
wget "$PLEX_DEB_URL"
(Replace <version>
with whatever Plex lists today.)
3. Crack open the .deb
ar x plexmediaserver_*.deb # → control.tar.xz data.tar.xz debian-binary
tar -xvf data.tar.xz # unpacks usr/lib/plexmediaserver/
4. Relocate Plex to /opt
mv usr/lib/plexmediaserver /opt/
Why /opt
? Vendor code stays out of /usr
and won’t clash with Gentoo packages.
5. Create an OpenRC service
nano /etc/init.d/plexmediaserver
#!/sbin/openrc-run
description="Plex Media Server"
command="/opt/plexmediaserver/Plex\ Media\ Server" # escape spaces!
pidfile="/var/run/plexmediaserver.pid"
command_background="yes"
depend() {
need net
}
chmod +x /etc/init.d/plexmediaserver
6. Enable & start Plex
rc-update add plexmediaserver default # autostart on boot
rc-service plexmediaserver start # launch now
Verify:
rc-service plexmediaserver status
7. First-run wizard
Open:
http://<daphile-ip>:32400/web
Sign in (or create) your Plex account.
Name your server.
Add libraries, wait for indexing, stream!
Upgrading Plex later
Stop the service
rc-service plexmediaserver stop
Back up (optional but smart)
tar -czf /root/plex_backup_$(date +%F).tar.gz /opt/plexmediaserver
Download the new
.deb
Repeat the “Fetch” step with the new URL.Extract & overwrite
ar x plexmediaserver_<new>.deb tar -xvf data.tar.xz rsync -a usr/lib/plexmediaserver/ /opt/plexmediaserver/
Start Plex
rc-service plexmediaserver start
Troubleshooting
Problem | Fix |
start-stop-daemon: /opt/plexmediaserver/Plex does not exist | Check the path and ensure spaces are escaped in the init script. |
ar: command not found | emerge --ask binutils (or ensure /usr/bin/ar exists). |
No UI on port 32400 | Confirm the service is running (rc-service plexmediaserver status -v ); check firewall settings. |
Subscribe to my newsletter
Read articles from Amir Yurista directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
