I am a complete noob, using silverblue. I don’t know much at all about the commands however through some research and trial and error i managed to (partially, i think) install plexmediaserver, but with the information from limited sources online i just can’t seem to do it without errors. right now im trying to put it in a toolbox however after downloading i get error messages again. please help me
Silverblue is one of the atomic versions.
I am using Workstation.
Your command installed plex into a toolbox, which implies that the entire media library should also be in that toolbox.
I installed plex on the host using dnf and have never had issues. It requires that the plexmediaserver.service be running and enabled to start at boot time.
$ systemctl status plexmediaserver | cat
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf, 50-keep-warm.conf
Active: active (running) since Mon 2024-11-18 18:46:35 CST; 2 weeks 2 days ago
Invocation: 7ae554f8a6dd4759a9e5fc209a865c9a
Process: 1569 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)
Main PID: 1579 (Plex Media Serv)
Tasks: 99 (limit: 38221)
Memory: 13.3G (peak: 16.9G)
CPU: 2h 3min 9.135s
CGroup: /system.slice/plexmediaserver.service
├─1579 "/usr/lib/plexmediaserver/Plex Media Server"
├─1671 "Plex Plug-in [com.plexapp.system]" /usr/lib/plexmediaserver/Resources/Plug-ins-871adbd44/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.32.7.7621-871adbd44 /usr/lib/plexmediaserver/Resources/Plug-ins-871adbd44/System.bundle
├─1801 "/usr/lib/plexmediaserver/Plex DLNA Server"
└─1803 "/usr/lib/plexmediaserver/Plex Tuner Service" /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.32.7.7621-871adbd44 32600
Could you instead install plex on the host by layering it using rpm-ostree and run it that way?
thanks so much for your reply! i believe i tried to do as you told me, and your explanation made it a bit clearer! however i still get an error doing it this way, however it is much different. it then tells me to use the journalctl for information however it does not work? i feel like i am closer however it is still giving an error
I have not tried one of the atomic variants so cannot assist further.
As I stated it works well on the standard Workstation version.
You have two options:
- Install it in a toolbox and then start it from there. It won’t be using systemd.
- Build (or find) a container image with it and run it on your system via podman.
In you first screenshot, it looks like the installation went fine. It could not start the service but that’s expected as there is no systemd instance running inside the toolbox.
You should be able to start the service manually from there.
You second attempt is about layering on the system and that can fail for a lot of reasons if the RPMs are not packaged correctly and require investigation.
I would recommend installing this with rpm-ostree, especially since it includes a systemd service.
sudo rpm-ostree install plexmediaserver
and then reboot.
It looks like you’ve tried this but ran into a problem with a scriptlet.
Can you give us the output of rpm -qlp --scripts --triggers /var/home/noe/Downloads/plexmediaserver*.rpm
in a pre or code formatted block?
There’s also another option. If you’re familiar with nix, it appears to be packaged there so you could setup the nix package manager on Silverblue and try that way.
noe@fedora:~$ rpm -qlp --scripts --triggers /var/home/noe/Downloads/plexmediaserver*.rpm
warning: /var/home/noe/Downloads/plexmediaserver-1.41.2.9200-c6bbc1b53.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 3adca79d: NOKEY
preinstall scriptlet (using /bin/sh):
# Make sure this system is systemd-based. If not, stop here and fail with error code 1.
if [ "$(cat /proc/1/comm)" != "systemd" ]; then
echo "Plex Media Server requires systemd. Please upgrade the Operating Sytem version"
exit 1
fi
# Add group 'plex' if not already present on system.
if [ $(cat /etc/group | grep ^plex | wc -l) -eq 0 ]; then
groupadd plex
fi
# Add user 'plex' if not already present on system.
if [ $(cat /etc/passwd | grep ^plex: | wc -l) -eq 0 ]; then
useradd -d /var/lib/plexmediaserver -c "RPM Created PlexUser" -g plex --system -s /sbin/nologin plex
fi
# Add user 'plex' to 'video' group if not added already.
# Presume User and Group to be 'plex' and 'video'.
PUSER=plex
VGROUP=video
NORUN=0
# Pre-existing systemd service and unit override location.
OVERRIDE=/etc/systemd/system/plexmediaserver.service.d/override.conf
OLDSERVICE=/etc/systemd/system/plexmediaserver.service
# If the user added a username override, check for it instead of defaulting to user 'plex'.
if [ -f $OVERRIDE ]; then
if [ "$(grep "^User=" $OVERRIDE|wc -l)" = "1" ]; then
PUSER="$(grep User $OVERRIDE|cut -d= -f2)"
fi
elif [ -f $OLDSERVICE ]; then
if [ "$(grep "^User=" $OLDSERVICE|wc -l)" = "1" ]; then
PUSER="$(grep User $OLDSERVICE|cut -d= -f2)"
fi
fi
# If the default group for video devices isn't 'video', switch to that group.
if [ -f /dev/dri/renderD128 ]; then
if [ "$(stat --format=%G /dev/dri/renderD128)" != "root" ]; then
VGROUP="$(stat --format=%G /dev/dri/renderD128)"
else
NORUN=1
fi
elif [ -f /dev/fb0 ]; then
if [ "$(stat --format=%G /dev/fb0)" != "root" ]; then
VGROUP="$(stat --format=%G /dev/fb0)"
else
NORUN=1
fi
elif [ -f /dev/video0 ]; then
if [ "$(stat --format=%G /dev/video0)" != "root" ]; then
VGROUP="$(stat --format=%G /dev/video0)"
else
NORUN=1
fi
fi
if [ "${NORUN}" != "1" ]; then
if [ "$(getent group ${VGROUP}|grep -c ${VGROUP})" != "0" ]; then
if [ "$(groups ${PUSER}|grep -c ${VGROUP})" = "0" ]; then
usermod -a -G ${VGROUP} ${PUSER}
fi
fi
fi
# Check if this an upgrade to an existing PMS installation.
if [ "$1" = "2" ]; then
# Quietly remove status flag incase previous installation was aborted.
rm -f /tmp/.plexmediaserver.install.tmp
# As this is an upgrade, obtain PMS running status and save it until %post.
systemctl status plexmediaserver | grep 'Active: active' >/dev/null
if [ $? -eq 0 ]; then
touch /tmp/.plexmediaserver.install.tmp
fi
# Stop PMS.
systemctl stop plexmediaserver
fi
exit 0
postinstall scriptlet (using /bin/sh):
# Create default PMS library directory for user 'plex' if it doesn't exist.
if [ ! -d /var/lib/plexmediaserver ]; then
mkdir /var/lib/plexmediaserver
chown plex:plex /var/lib/plexmediaserver
fi
# Add PMS SELinux policy file if SELinux is present and not disabled.
if [[ -f /usr/sbin/getenforce && ! $(/usr/sbin/getenforce | grep -i Disabled) ]]; then
semodule -i /usr/lib/plexmediaserver/plexrsync.pp
fi
case "$1" in
1) # Inital installation.
# Inform systemd to reload and pick up the new service file.
systemctl daemon-reload
# Enable (by default) for auto start with reboot, then start.
systemctl enable plexmediaserver
systemctl start plexmediaserver
;;
2) # Upgrade installation.
# Inform systemd to reload and pick up any changes to service file.
systemctl daemon-reload
sleep 2
# Restore previous run state.
if [ -f /tmp/.plexmediaserver.install.tmp ]; then
systemctl start plexmediaserver
rm -f /tmp/.plexmediaserver.install.tmp
fi
;;
esac
# If udev is installed, check for tv butler rules file and create if needed.
if [[ -d /lib/udev/rules.d && ! -f /lib/udev/rules.d/60-tv-butler-perms.rules ]]; then
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="0100", GROUP="video", MODE="0664"' > /lib/udev/rules.d/60-tv-butler-perms.rules
fi
exit 0
preuninstall scriptlet (using /bin/sh):
# Only stop PMS if we're going to uninstall it completely. ($1=1 during upgrade)
if [ "$1" = "0" ]; then
# Stop PMS and wait for it to die.
systemctl stop plexmediaserver
sleep 3
fi
exit 0
postuninstall scriptlet (using /bin/sh):
# If uninstalling PMS and SELinux module is loaded, remove it.
if [ "$1" = "0" ]; then
if [ -f /usr/sbin/semodule ]; then
if [ $(semodule -l |grep plexrsync| wc -l) -gt 0 ]; then
semodule -r plexrsync
fi
fi
fi
i hope i did that correctly. i want to say thanks again for the help, i will attempt the nix option, installing with sudo rpm-ostree ends in errors too sadly.
I happen to have a fresh Silverblue install here and the systemd check at the beginning of the preinstall script is failing which doesn’t immediately make sense to me because cat /proc/1/comm
returns systemd
. This check will also fail for toolbox environments. This is a fixable thing in the RPM spec, if it were a Fedora packaged thing, but unfortunately, you’re at the mercy of Plex for this one.
A quick look through past discussions on this has shown that others ended up running plex server in podman.