Snapserver integration with Librespot and /tmp/fifo not writable


I hope I’m in the right place… Been trying to get Snapserver working with Librespot (for connecting to Spotify) … I’m using portainer to host the Snapserver process and I installed Librespot in the container (not sure this is the best way, but it seems to work)

The issue I am running into is (afaik) Snapserver by default streams to /tmp/fifo (as a file location) - there are a few threads on this online - this is an example

but I can’t find a solution :sweat_smile: … I would imagine it’s possible to tell Snapserver to use a different location of the temporary fifo file. But I haven’t found a setting…

It seems this is a popular setup … using Librespot with Snapserver and a Snapclient to control music via HASS… I’m happy to scrap this who strategy and migrate to a different one… if someone has a guide I can follow, that would be helpful too…

Appreciate anyone’s thoughts here.

I am using snapserver and opted to using the tcp server setup as I had lots of problems using the fifo file.

I had issues with the FIFO too.
It seems that when snapserver creates the FIFO, then it is not created correctly as the right type.
I had to recreate it with a startup script, so it was there when snapserver wanted to use it.

Thanks for responding - mind linking me a doc or description of how you did this if you know of one - or even your configuration … it would really help me :pray:t4:

I use a portainer stack so here is the stack I use for TCP.

# Working with TCP Server 2022-08-21
version: '3.3'
    # Snapcast Server 
        restart: unless-stopped
        container_name: snapserver
            - TZ=america/toronto
            - /home/pcwii/docker/multiroom/snapfifo:/tmp/snapcast                         #Shared Fifo Volume **Not used for TCP***
            - /home/pcwii/docker/multiroom/snapcast/snapserver.conf:/etc/snapserver.conf  #Snapcast Configuration
            - 1704:1704
            - 1705:1705
            - 1780:1780
            - 4953:4953                                                         # Required for TCP Server Connection
            ipv4_address:                                              # Create Predictable IP Address for TCP Connection
        image: ivdata/snapserver:latest
    # Mopidy Server
        restart: unless-stopped
        container_name: mopidy
            - TZ=america/toronto
            - /home/pcwii/docker/multiroom/snapfifo:/tmp/snapcast/               #Shared Fifo Volume **Not used for TCP***
            - /mnt/storage/Media/Music/:/media:ro                                #Music Library
            - /home/pcwii/docker/multiroom/mopidy/data:/var/lib/mopidy
            - /home/pcwii/docker/multiroom/mopidy/:/home/mopidy/.config/mopidy   #Mopidy Configuration
            - 6600:6600
            - 6680:6680
            - 6681:6681
            ipv4_address:                                              # Create Predictable IP Address for TCP Connection
        image: ivdata/mopidy:latest

# Network Configuration is required so the Mopidy and SnapServer can be on the same lan for TCP connection
    driver: bridge
       - subnet:

As far as my mopidy config. I have added this

# Host is the snapServer Container IP Address
# mopidy is client device
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! tcpclientsink host= port=4953

my snapserver.conf contains this.

# Receives Stream from Docker Mopidy Instance
source = tcp://

Good Luck, Be interested to know how you make out.

Hey thank you!

That worked… with the power of hindsight… the docker image is different to the one I was using… obviously there are lots out there :slight_smile:

My next challenge is how to get a single controller on the dashboard to allow me to choose the source of audio going to the various media players. I’ve connected the Sonos multizone amp and can control turning on/off the zones and volume etc. But that uses one card. Then I have to go to the spotify card to choose the content.

I really want a single card that I can select both the zone and the media playing on it… maybe that’s not how it works? I guess a card per zone is fine too as long as it had a drop down that allowed me to pick the media. I need to do more learning on how the automation stuff works, total noob here.

Glad it’s working. I have a drop down to select my Playlist but I don’t use Spotify or anything. All my speakers currently playing the same Playlist source but I am pretty sure what you want is possible.