This tutorial is going to show you how to install and setup Universal Media Server in Ubuntu 20.04 Desktop and Server.
Universal Media Server, UMS in short, is a DLNA-compliant UPnP media server allows streaming media files to a wide range of devices including video game consoles, smart TVs, smartphones, and Blu-ray players.
1. Install required libraries:
Media transcoding is accomplished through packages from AviSynth, FFMpeg, MEncoder, and VLC, you have to first open terminal and run command to make sure these packages installed:
sudo apt install mediainfo dcraw vlc mplayer mencoder
2. Download Universal Media Server:
The latest tarballs are available to download at github project page. Select download (run
uname -m to tell system type):
- x86 package for old 32-bit machines.
- x86_64 package for 64-bit machines.
- arm64 / armhf for Rasperry Pi devices.
[ac-button size=”large” color=”tan” size=”large” url=”https://github.com/UniversalMediaServer/UniversalMediaServer/releases” target=”_blank”]Download Universal Media Server[/ac-button]
At the moment, the latest release is version 10.0.1. If you’re running Ubuntu Server, use this command to download it (replace URL in the command if a newer version is available):
wget -c https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/10.0.1/UMS-10.0.1-x86_64.tgz
3. Decompress the tarball
Run following 2 commands will navigate to user’s Downloads folder, then extract the UMS package /opt, and finally rename result folder from ‘ums-10.0.1‘ to ‘ums‘.
sudo tar -zxvf UMS-10.0.1-x86_64.tgz -C /opt/ --transform s/ums-10.0.1/ums/
cd Downloads if it was downloaded via wget command.
And replace “UMS-10.0.1-x86_64.tgz” if a newer version was downloaded, also do change version number in “ums-10.0.1“.
4. Run UMS as system service
If everything goes well, you should be able to run the Universal Media Server via command:
For Ubuntu Desktop, it brings up a setup dialog to choose language, start minimized or not, choose network, and media folder etc.
Then it offers an user interface with more configurations, log view, and more.
For Ubuntu Server without UI, edit the .config/UMS/UMS.conf file for configurations. By default, it steams all files under user home. You can add “folder = /PATH/TO/MEDIA1,/PATH/TO/MEDIA2” to set media folder. For more, read the UMS.conf file under source tarball.
After starting the server go to http://server_ip:9001 in your web browser to check out if the server is working.
To make it run as systemd service, open terminal and run command:
sudo nano /etc/systemd/system/ums.service
It will create an empty file and open with nano command line text editor. Paste (Ctrl+Shift+V) following lines and change ji to your user name. Also change memory limit from 500M to another value if you want.
[Unit] Description=Run UMS as Ji DefaultDependencies=no After=network.target [Service] Type=simple User=ji Group=ji ExecStart=/opt/ums/UMS.sh TimeoutStartSec=0 RemainAfterExit=yes Environment="UMS_MAX_MEMORY=500M" [Install] WantedBy=default.target
Save changes by pressing Ctrl+X, follow with Y, and hit Enter.
Finally run commands to reload systemd daemon, enable and start UMS service.
sudo systemctl daemon-reload
sudo systemctl enable ums.service
sudo systemctl start ums.service
And check the service status via command:
sudo systemctl status ums.service