Your own music stream server 📻 with Mstream

Do you wanna to host your own music server, with mStream you could do it and I wanna teach you how 📻

Your own music stream server 📻 with Mstream
Photo by NEOM / Unsplash

Do you like to hear you own music library, but it is local? in that case exist Mstream it is

mStream is a music streaming server. With mStream you can access your music collection from anywhere.

TL;DR

I will show you mStream a music stream server to access your music collection from web, I will show you how to deploy it with Docker 🫙 🐳 🎵

Docker official image 👮

You could find the docker official image from mStream's docker hub, if you wanna do a quick try in your local machine you could do it through docker cli:

docker run -d \
  --name=mstream \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -p 3000:3000 \
  -v /path/to/data:/config \
  -v /path/to/music:/music \
  --restart unless-stopped \
  lscr.io/linuxserver/mstream:latest

to best experience let's replace some variables in above command like TZ for your time zone for example Europe/London more examples see here, /path/to/music with the music path where you have your music collection for instance ~/home/<my-user>/music , /path/to/data is where mStream will store config data, so you could point it to an empty folder in your local, and that's it if you run that command you will have your mStream server running in your port 3000:

That's it mstream but lets run it from your VPS 🚀

Create a docker-compose.yml 📄

First you should create a docker-compose.yml with:

services:
  mstream:
    image: lscr.io/linuxserver/mstream:latest
    container_name: mstream
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /path/to/data:/config
      - /path/to/music:/music
    ports:
      - 3000:3000
    restart: unless-stopped

Same as previously just take care of change the data and music folders to some relevant paths, and change your time-zone in TZ= line, when you are ready you could put this in a new folder in your VPS (virtual private server) and execute an docker-compose up -d to starting the new container 🚀.

To enable it you should to follow same steps as I explained in previous post about how to enable a new web site in your Apache2 server:

Adding a new website to your VPS via docker - apache2
Quick tutorial about how to enable a website via docker and apache2 using a reverse proxy configuration.

Resources

  • Linux server LXF301
  • Docker hub mStream link