Plex Media Server on Void Linux
Posted by Dave Eddy on Nov 15 2021 - tags: techHow to install Plex on Void
Download plex-install-manager
from:
https://github.com/bahamas10/plex-install-manager
Install deps:
xbps-install -S binutils tar curl xz
Create user and directories needed:
useradd -s /bin/false -d /var/empty _plex
mkdir /opt/plex /opt/plex/src /opt/plex/data
chown _plex:_plex /opt/plex/data
Install Plex:
./plex-install-manager -a -d /opt/plex/src
Verify Plex installed:
$ ls -lh /opt/plex/src
total 2.0K
lrwxrwxrwx 1 root root 43 Nov 15 02:44 active -> plexmediaserver_1.24.5.5173-8dcc73a59_amd64/
drwxr-xr-x 4 root root 4 Nov 15 02:44 plexmediaserver_1.24.5.5173-8dcc73a59_amd64/
Create Plex service:
mkdir /etc/sv/plex
vim /etc/sv/plex/run
#!/usr/bin/env bash
# label=Plex Media Serever
exec 2>&1
cd '/opt/plex/src/active/root/usr/lib/plexmediaserver' || exit 1
export PLEX_MEDIA_SERVER_HOME=/opt/plex/src/active/root/usr/lib/plexmediaserver
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/opt/plex/data
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
exec chpst -u _plex:_plex ./Plex\ Media\ Server
ln -s /etc/sv/plex /var/service/plex
How to upgrade
To upgrade plex you simply need to run the following commands:
./plex-install-manager -a -d /opt/plex/src
sv restart plex