justifiably / docker-logitechmediaserver

Docker image for Logitech Media Server (Squeezebox, Slim)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker Container for Logitech Media Server

Please note: there is now an official LMS community supported Docker image here. I encourage you to switch to using that one.

Docker image for Logitech Media Server (aka SqueezeCenter, SqueezeboxServer, SlimServer).

Runs as non-root user, installs useful dependencies, sets a locale, exposes ports needed for various plugins and server discovery and allows editing of config files like convert.conf.

Newer versions of Logitech Media Server support updates in place. To recreate this container I keep a tag of the latest version build in the working directory. To update that:

make update

To build the image:

make build

See Github network for other authors (JingleManSweep, map7, joev000).

Works well with my MusicIP container. See below if you run MusicIP on another host or want to avoid running with net=host.

Running the server

You need a hardware or software player to connect to the server, see pointers below.

Minimal run example:

docker run --net=host -v <audio-dir>:/mnt/music justifiably/logitechmediaserver

Then:

  • Visit the server and configure it from http://localhost:9000
  • Skip the mysqueezebox.com configuration if you want a local-only solution
  • Select /mnt/music and /mnt/playlists as your music and playlist folders
  • If you mainly use streaming services, several are available in the Plugins tab
  • Recommended: the modern Material skin, activate the plugin and select it on Interface tab

Here is a more complex run example, putting the process in background, mapping the server and player ports only and mounting volumes for music and state:

docker run -d -p 9000:9000 -p 3483:3483 -p 3483:3483/udp -v <local-state-dir>:/mnt/state -v <playlist-dir>:/mnt/playlists -v <audio-dir>:/mnt/music justifiably/logitechmediaserver

The music volume mount allows you to map an external directory already loaded with music. The state volume mount allows you to persist the state between different server containers. This is useful if you want to play with plugins, or edit convert.conf to tweak transcoding settings.

Using Docker Compose

See the sample docker-compose.yml. Edit the volume settings appropriately, run as usual by:

docker-compose up -d

Port forwarding for MusicIP

I've added an install of socat (careful) so that MusicIP can be run on another machine. Logitech Media Server assumes MusicIP is running on the same host so this seems the best solution (replacing previous attempt to patch the code). Set the environment variable to to port-forward to a named host or IP:

MUSICIP_HOST=musicip.mynetwork

(of course the instance of MusicIP needs to return paths that make sense to the local server as well).

Pointers

Most help and up to date information is available on the excellent forums: https://forums.slimdevices.com

About

Docker image for Logitech Media Server (Squeezebox, Slim)

License:MIT License


Languages

Language:Shell 44.6%Language:Dockerfile 37.8%Language:Makefile 17.6%