Plexamp Music Streaming with Raspberry Pi Zero

ElectronicsHardwareLinuxMedia CenterSelf Hosted

Written by:

I’ve been a Plex user for a very long while. They’ve recently put a lot of effort into the re-vamped Plexamp music player and it’s quickly become my primary means of listening to my music library. I wanted to be able to stream Plexamp to my hi-fi stereo the same way I do other music, and of course this is a problem that can be solved with a Raspberry Pi.

MATERIALS

This is stuff I had laying around in my electronics bin, any Pi with any type of soundcard (whether a hat or USB).


SETTING UP THE PI

First step to any Pi project, flash the latest version of Raspberry Pi OS (formerly known as Raspbian). I use Etcher to do this.

Before booting the Pi up I like to go ahead and configure it so I won’t have to connect it to a monitor.

Enable SSH by default by creating an empty file /boot/ssh

touch /boot/ssh

Then set up the WiFi connection by creating /boot/wpa_supplicant.conf with the following:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<Insert 2 letter ISO 3166-1 country code here>

network={
 ssid="<Name of your wireless LAN>"
 psk="<Password for your wireless LAN>"
}

Just fill out your WiFi information there at the bottom.

Now the Pi is ready to boot up. This step will be specific to your audio DAC or soundcard, but if you bought that same one I linked above you run it’s setup script:

sudo wget -O - script.raspiaudio.com | bash -

Reboot and test your DAC

speaker-test -l5 -c2 -t wav 

SETTING UP PLEXAMP

The official instructions for this are here on the Plex forums, but they’re a little dated.

The first problem is Plexamp depends on an outdated version of NodeJS 9.11.2, and this version is not available for the Pi Zero in the Debian repository. So we’re going to have to install it manually. The NodeJS archive of tarballs is here and for the Pi Zero we want ARM6L version.

wget https://nodejs.org/download/release/v9.11.2/node-v9.11.2-linux-armv6l.tar.gz

To install, extract it to /usr/local

sudo tar -C /usr/local --strip-components=1 -xzf node-v9.11.2-linux-armv6l.tar.gz

Now download Plexamp

wget https://files.plexapp.com/elan/Plexamp-v2.0.0-rPi-beta.2.tar.bz2

Unpack it

bunzip2 Plexamp-v2.0.0-rPi-beta.2.tar.bz2
tar -xvf Plexamp-v2.0.0-rPi-beta.2.tar

Open the plexamp.service file and change the ExecStart line to read /usr/local/bin/node instead of /usr/bin/node

Copy the service file and enable it

sudo cp /home/pi/plexamp/plexamp.service /lib/systemd/system/plexamp.service
sudo systemctl daemon-reload
sudo systemctl enable plexamp
sudo systemctl start plexamp
sudo systemctl status plexamp

You can now cast to your Plexamp from the Plex Web UI!

RELATED >>  My Node-Red Smart Alarm Clock with Snooze


I hope Plex continues to improve upon this beta – Plexamp has changed the way I listen to my music library. There is obviously a lot of demand for DIY audio streaming solutions – the number of projects dedicated to this exact problem – Volumio, Roon, Logitech Media Server, Mopidy, etc. etc – is huge. Plex is a great self hosted solution, but it needs more DIY solutions to make sure all that media can be streamed to all devices.


14 Replies to “Plexamp Music Streaming with Raspberry Pi Zero”

  1. Alain says:

    thx for this guide. I totally agree that plex could be a wonderfull all in one streaming solution now that plexamp exists. i hops it will be son possible to use also plexamp app to streamp to rpi plexamp

  2. Rui Oliveira says:

    Hi! Thx for your guide. Does plexamp actually work for you with the Zero W? I get a lot of pops&cracks that I don’t hear with shaiport-sync and raspotify.

  3. Rui says:

    I use a USB DAC.

  4. Paul says:

    Thanks, this is helpful. Howeever, I’m trying to get Plexamp up and running on a 3 B+, what would I need to change from the above to make it work?

  5. Scott M. Vinzant says:

    Nice write up but, I see in the “official” instructions, that you need to have a copy of “server.json” from a PlexAmp 1.x WIN or MAC install.
    I don’t see in your instructions you address that part of the setup. How does that get accomplished here? Am I missing something (probably) or is there a way around this issue?
    I am trying to make a headless RPi music streamer. Replace Sonos boxes, basically.
    Thanks!

  6. Richard says:

    Thanks, but I don’t understand one thing. At what point do you authenticate?

  7. Lee says:

    Thanks for this write-up and guide! I would like to have a headless Plexamp to stream to my outdoor patio hi-fi system. I’m looking to eliminate my phone being paired to bluetooth for Plexamp

  8. Lee says:

    Would this allow me to cast from the Plex webUI and then not be dependent on my phone for bluetooth pairing to amp anymore? In other words, remove my phone from the equation for streaming to my outdoor speakers with the Pi Zero physically connected to my amp?

  9. rog says:

    Can you use plexamp on your phone to cast to the plexamp running on the Pi outputting over USB?

  10. Johan Lundgren says:

    Thanks for the guide!

    I have installed Plexamp for Raspberry service on a Pi3, plus done the server.json file procedure.

    The plexamp service starts fine in Raspberry OS, and I can cast/connect to it with the Plexamp app. But when I click Play on a song, the the progress goes to 1 second, and then pauses. No actual sound is played.
    Playing the via the phone itself is no problem at all.

    Any suggestions?

  11. Carl says:

    I notice your guide doesn’t mention the server.json file that all the other guides seem to say is required. Is there some way you’ve gotten around the need for this file?

  12. ivan says:

    Hello,

    thank for this, i use your explanation to update to node 9.11.2. I had some problem with certificate since several day (certificate expired).

    Here is a solution for solving certificate issues : https://forums.plex.tv/t/plexamp-raspberry-pi-certificate-expired/747294/21

    It’s work for me with my Pi Zero W.

  13. ovizii says:

    Hey, apparently headless plexamp has many new versions so I was wondering if you guys are still using this old installations or are there new instructions to install on a RPI zero w?

Leave a Reply

Your email address will not be published. Required fields are marked *