Skip to content

Instantly share code, notes, and snippets.

@spiro-c
Last active October 17, 2025 18:12
Show Gist options
  • Select an option

  • Save spiro-c/d882af6ee374fcb51bb61a3e02ce2e92 to your computer and use it in GitHub Desktop.

Select an option

Save spiro-c/d882af6ee374fcb51bb61a3e02ce2e92 to your computer and use it in GitHub Desktop.
Ledfx squeezelite docker-compose example

In the smae directory where the docker-compose.yml file is need to create config directory where LedFx config and log will be saved also there need to be crate pulse directory in this directory the pulsesocket will be saved so it can be shared with squeezelite create pulse-client-template.conf file in the same directory where the docker-compose.yml and inside put

# Connect to the host's server using the mounted UNIX socket
default-server = unix:/tmp/pulseaudio.socket

# Prevent a server running in the container
autospawn = no
daemon-binary = /bin/true

# Prevent the use of shared memory
enable-shm = false
services:
ledfx:
image: ghcr.io/ledfx/ledfx:latest
container_name: ledfx
restart: on-failure:3
network_mode: host
command: ["--offline", "--clear-effects"] #optional command line arguments passed to LedFx
#environment:
# - PULSECLIENTMODE=1 # Set to anything to use the PulseAudio client mode Ensure correct default source is set in host pulseaudio Eg using pactl set-default-source
volumes:
- type: bind
source: ./config # Path to LedFx configuration files
target: /home/ledfx/ledfx-config
- type: bind
source: ./pulse # Necessary when running in pulseaudio server mode. /path/to/ledfx/pulse should be with read write access for UID:GID=1000:1000
target: /home/ledfx/.config/pulse
sq-pulse:
image: giof71/squeezelite:daily-debian-pulse-squeezelite-current
container_name: sq-pulse
network_mode: host
depends_on:
ledfx:
condition: service_healthy #so that the pulseaudio socket is available before being mounted here
volumes:
# change only on the left side according to your uid
- type: bind
source: ./pulse # Necessary when running in pulseaudio server mode. /path/to/ledfx/pulse should be with read write access for UID:GID=1000:1000
target: /tmp
- type: bind
source: pulse-client-template.conf
target: /app/assets/pulse-client-template.conf
read_only: true
environment:
- PULSE_SERVER="unix:/tmp/pulseaudio.socket"
- PULSE_COOKIE="/tmp/cookie"
- SQUEEZELITE_MODE=PULSE
- PUID=1000 #optional, default is 1000
- PGID=1000 #optional, default is 1000
- SQUEEZELITE_NAME=sq-pulse #optional
# Connect to the host's server using the mounted UNIX socket
default-server = unix:/tmp/pulseaudio.socket
# Prevent a server running in the container
autospawn = no
daemon-binary = /bin/true
# Prevent the use of shared memory
enable-shm = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment