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
Re: Docker
~/.config/UMS/UMS.conf (Only change network_interface to correspond with the one on host)
I tested today and this works for me. I can browse media on my LG TV. Hope this helps.
Code: Select all
folders = /media
network_interface = wlp2s0
Code: Select all
docker pull universalmediaserver/ums
docker run -it -p 5002:5002 -p 9001:9001 -v ~/Music:/media -v ~/.config:/root/.config --network=host universalmediaserver/ums
-
- Posts: 2
- Joined: Sun Apr 04, 2021 12:46 pm
Re: Docker
Additional bonus:
If you want the UMS webserver, which listens on 9001 by default, to run via HTTPS, do this:
OPTION 1: Generate a self-signed certificate
Run this command:
Move the resulting UMS.jks file to the profile directory
OPTION 2: Generate a certificate from your own PKI
Generate a certificate signed by your CA and export it as a .p12 PKCS#12 format file [UMS.p12]
Run this command to convert the .p12 PKCS#12 file to a .jks Java keystore format file [UMS.jks]
NOTE: the filename must be UMS.jks and the password must be umsums
Move UMS.jks to the profile directory
Delete UMS.p12 (optional)
Final steps
Edit UMS.conf and set:
If you want the UMS webserver, which listens on 9001 by default, to run via HTTPS, do this:
OPTION 1: Generate a self-signed certificate
Run this command:
Code: Select all
keytool -genkey -keystore UMS.jks -alias UMS -keyalg RSA -sigalg SHA256withRSA -validity 365000 -keysize 2048 -storepass umsums
OPTION 2: Generate a certificate from your own PKI
Generate a certificate signed by your CA and export it as a .p12 PKCS#12 format file [UMS.p12]
Run this command to convert the .p12 PKCS#12 file to a .jks Java keystore format file [UMS.jks]
Code: Select all
keytool -importkeystore -deststorepass umsums -destkeystore UMS.jks -srckeystore ums.p12 -srcstoretype PKCS12
Move UMS.jks to the profile directory
Delete UMS.p12 (optional)
Final steps
Edit UMS.conf and set:
Code: Select all
web_https = true
Re: Docker
Would you be interested in helping us document the Docker options? If so I can invite you to https://support.universalmediaserver.com/
Re: Docker
I have greatly appreciated the prior posts in this thread. They helped me get UMS working. That said, as an inexperienced linux/docker user I still struggled. I have it working now and thought I'd add my 2 cents in case it helps anyone else.
I'm running this on Raspberry Pi OS lite - 64 bit because I have not been able to find one that works with 32 bit/armhf (https://downloads.raspberrypi.org/raspi ... 64/images/). The version of UMS I'm using is from https://hub.docker.com/r/mbentley/ums/. I assume most, if not all, of this is also applicable to the main UMS docker image.
The following is the docker compose setup:
Notes:
I'm running this on Raspberry Pi OS lite - 64 bit because I have not been able to find one that works with 32 bit/armhf (https://downloads.raspberrypi.org/raspi ... 64/images/). The version of UMS I'm using is from https://hub.docker.com/r/mbentley/ums/. I assume most, if not all, of this is also applicable to the main UMS docker image.
The following is the docker compose setup:
Code: Select all
version: "2.1"
services:
universalmediaserver:
image: mbentley/ums
container_name: UMS
network_mode: host
environment:
- FOLDER=""
- FORCE_CHOWN="false"
- NETWORK_INTERFACE=""
- LOG_LEVEL=""
- PORT=5001
- SET_MEDIA_PERMISSIONS="false"
volumes:
- /path/to/your/UMS.conf:/opt/ums/UMS.conf
- /Path/to/your/Media:/Media
ports:
- 5001:5001
restart: unless-stopped
- The UMS.conf file is how you edit your settings since there is no GUI. If you have any network shares consider saving this file where it is accessible so it can be easily modified. @FixYourDockerfile linked to a version of the UMS.conf file with comments earlier in this thread which makes finding and changing settings easy.
- Make sure to set the Other permission for any media directory to at least Read/Execute.
- You can add multiple media directories and modify their name (it doesn't have to be /Media as above). Make sure to add /Media (or whatever you've named it) to the Shared Folders setting in the UMS.conf file.
Re: Docker
ok, was able to make some progress by following everybody's suggestions above;
I am now able to browse the video directory and files and it does stream through the web interface on port 9001 on my pc;
But, the PS3 is still not seeing the media server;
a few interesting things I noticed from the logfile:
1) there is a line stating the MulticastReeiverImpl is being initialized on port 1900, is this important for the DLNA function?
2) the multicast joins the network interface: docker0, I'm assuming it is on the proper network interface, otherwise the web page for UMS at port 9001 would not work, although I'm not sure about this;
3) last, but likely not least, there is a renderer found that is identified as Sony Xperia Z/ZL/ZQ/Z1/Z2, i have no Sony Xperia, but i do have a Sony PS3, could the mixup be at this level?
I am now able to browse the video directory and files and it does stream through the web interface on port 9001 on my pc;
But, the PS3 is still not seeing the media server;
a few interesting things I noticed from the logfile:
1) there is a line stating the MulticastReeiverImpl is being initialized on port 1900, is this important for the DLNA function?
2) the multicast joins the network interface: docker0, I'm assuming it is on the proper network interface, otherwise the web page for UMS at port 9001 would not work, although I'm not sure about this;
3) last, but likely not least, there is a renderer found that is identified as Sony Xperia Z/ZL/ZQ/Z1/Z2, i have no Sony Xperia, but i do have a Sony PS3, could the mixup be at this level?
- Attachments
-
- _ums_logs(2).txt
- (5.84 KiB) Downloaded 239 times
Re: Docker
Hello everyone!
I've read everything I could to understand how to install UMS in a docker container, but I couldn't find a simple guide that could be used by someone not as experienced as me.
There is a reference guide (accessible from the main site) at this page, but I think it is not very clearly written for an inexperienced user.
In this thread I found some perhaps more understandable guidance, so I ask here.
It seems to me that using a docker-compose.yml might be the simplest solution.
I compared the docker-compose.yml file proposed by FixYourDockerfile on the first page and the one reported by Pisweetly just above.
From the comparison, I had some doubts.
1) For managing volumes, it seems to me that Pisweetly's syntax is clearer (and correct?). In the first file, I do not understand how the path to the folders in the host system is specified.
2) For the official image there is no need to specify the ports?
3) For 'restart', which option would you choose? "always" or "unless-stopped"?
Could the docker-compose.yml file (valid for the official image) be the following? Could you point me to any errors or changes?
I've read everything I could to understand how to install UMS in a docker container, but I couldn't find a simple guide that could be used by someone not as experienced as me.
There is a reference guide (accessible from the main site) at this page, but I think it is not very clearly written for an inexperienced user.
In this thread I found some perhaps more understandable guidance, so I ask here.
It seems to me that using a docker-compose.yml might be the simplest solution.
I compared the docker-compose.yml file proposed by FixYourDockerfile on the first page and the one reported by Pisweetly just above.
From the comparison, I had some doubts.
1) For managing volumes, it seems to me that Pisweetly's syntax is clearer (and correct?). In the first file, I do not understand how the path to the folders in the host system is specified.
2) For the official image there is no need to specify the ports?
3) For 'restart', which option would you choose? "always" or "unless-stopped"?
Could the docker-compose.yml file (valid for the official image) be the following? Could you point me to any errors or changes?
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.conf:/profile
- /Path/to/your/Media:/media:ro
ports:
- 5001:5001
- 9001:9001
restart: always