[Tutorial] How to install UMS in Docker
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
[Tutorial] How to install UMS in Docker
Here is a tutorial on how I installed UMS in Docker on Ubuntu 22.04 at the time of this posting. Full disclosure I'm a newbie at linux and docker. However, even if you are experienced there a several pitfalls that need to be overcome.
For reference I used this post as a starting point that explained some of the issues.
viewtopic.php?t=12922&sid=174b29121adbb ... a12759b2c7
Basically the current UMS Docker image has several issues that we must work around.
Let's go!
First you need to find that network interface of the host computer that you will be installing UMS on. This will be typically your wifi or lan interface. WARNING!!!!! If you install UMS when you are on Wifi than plug your computer into a LAN port (or visa versa) you will have to make changes to your UMS.config file and restart your container.
Step 1:
Use the following command in terminal to find your current network interface. Make note of it for later.
Step 2:
Create a folder where you want install UMS
Step 3:
Create a docker-compose.xml file and place the below code into it and save in the UMS directory that you created in Step 2.
Step 4:
Edit your docker-compose.xml file. Change the path for the /profile to your where you placed your ums folder. All add all of the paths to your media here. The Docker UMS GUI has issues of browsing and finding media paths. The "MediaX" folders can be named anything you want. (For ex. Music, Movies, etc)
Step 5:
In terminal, navigate to your ums folder where you put the docker-compose.xml file.
Run the command
When finished docker UMS should be up and running but WAIT!!!!!!!! There is more configuration to do. There now should be a UMS.conf file in your ums folder.
Step 6:
Edit the UMS.conf file and add the line below. Insert your network interface name from Step 1 and save file.
network_interface=<insert your network interface name>
Step 7:
Restart the UMS Docker container.
Step 8:
Open up a browser window and navigate to http://localhost:9001 to view the UMS GUI
Step 9:
Create your login info
Step 10:
Using the menu bar (upper right corner) navigate to Shared Content
Step 11:
Delete the two default directories.
Step 12:
Add your Media folders that you mapped in your docker-compose.xml file.
Step 13:
Use UMS as normal. Scan your media and you should be good to go!
Good luck!
For reference I used this post as a starting point that explained some of the issues.
viewtopic.php?t=12922&sid=174b29121adbb ... a12759b2c7
Basically the current UMS Docker image has several issues that we must work around.
Let's go!
First you need to find that network interface of the host computer that you will be installing UMS on. This will be typically your wifi or lan interface. WARNING!!!!! If you install UMS when you are on Wifi than plug your computer into a LAN port (or visa versa) you will have to make changes to your UMS.config file and restart your container.
Step 1:
Use the following command in terminal to find your current network interface. Make note of it for later.
Code: Select all
ip route get 1.1.1.1 |grep -oP 'dev\s+\K[^ ]+'
Step 2:
Create a folder where you want install UMS
Step 3:
Create a docker-compose.xml file and place the below code into it and save in the UMS directory that you created in Step 2.
Code: Select all
version: '3.7'
services:
universalmediaserver:
image: universalmediaserver/ums
container_name: UMS
network_mode: host
environment:
- UMS_PROFILE=/profile
volumes:
- /path/to/your/ums folder/UMS.conf:/profile
- /path/to/media1/:/Media1:ro
- /path/to/media2/:/Media2:ro
restart: 'unless-stopped'
Step 4:
Edit your docker-compose.xml file. Change the path for the /profile to your where you placed your ums folder. All add all of the paths to your media here. The Docker UMS GUI has issues of browsing and finding media paths. The "MediaX" folders can be named anything you want. (For ex. Music, Movies, etc)
Step 5:
In terminal, navigate to your ums folder where you put the docker-compose.xml file.
Run the command
Code: Select all
docker compose up -d
Step 6:
Edit the UMS.conf file and add the line below. Insert your network interface name from Step 1 and save file.
network_interface=<insert your network interface name>
Step 7:
Restart the UMS Docker container.
Step 8:
Open up a browser window and navigate to http://localhost:9001 to view the UMS GUI
Step 9:
Create your login info
Step 10:
Using the menu bar (upper right corner) navigate to Shared Content
Step 11:
Delete the two default directories.
Step 12:
Add your Media folders that you mapped in your docker-compose.xml file.
Step 13:
Use UMS as normal. Scan your media and you should be good to go!
Good luck!
-
- Posts: 1
- Joined: Sun Jan 07, 2024 3:16 am
Re: [Tutorial] How to install UMS in Docker
Thanks mrfatboy for the tutorial. I allowed me to set up UMS quickly on a Debian Bookworm basis. Here is an update of the instructions with some corrections (XML -> YML) and some additions.
Step 1:
Install Docker. See https://docs.docker.com/engine/install/debian/
Step 2:
Create a directory to store the configuration files for Docker and UMS:
Note: these paths are reasonable defaults, but they can be changed freely.
Step 3:
Create the file /srv/ums/app/docker-compose.yml with the following content. We will tweak it in the next step.
Step 4:
Adapt the paths in the docker-compose.yml file:
Step 5:
Start UMS as container:
Docker will download the required images and UMS will start in the background. But WAIT! There is more configuration to do.
Step 6:
Retrieve the main network interface of your system:
Edit the file /srv/ums/app/profile/UMS.conf, which has just been created by UMS, and add the following line at the bottom. Replace <placeholder> by your actual network interface name.
network_interface=<placeholder>
Note: setting NETWORK_INTERFACE in docker-compose.yaml does not work, hence this step.
Step 7:
Restart the UMS Docker container:
Step 8:
Open http://<hostname>:9001 in a browser to view the UMS GUI. If you work locally, you might use http://localhost:9001
Step 9:
Create the first user. You can pick the name and password freely.
Step 10:
Using the menu bar (upper right corner), navigate to "Shared Content"
Step 11:
Delete the two default directories.
Step 12:
Add the directories that you mapped in your docker-compose.yml file (/container/pathX in the example above).
Step 13:
Scan your media
Step 14:
Restart the system to check if UMS starts automatically:
To update UMS, later on:
Step 1:
Install Docker. See https://docs.docker.com/engine/install/debian/
Step 2:
Create a directory to store the configuration files for Docker and UMS:
Code: Select all
sudo mkdir -p /srv/ums/app
sudo mkdir -p /srv/ums/app/profile
Step 3:
Create the file /srv/ums/app/docker-compose.yml with the following content. We will tweak it in the next step.
Code: Select all
version: '3.7'
services:
universalmediaserver:
image: universalmediaserver/ums
container_name: UMS
network_mode: host
environment:
- UMS_PROFILE=/profile
volumes:
- /srv/ums/app/profile:/profile
- /host/pathX:/container/pathX:ro
restart: 'unless-stopped'
Adapt the paths in the docker-compose.yml file:
- /host/pathX is the root directory of media files on the host, for instance "/srv/ums/data".
- /container/pathX is where it will be mapped within the container. You can choose it freely. We will make UMS aware of it later using the web interface (Step 12).
Step 5:
Start UMS as container:
Code: Select all
cd /srv/ums/app
sudo docker compose up -d
Step 6:
Retrieve the main network interface of your system:
Code: Select all
ip route get 1.1.1.1 |grep -oP 'dev\s+\K[^ ]+'
network_interface=<placeholder>
Note: setting NETWORK_INTERFACE in docker-compose.yaml does not work, hence this step.
Step 7:
Restart the UMS Docker container:
Code: Select all
cd /srv/ums/app
sudo docker compose down && sudo docker compose up -d
Open http://<hostname>:9001 in a browser to view the UMS GUI. If you work locally, you might use http://localhost:9001
Step 9:
Create the first user. You can pick the name and password freely.
Step 10:
Using the menu bar (upper right corner), navigate to "Shared Content"
Step 11:
Delete the two default directories.
Step 12:
Add the directories that you mapped in your docker-compose.yml file (/container/pathX in the example above).
Step 13:
Scan your media
Step 14:
Restart the system to check if UMS starts automatically:
Code: Select all
sudo reboot
Code: Select all
cd /srv/ums/app
sudo docker compose stop
sudo docker compose rm -f
sudo docker compose pull
sudo docker compose up -d
Re: [Tutorial] How to install UMS in Docker
Thanks that will be a great help.
I curious what are the default directories in the shared folders in step 11?
I have seen problems with how people set up their shared folders by including their Home folder and the UMS installation folder.
I suspect that these are the default for some reason, if they are then could be changed in the Github repository.
I curious what are the default directories in the shared folders in step 11?
I have seen problems with how people set up their shared folders by including their Home folder and the UMS installation folder.
I suspect that these are the default for some reason, if they are then could be changed in the Github repository.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Re: [Tutorial] How to install UMS in Docker
Yes it would be great to get any updates contributed via GitHub so we can improve it for everyone. I think none of the core devs are using UMS via Docker, so we rely on third-party contributions
-
- Posts: 29
- Joined: Tue Apr 19, 2022 10:12 pm
Re: [Tutorial] How to install UMS in Docker
I've been running UMS on my PC for a while, and it's great - much better and simpler than the rest of the bloatware out there. Mostly used for audio, but may also extend its use to video files too...
I have a Synology NAS (423+) running DSM 7.2.2 and have been experimenting with getting UMS to run on that. The Synology-provided "Media Server" is very good, and works fine, except there are no cover art or folder graphics until you get to the level of individual FLAC or MP3 files. The lack of pretty graphics is not strictly necessary, but it would be nice to have my NAS provide a similar pretty look to how UMS runs in my PC!
So, I am using Synology's "Container Manager" which is a docker manager, which doesn't need quite as much faffing around as many Linux dockers do. I am able to set up, run and configure UMS from within the NAS, but cannot figure out how to make UMS 'visible' on my LAN to renderers. I am sure it's to do with the internal networking structure of docker containers, and somehow not routing between my LAN and the container. I honestly have done tons of searching and testing all sorts of weird "fixes" but nothing works.... I am sure there will be other small issues (ums.conf, maybe) that I will also have play with, but first, I have to sort out basic visibility to various renderers....
I am therefore asking if anyone has any pointers for systems using Docker Container and UMS for these problems?
I have a Synology NAS (423+) running DSM 7.2.2 and have been experimenting with getting UMS to run on that. The Synology-provided "Media Server" is very good, and works fine, except there are no cover art or folder graphics until you get to the level of individual FLAC or MP3 files. The lack of pretty graphics is not strictly necessary, but it would be nice to have my NAS provide a similar pretty look to how UMS runs in my PC!
So, I am using Synology's "Container Manager" which is a docker manager, which doesn't need quite as much faffing around as many Linux dockers do. I am able to set up, run and configure UMS from within the NAS, but cannot figure out how to make UMS 'visible' on my LAN to renderers. I am sure it's to do with the internal networking structure of docker containers, and somehow not routing between my LAN and the container. I honestly have done tons of searching and testing all sorts of weird "fixes" but nothing works.... I am sure there will be other small issues (ums.conf, maybe) that I will also have play with, but first, I have to sort out basic visibility to various renderers....
I am therefore asking if anyone has any pointers for systems using Docker Container and UMS for these problems?