Mastodon Skip to main content

MStream - Open Source Music Streaming at your Fingertips

MStream is an open source, self hosted music streaming server with an Android companion app, and an iOS app on the way.  You can stream through your web browser, as well as use the streaming service in Jukebox mode.  An alternative to the Subsonic / Airsonic API based servers, it's got a clean, intuitive interface, and is very straight-forward to setup and use.

What You'll Need

  • Docker-CE
  • Docker-Compose
  • About 10 minutes of time
  • The Path to your music library
  • (Optional) NGinX Proxy Manager
  • (Optional) a domain / Sub-domain to access your music from outside your home lab, or via a URL instead of an IP address.

Installation

We are going to install the MStream server using a modified version of the MStream team's docker-compose file.

For the best organization, we want to keep our Docker and Docker Compose files in a "root" level folder called "docker".

If you haven't setup a "docker" folder, why not start here.

mkdir docker

Now move into that docker folder:

cd docker

Next, let's make a folder called MStream.

mkdir mstream

and move into that folder:

cd mstream

In here, we'll make a new file called  "docker-compose.yml"

nano docker-compose.yml

In this file, we need to paste the following block of yaml code, and modify it to suit your needs and setup.  We'll go through the parts you may need to change after the code block:

version: "2.1"
services:
  mstream:
    image: lscr.io/linuxserver/mstream
    container_name: mstream
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Chicago
    volumes:
      - /home/brian/docker/mstream/config:/config
      - /home/brian/Music:/music
    ports:
      - 3000:3000
    restart: unless-stopped

As always, the above is a yaml file, and yaml is very (and I mean very!) specific about spaces, so be cautious as you make changes.

First, you'll want to check your User ID and Group ID.  so, save the file with CTRL + O, and press Enter to confirm, the exit the nano editor with CTRL + X.   Next, in the terminal type

id

You'll see a list of ID numbers for your user, group, and a few others.  Make note of your user and group ids, and we'll use those back in the docker-compose.yml file.   Open the file again:

nano docker-compose.yml

and replace the PUID and PGID with your user and group id's respectively (if they are different from what is there already).

Next, set your timezone.  In my case it's "America/Chicago", but make sure to se the correct timezone for where you are.

Under the "volumes" section, you'll want to set the path to where your mstream folder is. Remember to only change teh left side of the colon ":". The right side is always preset by the container, and should not be changed.  Use the full path, as this just generally works regardless of the docker and docker-compose version.

For the music location, make sure, to again, put the full path your where your music is stored.  Again, changing only the left side of the colon.

Finally, in the "ports" section, feel free to leave it as 3000 on the left (this is the host machine port that you'll use to access the MStream server).  If, however, port 3000 is already in use on this host, then feel free to change the left side of the port mapping to any port that is open and free.  In my case, I ended up setting it to 8215, so the port mapping for me looks like:

ports:
  - 8215:3000

Once you've made the adjustments, save the file again with CTrl+O, then press Enter to confirm, and use CTRL + X to exit.

Run Our Server

To run the server, and get it going, we'll use the following command:

docker-compose up -d

After you see the 'done' and are brought back to the prompt in the terminal, you can check the logs with the command:

docker-compose logs -f mstream

This will show you the logs as they update, and once you see success or done messages in the logs, you can use CTRL + C to end the logging output, and open the browser.

In the browser go to the IP address of your MStream server, and the port you set.

In my case, I went to

http://192.168.10.25:8215

You should see the MStream UI with a list of all of your music on the screen.  On the left you'll see a menu of options, center is a list of available music, and on the right is a playlist window.  click on on items in the music list, will move them to the playlist in the order they are clicked.  Think of this as a quick (ad-hoc) playlist.

You are now up and running.

Check out the video for the Graphical User Interface walk-through, and enjoy your music!

Support my Channel and Content

Support my Channel and ongoing efforts through Patreon:
https://patreon.com/awesomeopensource