How to Install Universal Media Server to Stream Media to Any Devices

Universal Media Server (UMS) is a cross-platform and free DLNA-compliant, HTTP(s) PnP Media server, which provides a number of capabilities such as sharing multimedia files such as images, videos, and audio between modern devices such as game consoles, smart TVs, Blu-ray players, Roku devices, and smartphones. UMS was originally based on a PS3 Media Server in order to ensure greater stability and file compatibility.

UMS streams a wide range of media formats with little or absolutely no configuration. It is powered by a number of multimedia tools such as VLC media player, FFmpeg, AviSynth, MEncoder, tsMuxeR, MediaInfo, and many more.

[ You might also like: Best Media Server Software for Linux ]

In this guide, we examine how to install Universal Media Server on Debian-based distributions. We will demonstrate its installation using Ubuntu 22.04.

Step 1: Install Additional Packages and Dependencies

A few additional packages and dependencies are required by the Universal Media Server. These include a VLC media player, MPlayer, mediainfo, and mencoder for encoding videos.

To install these packages, run the following command.

$ sudo apt install mediainfo dcraw vlc mplayer mencoder
Install Dependencies in Ubuntu
Install Dependencies in Ubuntu

Step 2: Install Universal Media Server in Ubuntu

Universal Media Server is available for download from its GitHub repository for various devices including:

  • x86 (For 32-bit older PCs).
  • x86_64 (For 64-bit PCs).
  • arm64 / armhf (For devices with ARM processors e.g Raspberry Pi).

Since we are running Ubuntu 22.04, we will download the 64-bit tarball file. The latest version of Universal Media Server is 11.4.0 at the time of writing this guide.

So, download the Universal Media Server compressed file as follows and replace the version number accordingly to match the latest release using the following wget command.

$ wget https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/11.4.0/UMS-11.4.0-x86_64.tgz

Once the tarball has been downloaded, navigate to the location where you downloaded the tarball file and extract the tarball file to the /opt directory and rename the uncompressed folder ‘ums‘.

$ sudo tar -zxvf UMS-11.4.0-x86_64.tgz -C /opt/ --transform s/ums-11.4.0/ums/

Verify the existence of the folder ‘ums‘ in the /opt directory.

$ ls /opt
Check UMS Directory
Check UMS Directory

Step 3: Launch Universal Media Server in Ubuntu

The last step is to launch the media server. To do so, run the following script.

$ /opt/ums/UMS.sh

This loads all the necessary components needed to run the media server. Finally, the media server service will be started at port 9001, and instructions on how to access the media server will be displayed at the end of the script’s output.

Start Universal Media Server in Ubuntu
Start Universal Media Server in Ubuntu

As such, to access Universal Media Server, browser the URL provided. The URL will be different in your case.

http://server-ip:9001

You will get the following interface.

Universal Media Server
Universal Media Server

Step 4: Configure Universal Media Server Systemd Service

When the script is terminated on the command line, the UMS service halts. A better way to run the media server is to configure it as a systemd service so that you can easily start, stop and manage it without any interruptions.

To do this, create a systemd file.

$ sudo nano /etc/systemd/system/ums.service

Next, paste the following lines. Be sure to replace every instance of ‘tecmint’ with your own username for User and Group attributes.

[Unit]
Description=Run UMS as tecmint
DefaultDependencies=no
After=network.target

[Service]
Type=simple
User=tecmint
Group=tecmint
ExecStart=/opt/ums/UMS.sh
TimeoutStartSec=0
RemainAfterExit=yes
Environment="UMS_MAX_MEMORY=500M"

[Install]
WantedBy=default.target

Save the changes and exit the configuration file. The reload systemd and enable and start UMS service using the following commands.

$ sudo systemctl daemon-reload
$ sudo systemctl enable ums.service
$ sudo systemctl start ums.service

Once started, check the Universal Media Service status via command:

$ sudo systemctl status ums.service
Universal Media Server Status
Universal Media Server Status

From the output, we can see that UMS is running as expected.

This concludes our guide on how to install Universal Media Server on Debian-based distributions. From here, you can upload and stream your multimedia files across multiple devices. Your feedback on this guide is welcome.

Tutorial Feedback...
Was this article helpful? If you don't find this article helpful or found some outdated info, issue or a typo, do post your valuable feedback or suggestions in the comments to help improve this article...

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

4 thoughts on “How to Install Universal Media Server to Stream Media to Any Devices”

  1. Followed it as it was written this is my results

    $ sudo systemctl status ums.service
    
    × ums.service - Run UMS as tecmint
         Loaded: loaded (/etc/systemd/system/ums.service; enabled; vendor preset: enabled)
         Active: failed (Result: exit-code) since Sun 2022-09-25 14:06:58 CEST; 4s ago
        Process: 10222 ExecStart=/opt/ums/UMS.sh (code=exited, status=217/USER)
       Main PID: 10222 (code=exited, status=217/USER)
            CPU: 2ms
    
    sep 25 14:06:58  systemd[1]: Started Run UMS as tecmint.
    sep 25 14:06:58  systemd[10222]: ums.service: Failed to determine user credentials: No such file or directory
    sep 25 14:06:58  systemd[10222]: ums.service: Failed at step USER spawning /opt/ums/UMS.sh: No such file or directory
    sep 25 14:06:58  systemd[1]: ums.service: Main process exited, code=exited, status=217/USER
    sep 25 14:06:58  systemd[1]: ums.service: Failed with result 'exit-code
    
    Reply
      • Hi Ravi,

        Removing it was not the solution

        adding group ums
        adding username (mijn username)

        [Unit]
        Description=Run UMS as tecmint (or your desire)
        DefaultDependencies=no
        After=network.target
        
        [Service]
        Type=simple
        User=username (your username)
        Group=ums
        ExecStart=/opt/ums/UMS.sh
        TimeoutStartSec=0
        RemainAfterExit=yes
        Environment="UMS_MAX_MEMORY=500M"
        
        [Install]
        WantedBy=default.target
        

        Thats all

        Johan

        Reply

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.