Lyrionmusicserver Docker Image
LMS社区提供的Lyrion Music Server官方Docker镜像,前身是logitechmediaserver,用于搭建音乐服务器,支持音乐播放、管理和流媒体服务。
lyrionmusicserver
The https://github.com/LMS-Community's Docker image for https://github.com/LMS-Community/slimserver/ (https://github.com/LMS-Community/slimserver-platforms/tree/HEAD/Docker). This formerly was known as logitechmediaserver.
Tags
latest: the latest release version, currently v9.1.1stable: the https://github.com/LMS-Community/slimserver/tree/public/9.1 based on the latest release, currently v9.1.2dev: the https://github.com/LMS-Community/slimserver/, with new features, and potentially less stability, currently v9.2.0
Installation
Run:
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
Advanced configuration notes
If you can't map to /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
Docker on Synology
- use
/etc/TZinstead of/etc/timezone - you'll likely have to use another port than 9000. Synology traditionally used port 9002 to run Lyrion Music Server on. See above note about mapping ports to make sure this is working as expected!
- you should either use
hostmode to automatically expose LMS on your network, or add another variableEXTRA_ARGSwith the value"--advertiseaddr=192.168.0.100"(where you'd put your NAS' IP address) - see below for details.
How to manually install plugins
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.
Passing additional launch arguments
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".
Define the service's IP address
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
Using the Local Player Plugin inside your Container
NOTE: This requires audio hardware installed on the host machine which means this is unlikely to work on most NAS solutions like Synology or QNAP.
To use the Local Player plugin you need to specify an audio device to use:
For docker run add:
--device /dev/snd \
For docker compose add:
devices: - /dev/snd:/dev/snd
Running a script before the launch of Lyrion Music Server (v8.2.0+)
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
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 lyrionmusicserver 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务