Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syno:docker [2021/06/11 15:21] Bernard Condrausyno:docker [2025/10/21 13:22] (current) – removed Bernard Condrau
Line 1: Line 1:
-====== Docker on Synology DSM ====== 
-===== Logitech Media Server ===== 
-I installed Docker after Synology discontinued support for the Logitech Media Server (LMS). Synology supports Docker on Intel based NAS only, so you cannot resort to this solution on DS212+ and DS213+. To continue to use LMS on those platforms you must not upgrade to DSM7, and you must not upgrade Perl v5.24 to a newer version. If you do, the Logitech Media Server package will not start anymore. Remember to disable //auto-update// for the Perl package.\\ 
-\\ 
-The following guide explains how to install Docker and the latest Synology Media Server. 
-==== Installation ==== 
-  - Install Docker from the DSM Package Center 
-  - Open Docker, select //Registry//, and search for "lsm" 
-  - Choose // lmscommunity/logitechmediaserver// and download the image as //latest// or //stable// 
-  - SSH into your DSM and create folder //lsm// in /volume1/docker/ as user, not as root 
-  - Create the container from the command line<code> 
-sudo docker run \ 
---name logitech-media-server \ 
---restart=unless-stopped \ 
---net=host \ 
--v "/volume1/docker/lms":"/config":rw \ 
--v "/volume1/media/music/flac":"/music":rw \ 
--v "/volume1/media/music/Playlists":"/playlist":rw \ 
--v "/etc/localtime":"/etc/localtime":ro \ 
--e TZ=Asia/Bangkok \ 
--e HTTP_PORT=9002 \ 
--e PGID=100 \ 
--e PUID=1026 \ 
-lmscommunity/logitechmediaserver:[latest|stable]</code>Note that you must set all volumes initially to Read/Write permissions. Use HTTP_PORT=9002 to make the server run on the same port as the previous app, and to avoid conflicts with other apps on your NAS. PGID=100 means //users// and is the same for every DSM, but PUID=1026 must reflect your user ID which is used to save your music files on the NAS. Open /etc/passwd from the CLI and find the entry for your user name, which contains the user ID, the group ID, and the default shell run when opening a CLI, e.g.<code>user:x:1026:100::/var/services/homes/user:/bin/sh</code>Depending on your docker image download uses "latest" or "stable" without the square brackets. 
-  - Synology DSM uses ACL for permission management, which is not transferred to the container when the container is set up. To allow the user //squeezeboxserver// access to the media files you first need to login to the container's file system and change permissions like this<code>sudo docker exec -t -i logitech-media-server 
-chmod -R u+rws,g+rws /music 
-chmod -R u+rws,g+rws /playlist 
-exit</code>New media folders and files created after the container is setup will inherit permissions from the parent folders automatically. 
-  - Go back to DSM and stop the container "logitech-media-server", then //Edit// the container 
-    * Under //General Settings//, select //Enable auto-restart// 
-    * Under //General Settings//, select //Create shortcut on desktop// --> //Web page: http://<nowiki>//</nowiki>//neptun:9002// 
-    * Under //Volume//, select the /music path to mount as //Read-Only// 
-    * Check your settings under //Environment// 
-  - Start the container 
- 
-==== Settings of Logitech Media Server ==== 
-  - After the container is running Logitech Media Server will start scanning your music library. Check the logs as explained in //Trouble shooting// below if the library remains empty after the scan, or if not all folders are scanned into the library. 
-  - Enter "/playlist" in the Playlists Folder under //Basic Settings// if it's missing 
-  - Modify time and date settings under //Interface// 
- 
-==== Trouble shooting ==== 
-  * Check the logs in /volume1/docker/lms/logs 
-  * If you experience any trouble it might be helpful explore the file system within the container. Use the container name given when creating the container<code> 
-sudo docker exec -t -i logitech-media-server /bin/bash</code> 
-  * Check that user //squeezeboxserver// within the container has been assigned the same user ID as the the user ID you set when creating the container (e.g. 1026) 
- 
-==== Links ==== 
-  * [[https://linuxhint.com/run-docker-containers-synology-nas/|Running Docker Containers on Synology NAS]] 
-  * [[https://registry.hub.docker.com/r/lmscommunity/logitechmediaserver/|Logitech Media Server (Dockerfile)]] 
-  * [[https://forums.slimdevices.com/showthread.php?111876-LmsUpdate-and-LmsRepack-Synology-8-0-*-packages/page31&p=999039#post999039|Tutorial on Logitech Media Server using Docker container on Synology]] 
-  * [[https://forums.slimdevices.com/showthread.php?111828-Official-docker-container-for-LMS/page30&p=1001459#post1001459|Docker on Synology DSM 6.x suggestion (CLI)]] 
-  * [[https://stackoverflow.com/questions/20813486/exploring-docker-containers-file-system|Exploring Docker container's file system]] 
-  * [[https://docs.docker.com/engine/install/linux-postinstall/|Manage Docker as a non-root user]] 
-  * [[https://community.synology.com/enu/forum/17/post/102280|Connect to a docker container from outside the host (same network)]] 
-  * [[https://stackoverflow.com/questions/56825258/whats-the-difference-between-docker-bridge-and-host-modes|What's the difference between docker BRIDGE and HOST modes?]]