Using a Raspberry Pi as a Plexamp Headless player has worked very well for me. It allows me to have a dedicated audio streamer for my personal music library and streaming from Tidal, and the Pi has a DAC attached for a clear, high quality analog output that plugs directly into my stereo or amplifier.
As someone who likes to tinker and experiment with my stereo setup, though, I’ve run onto a problem; each time I power down my Rapsberry Pi and power it back up again, I have to open up terminal on my laptop and manually re-start Plexamp again.
That’s not fun at all when I’m re-arranging my listening room, or moving the Pi streamer to another setup altogether.
Luckily, it only takes a few simple terminal commands to ensure that Plexamp launches automatically each time you power on your Raspberry Pi.
This guide assumes you already have Plexamp installed and you’re able to launch the Plexamp player and use it as an endpoint to stream music from your Plex Library or Tidal integration.
If you don’t already have Plexamp installed and running you should check out our full guide to Install Headless Plexamp for your Raspberry Pi to create a Plex endpoint.
Tools and Supplies
Here is a list of tools and equipment that you should have on hand before you begin this project:
Terminal or another CLI tool
Most personal computers come with a Command-line interface (CLI) tool built-in. I typically use the Terminal application built into my Mac, but there are plenty of other options out there.
A Raspberry Pi that is already running Plexamp
Plexamp is an add-on to your Plex Media Server. There are both free and paid premium versions of the Plexamp software, but Plexamp headless requires a Plex Pass.
This post assumes you are already using Plexamp in a Headless configuration with your Raspberry Pi.
Launch Terminal or another CLI tool
You can use other Command-line interface (CLI) tools for this. I prefer Terminal because it’s built-in to my Mac and is pretty lightweight and distraction free.
Use SSH to log into your Raspberry Pi
If you’re following our Complete Guide to creating a Headless Plex Server with Plexamp endpoints using a Raspberry Pi you should already be familiar with how to SSH into your Raspberry Pi, but if you need a refresh you can visit the guide How To SSH or Secure Shell into your Raspberry Pi
On your computer launch your command-line interface app (Terminal, in my case) and enter the following command, where username is the SSH username and hostname is the hostname you created in Raspberry Pi Imager:
Then hit Enter and follow the prompts as you normally would.
Check your Username settings
By default the Plexamp package assumes the username is going to be pi, so that’s what’s been added to the plexamp.service file. If you’ve set up your Raspberry Pi with the Username pi, you can probably skip to the next step. Otherwise, if you have a different username, you may run into some issues getting Plexamp to run at start up.
If you don’t know your username, enter the following command in terminal:
Hit Enter and you’ll see your username listed.
If the username is pi, you can skip the rest of this step. Otherwise, open the plexamp.service file with the following terminal command:
Scroll down to the line that says User=pi and update that to the username you set up in Raspberry Pi Imager and used to SSH into the Raspberry Pi.
You may also need to update the path in WorkingDirectory, and in ExecStart. Anywhere that pi is used will probably need to be replaced with your own system username.
NOTE: Some Operating Systems may require a different filepath to be used in plexamp.service.
- If you’re using DietPi you may need to remove the /home directory (see this comment)
Check if you're using Node Version Manager
With some recent changes to the way that Node is installed, some users have had to rely on Node Version Manager (NVM) to ensure they are installing the correct version of Node (Plexamp uses Node 16).
Using NVM could mean that your Node path will need to be updated.
Check if you’re using NVM with the following Terminal command:
If you see a version number returned, you’re probably using NVM to install Node 16
Check your Node version with the following command:
Now, open the plexamp service file and update the Node path.
You’ll want to change this line:
To this, instead:
NOTE: This assumes you’re using our guide to Install Headless Plexamp for your Raspberry Pi to create a Plex endpoint, in which case v16.20.2 is the correct Node version. If your version is different then you should replace that part of the line.
Also, remember to use your actual username ( in this example the username is pi )
Enable Plexamp to start automatically
Now, let’s configure your Raspberry Pi to automatically launch Plexamp on start-up. Navigate into the plexamp folder with the following command:
Then run through these 4 commands in Terminal:
sudo cp plexamp.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable plexamp
sudo systemctl start plexamp
Reboot the Raspberry Pi
Reboot your Raspberry Pi with the following command:
Give the Raspberry Pi a minute to reboot. If everything went according to plan you should now see your new Plexamp client in the list of available devices without having to manually launch the player.
You can also access your Headless Plexamp in your web browser by visiting the following url:
Remember to replace the IP address from this example with your Raspberry Pi’s own IP address.
You can find the IP address for your Raspberry Pi by entering this command in Terminal:
Learn how to update Headless Plexamp to get the latest Plexamp features
Now that you’ve enabled your Headless Plexamp player to start automatically when you power on your Raspberry Pi, it will be useful to learn how to keep your Headless Plexamp Player up to date.
I’ve written a separate guide that will walk you through that process here: How to enable updates for Headless Plexamp on Raspberry Pi – get the latest Plexamp features