Beginner's Docker Guide on QNAP
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 QNAP NAS which can run Docker containers aka. "Container Station", you are in luck!
If you're still running the QNAP AppCenter version of "LogitechMediaServer", you must know that it hasn't been updated since 2012 (v7.7.2). Upgrading using this method is recommended.
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:
- Your music is stored in the
Music
folder of yourMultimedia
share (/share/Multimedia/Music
). - The state of the docker image is saved in the folder
/share/Container/app-data/lms-config/
. The path can be anything, but it is advisable to restrict write access for other users to this folder. - (Optional) You have a shared folder where LMS can store playlists (i.e. :
/share/Multimedia/Playlists/LMS
). - (If applicable) You have disabled or uninstalled the "LogitechMediaServer" application installed via the QNAP AppCenter. This will free up the LMS network ports so the container can use them.
Add an LMS application to your Container Station
- Open "Container Station"
- Open the "Applications" tab
- Click "Create"
- Set an "Application name", i.e. "lms". It must be between 1 and 32 characters. Valid characters: letters (a-z), numbers (0-9), hyphen (-), underscore (_)
- Paste the Docker Compose configuration, adapting it to your needs :
version: '3.9' services: lms: image: lmscommunity/logitechmediaserver volumes: - /share/Container/app-data/lms-config/:/config:rw - /share/Multimedia/Music/:/music:ro - /share/Multimedia/Playlists/LMS/:/playlist:rw ports: - "9000:9000" - "9090:9090" - "3483:3483/udp" - "3483:3483/tcp"
- Click "Validate" to ensure your syntax is correct
- Click "Create"
- Once created you should see your nous application in the list
- By default, Container Station exposes only one port per application in a NAT configuration. As we need multi ports, we'll switch to "bridge mode" :
- Click you application in the list (i.e. "lms")
- You'll see one container running (usually something like "lms-lms-1")
- Click the action cog wheel "⚙️" at the right of the container, and select "Edit"
- Click the "Network" tab
- Delete de default network using the bin icon "🗑️"
- Click "Add" to create a new network
- Choose "Bridge", select the wanted interface
- (Optional) Set a staci IP address, by ticking "Use a static IP address" and filling Address, Mask, and Gateway
- Click "Connect" to add the Network
- Click "Apply" to update your container
- Take note of the IP address of your container
Open LMS
- Launch your web browser and type:
http://[ip address you noted previously]:9000
. Then, press Enter. The Lyrion Music Server web interface will open. - Configure LMS as desired
Updating the Docker image
It is always advisable to regularly update your software, and with Docker on Synology it is made very easy.
- Open "Container Station"
- Go to "Images" and click on the cog wheel "⚙️" next to "lmscommunity/logitechmediaserver".
- In the drop-down menu choose "Pull". It will download the latest version.
- Go to "Applications"
- Click the cog wheel next to the application (i.e. "lms"), and in the drop-down menu chose "Recreate"
- The application will be undeployed and recreated, but all configurations are kept as it is mounted in a bind volume
- ⚠️ You'll need to set the network configuration again, see step 9 of "Add an LMS application to your Container Station" section
- Done, and enjoy all new features and fixes!