Install mStream Inside Docker Container on Linux

Install mStream Inside Docker Container on Linux

The mStream is an open-source personal music streaming server that allows users to stream their music collection to various devices. It is designed for those who want to access their music library from anywhere without relying on third-party services.

This tutorial explains how to install mStream inside a Docker container on Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install mStream

  • Host network

Run the following command to create a container for mStream that uses host network:

docker run -d --name=mstream --restart=always --network=host \
    -v /opt/mstream/config:/config \
    -v /opt/mstream/music:/music \
    linuxserver/mstream
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, mStream service is listening on port 3000. It can be changed with -p option.

docker network create app-net
docker run -d --name=mstream --restart=always --network=app-net \
    -p 8080:3000 \
    -v /opt/mstream/config:/config \
    -v /opt/mstream/music:/music \
    linuxserver/mstream

Testing mStream

Download sample MP3 file for testing:

sudo wget -qO /opt/mstream/music/sample.mp3 https://github.com/rafaelreis-hotmart/Audio-Sample-files/raw/master/sample.mp3

To access a web interface, open a web browser and go to http://<IP_ADDRESS>:3000, where <IP_ADDRESS> is the IP address of the system.

mStream Inside Docker Container on Linux

Uninstall mStream

To completely remove mStream, remove its container:

docker rm --force mstream

Remove mStream image:

docker rmi linuxserver/mstream

You can also remove mStream data, and music:

sudo rm -rf /opt/mstream

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.