Beginner's Docker Guide on Synology
Note
In case you have any difficulties following this guide or have found some errors, please leave a note on the forums. Thanks!
If you have a Synology NAS which can run Docker containers, you are in luck! Look here to check if your Synology NAS is able to run Docker containers.
This guide uses our "official" Docker image. Source and the dockerfile of the image can be found here.
Assumptions
In this guide the following assumptions apply:
- If you already have the Synology LMS packaged installed, uninstall it first. This will free up the LMS network ports so the container can use them.
- This docker container runs as your user. Note, you can also create a specific user for running the container, in that case replace the UID/PUID with the correct identifier.
- Your music is stored in the shared folder
music
. - (Optional) you have a shared folder called playlist where LMS can store playlists.
- Your user has read-only or read-write access to the music folder. If you also have a playlist folder, your user needs read-write access to this folder.
- The state of the docker image is saved in the folder
/docker/logitechmediaserver
. The path can be anything, but it is advisable to restrict write access for other users to this folder.
Find out the UID and GID of your user
The UID and GID values for the default user on Synlogy NAS are usually 1026 and 100. There is a very simple way to check the values as follows:
- Create a new Scheduled task as an User-defined script
- Name the script whatever you see fit
- Set it to be not repeating
- Set it to send run details to your email
-
Write the script:
id
-
Run it and soon enough, you will receive an email containing the UID and GID values.
Download the Docker image
- In the Synology GUI start up the app Container Manager.
- Go to Register.
- Search for
logitechmediaserver
and download thelmscommunity/logitechmediaserver
image. - Select the
latest
tag. The image will now download.
Configure the Docker container
Now the correct image has been downloaded, it is time to start and configure the container.
- In the "Container Manager" app, go to "Image", select the
lmscommunity/logitechmediaserver
image and press "Run". - Choose a suitable name, e.g.
logitechmediaserver
, and press "Next". -
In the "Port Settings" section, add the following ports :
Local port Container port Protocol 9000 9000 tcp 9090 9090 tcp 3483 3483 tcp 3483 3483 udp -
In the "Volume Settings" section, add the following volumes:
Local folder Container folder Mode /docker/logitechmediaserver /config rw /music /music ro /playlist /playlist rw -
Add the UID and GID from the step above, and the appropriate TZ (timezone) to the "Enviroment" section:
Variable Value PUID for example 1026
(see the UID/GID step above)PGID for example 100
(see the UID/GID step above)TZ for example Europe/Zurich
EXTRA_ARGS "--advertiseaddr=192.168.0.100"
(your Synology's IP address)Note
Please note that the
EXTRA_ARGS
entry is only required if you use the defaultbridge
networking mode. If you decide to expose all of the container's services to the local network using thehost
mode, then defining theadvertiseaddr
is not required. -
Select "Next" and "Done". The container will automatically start.
Configure LMS
- Launch your web browser (eg. Edge, Firefox) and type:
http://[hostname or ip address of your nas]:9000
. Then, press Enter. The Lyrion Music Server web interface will open. - Skip the MySqueezebox.com account credentials step (because the MySB.com service is shut down).
- Browse to your music folder location (
/music
), highlight the directory, and click "Next". - (Optional) browse to your playlists folder location (
/playlist
), highlight the directory, and click "Next". - You'll see the Summary page for your Lyrion Music Server install. Click "Finish" to complete the installation. Congrats, you're done!
Updating the Docker image
It is always advisable to regularly update your software, and with Docker on Synology it is made very easy.
- In the "Container Manager" app, go to "Image", and check if the
lmscommunity/logitechmediaserver
image has any updates available. - If there are updates, click "Update available" and press "Update" twice.
- Now the image is updated, refreshed and automatically restarted. If you followed the guide above all important data is saved and stored in Docker volumes, so this update will not overwrite anything in your configuration.
- Done, and enjoy all new features and fixes!
Note
If you use a different tag as latest
then Synology does not automatically check for updates. To update go to "Container" and stop the LMS container. Then go to "Registry", search the lmscommunity/logitechmediaserver
image and select the tag you are using. Once the updated image had been downloaded, go to "Container", select the LMS container and press "Reset". You get a warning that all data in the container will be lost, but that does not matter since all your configuration is in Docker volumes so you can press "Yes"! When that's done you can start the container again.