Plexamp headless on a Rpi 3b, no audio out over HDMI

to switch to a user service, first stop/disable the current system service …

sudo systemctl stop plexamp.service
sudo systemctl disable plexamp.service

then modify/create a user service file …
(note, the following assumes pi for your username … change pi to a different username as needed in the steps below)

start with the plexamp.service file provided by Plex in the ~/plexamp directory, which should look something like this …

[Unit]
Description=Plexamp
After=network-online.target
Requires=network-online.target

[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/plexamp
ExecStart=/usr/bin/node /home/pi/plexamp/js/index.js
Restart=on-failure

[Install]
WantedBy=multi-user.target

create a copy of this file …
(create the destination directory first, if it doesn’t already exist)
cp ~/plexamp/plexamp.service ~/.config/systemd/user/plexamp.service

open the new file for editing …
nano ~/.config/systemd/user/plexamp.service

and after making changes, the file should look something like this …

[Unit]
Description=Plexamp
After=pulseaudio.service
Requires=pulseaudio.service

[Service]
Type=simple
WorkingDirectory=/home/pi/plexamp
ExecStart=/usr/bin/node /home/pi/plexamp/js/index.js
Restart=on-failure

[Install]
WantedBy=default.target

after editing, ctrl-X to save and exit the editor

now enable and start the user service …

systemctl --user daemon-reload
systemctl --user enable plexamp.service
systemctl --user start plexamp.service

Plexamp should now be running as a user service … sound should now work when you select pulseaudio server as the audio device in the web UI <hostname>:32500

2 Likes