Help getting Plexamp Headless to run under different user

As the subject says, I’m trying to get plexamp headless running with a different user, specifically hoping to get it to run with the user plex. which is already installed since PMS is running on the same machine.

I can get it to run with my user account by modifying the systemd, but if I run it as plex it doesn’t work. Currently running on ubuntu server 22.04.1 headless.

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

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

[Install]
WantedBy=multi-user.target

again, everything runs fine if I try and run it with my user account.

Let me know if I can provide any further details.

UPDATE:
Never fails, as soon as I post something I figure it out, I needed to do the initial setup as the plex user to claim the token.

sudo runuser -u plex node js/index.js

Once that was done, everything worked fine!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.