lmscommunity/lyrionmusicserver
The LMS Community's Docker image for Lyrion Music Server (Dockerfile). This formerly was known as logitechmediaserver
.
latest
: the latest release version, currently v9.0.1stable
: the bug fix branch based on the latest release, currently v9.0.2dev
: the development version, with new features, and potentially less stability, currently v9.1.0Run:
docker run -it \
-v "<somewhere>":"/config":rw \
-v "<somewhere>":"/music":ro \
-v "<somewhere>":"/playlist":rw \
-v "/etc/localtime":"/etc/localtime":ro \
-v "/etc/timezone":"/etc/timezone":ro \
-p 9000:9000/tcp \
-p 9090:9090/tcp \
-p 3483:3483/tcp \
-p 3483:3483/udp \
lmscommunity/lyrionmusicserver
Please note that both the http port 9000 and the cli port 9090 must always be mapped 1:1. You can't just map it like -p 9002:9000
, as Lyrion Music Server is telling players on which port to connect. The cli port can be updated after you deploy the container via the Lyrion web ui settings page under advanced/command line interface(CLI) to match your updated 1:1 mapping. However, if you have to use a different http port for LMS (other than 9000) you'll have to set the HTTP_PORT
environment variable, too:
docker run -it \
-v "<somewhere>":"/config":rw \
-v "<somewhere>":"/music":ro \
-v "<somewhere>":"/playlist":rw \
-v "/etc/localtime":"/etc/localtime":ro \
-v "/etc/timezone":"/etc/timezone":ro \
-p 9002:9002/tcp \
-p 9090:9090/tcp \
-p 3483:3483/tcp \
-p 3483:3483/udp \
-e HTTP_PORT=9002 \
lmscommunity/lyrionmusicserver
Docker compose:
version: '3'
services:
lms:
container_name: lms
image: lmscommunity/lyrionmusicserver
volumes:
- /<somewhere>:/config:rw
- /<somewhere>:/music:ro
- /<somewhere>:/playlist:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
ports:
- 9000:9000/tcp
- 9090:9090/tcp
- 3483:3483/tcp
- 3483:3483/udp
environment:
- HTTP_PORT=9000
restart: always
By default, the server will use the container id as its name, you can set it to something else by providing a hostname.
For docker run
add:
-h my-preferred-hostname
or for docker compose
add (at the same level as container_name
):
hostname: my-preferred-hostname
You can specify the user and group id to use:
For docker run
add:
-e PUID=1000 \
-e PGID=1000
For docker compose
add:
environment:
- PUID=1000
- PGID=1000
/etc/localtime
or /etc/timezone
Some systems wouldn't allow you to map volumes outside specific folders, eg. Unraid. In many of these cases you can define your timezone using an environment variable:
-e TZ=Europe/Zurich
/etc/TZ
instead of /etc/timezone
host
mode to automatically expose LMS on your network, or add another variable EXTRA_ARGS
with the value "--advertiseaddr=192.168.0.100"
(where you'd put your NAS' IP address) - see below for details.If you're a developer you might want to install plugins manually, before they are available through LMS' built-in plugin manager. In order to do so, put them inside [config folder]/cache/Plugins
, then restart LMS. They should be available in thereafter.
Starting with v8.4 an optional EXTRA_ARGS
environment variable exists for passing additional arguments to Lyrion Music Server process. For example, disabling the web interface could be achieved with EXTRA_ARGS="--noweb"
.
Some plugins like eg. the Sounds & Effects, require the player to know the server's IP address. In the default bridge
networking mode, the internal IP address would be different from what the player can see. Therefore playback would fail - unless we tell Lyrion Music Server what port to announce. This can be done using the above method to define the --advertiseaddr
parameter (do not put quotes around the parameter!):
docker run -it \
-v "<somewhere>":"/config":rw \
-v "<somewhere>":"/music":ro \
-v "<somewhere>":"/playlist":rw \
-v "/etc/localtime":"/etc/localtime":ro \
-v "/etc/timezone":"/etc/timezone":ro \
-p 9000:9000/tcp \
-p 9090:9090/tcp \
-p 3483:3483/tcp \
-p 3483:3483/udp \
-e EXTRA_ARGS=--advertiseaddr=192.168.0.100 \
lmscommunity/lyrionmusicserver
You can put a script called custom-init.sh
in the configuration folder. If that script exists, it will be executed before Lyrion Music Server is launched. This would allow you to add additional software packages to the container. Eg. the following two lines put into custom-init.sh
will install ffmpeg
for use with some plugins:
apt-get update -qq
apt-get install --no-install-recommends -qy ffmpeg
docker pull lmscommunity/lyrionmusicserver