Headless Plex music player on Raspberry Pi with Plexamp
Update (2022–08–17): Headless version is now officially available 🎉. You could download it directly from https://plexamp.com and follow…
Headless Plex music player on Raspberry Pi with Plexamp
Update (2022–08–17): Headless version is now officially available 🎉. You could download it directly from https://plexamp.com and follow the official instruction here https://forums.plex.tv/t/plexamp-on-the-raspberry-pi/791500.
Introduction
Today I learned that Plexamp player is available for Raspberry Pi and could be run headlessly. Meaning you could have your Plexamp player running in the background of your Pi and use your Pi as music player (audio only!) and control it via Plexamp player on your computer or phone.
I could not find any well-structured instruction for making this happen so I am here to try writing one before I forget any of the process. Also, I encountered a few issues during the process so I would like to share how I resolve them with you. Hope you would find this useful :)
My Setup
You don’t have to have the exact same setup. Just sharing this for your reference.
- Raspberry Pi 4 model B (running Pi OS 64-bit)
- Topping E30 USB DAC
- A remote Plex media server
- Tidal subscription
Requirements
- Raspberry Pi that runs 64-bit Pi OS (4 model B in my case)
- MicroSD card
Step-by-step Guide
From here, I will assume you are starting from scratch and have a working computer on the side, a fresh Raspberry Pi and a microSD card.
[On your computer]
- Install Raspberry Pi Imager on your computer https://www.raspberrypi.com/software/
- Burn Pi OS (64-bit) to your MicroSD card
[On your Pi]
1 — Start up your Pi
2 — Download headless Plexamp
As of June 15 2022, headlesss Plexamp is not yet released. However, according to Plexamp v4.2.2’s release notes, you could download it using the link below.
$ cd ~
$ curl -O https://plexamp.plex.tv/headless/Plexamp-Linux-arm64-v4.2.2.tar.bz2
$ tar -xf Plexamp-Linux-arm64-v4.2.2.tar.bz2
Plexamp is now extracted and available at your home folder of your Pi.
3 — Install Node v12.22.4 via NVM
I couldn’t find which version of Node is require to run headless Plexamp on Pi anywhere but Elan (CTO & Co-Founder of Plex) mentioned that he was using Node v12.22.4 so I will be using the same here.
I strongly recommend to install Node with Node Version Manager (NVM) so we could switch between Node versions easily if needed. This seems like extra hassle but I assure you you won’t regret it and it is super easy!
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ nvm install 12.22.4
4 — Reboot / Relogin
To make sure Node is available in your terminal, it is better to reboot your Pi or relogin.
5 — Start headless Plexamp for the first time and enter claim code
cd ~/plexamp
node js/index.js
As soon as Plexamp is started, you should see something like this:
Starting Plexamp.
Please visit https://plex.tv/claim and enter the claim token:
Now, click on the link, sign in and copy the claim code on the screen over to your termnial.
6 — Sign in with your Plex account in headless Plexamp
Hit http://<ip.of.pi>:32500 and login again with your Plex account.
7 — Our first test!
At this point, you could start testing your headelss Plexamp by playing some music or control it from other Plexamp client (on your phone or computer).
8 — Finally, install Plexamp as service so it would start automatically on reboots.
Plexamp comes with a service file which you could use to easily install Plexamp as a service on your Pi. The file looks like this:
[Unit]
Description=Plexamp
After=network.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
This step could be a bit tricky if you 1) installed Node via NVM (our case) 2) use a different user name than “pi” on your Raspberry Pi. We will need to make a few amendments to the default service file.
If you installed Node via NVM (skip this step if this is not your case),
1 — Get the path of Node v12.22.4
Easiest way to do this is to run:
$ which node
2 — Update service file ~/plexamp/plexamp.service
[Unit]
Description=Plexamp
After=network.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/plexamp
ExecStart=/home/pi/.nvm/versions/node/v12.22.4/bin/node /home/pi/plexamp/js/index.js
Restart=on-failure
[Install]
WantedBy=multi-user.target
3 — Save & Done
If you use a different user name than “pi” on your Raspberry Pi (skip this if this is not your case),
1 — Find out your username
Run:
echo $USER
2 — Replease “pi” with your username above in the service file
[Unit]
Description=Plexamp
After=network.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/plexamp
ExecStart=/home/pi/.nvm/versions/node/v12.22.4/bin/node /home/pi/plexamp/js/index.js
Restart=on-failure
[Install]
WantedBy=multi-user.target
3 — Save & Done
Once your service file is ready to go, you could run the commands below to install Plexamp service.
cd ~/plexamp
sudo cp plexamp.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable plexamp.service
sudo systemctl start plexamp.service
Run
sudo systemctl status plexamp.service
to verify if it is running correctly.
Troubleshooting
When something doesn’t work properly, it is best to look at Plexamp’s log to identify the issue.
cat ~/.cache/Plexamp/log/Plexamp.log
Or use tail -f instead of catto see live updates of the log. It is particularly useful if the issue is related to playback / audio of Plexamp.
I use a USB DAC and Plexamp doesn’t play sound on it.
This is most likely your Pi is using its headphone jack as output device. Simply right click on the speaker icon and select your DAC as output device.
Plexamp is running properly but I am not able to connect with my other Plexamp client.
Whenever I click on the my Pi’s plexamp instance in the cast menu on my phone, I immediately get an error saying it could not connect to the instance.
This happened to me after a few hours after I set up my Plexamp. I still don’t know what causes the issue but I was able to find a workaround.
Simply hit http://<ip.of.pi>:32500/player/playback/stop and you should be able to connect again.
I was able to find this solution because the log told me it has problems returning its playback timeline so I guess resetting plexamp’s playback status by stopping it might help.
[Javascript] ERROR — HttpServer: 500 Internal Server Error (/player/timeline/poll): Cannot read property ‘forEach’ of undefined
at /home/pi/plexamp/js/index.js:2:807299
at Array.forEach (<anonymous>)
at /home/pi/plexamp/js/index.js:2:807171
...
A very last thing I would like to mention — I have encountered some problems regarding audio if I run Plexamp as service so I am just doing node ~/plexamp/js/index.js with screen command to have Plexamp running in the background for the time being.
Reference
A very informative thread on the Plex forum https://forums.plex.tv/t/future-of-plexamp-on-raspberry-pi/717577/149
Beta changelog https://forums.plex.tv/t/plexamp-on-the-raspberry-pi/791500/11
Plexamp Release Notes https://forums.plex.tv/t/plexamp-release-notes/221280/44
Installation Steps by Elan https://forums.plex.tv/t/future-of-plexamp-on-raspberry-pi/717577/161
메타데이터
- post_id
- c8ea4b717f1b
- slug
- headless-plex-music-player-on-raspberry-pi-with-plexamp-c8ea4b717f1b
- url
- https://medium.com/@myeung.dev/headless-plex-music-player-on-raspberry-pi-with-plexamp-c8ea4b717f1b
- canonical_url
- https://medium.com/@myeung.dev/headless-plex-music-player-on-raspberry-pi-with-plexamp-c8ea4b717f1b
- author_url
- https://medium.com/@myeung.dev
- status
- ok
- fetched_at
- 2026-07-24 23:17:10