Polaris is a music streaming application that allows to access the music collection from any device. It streams music directly from your computer or cloud server, so there's no need to upload the files to a third-party service.
This tutorial explains how to install Polaris 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 Polaris
Before starting, create directories for data, cache and music:
sudo mkdir -p /opt/polaris/{data,cache,music}
Set user, which ID is 100 as owner for newly created directories:
sudo chown -R 100:100 /opt/polaris
Note: it doesn't matter that user (ID: 100) doesn't exist on host system. This user will be created in the container.
- Host network
Run the following command to create a container for Polaris that uses host network:
docker run -d --name=polaris --restart=always --network=host \
-v /opt/polaris/data:/var/lib/polaris \
-v /opt/polaris/cache:/var/cache/polaris \
-v /opt/polaris/music:/music \
ogarcia/polaris
- User-defined bridge network
User-defined bridge network can be used for listening on different port. By default, Polaris service is listening on port 5050. It can be changed with -p
option.
docker network create app-net
docker run -d --name=polaris --restart=always --network=app-net \
-p 8080:5050 \
-v /opt/polaris/data:/var/lib/polaris \
-v /opt/polaris/cache:/var/cache/polaris \
-v /opt/polaris/music:/music \
ogarcia/polaris
Testing Polaris
Download sample MP3 file for testing:
sudo wget -qO /opt/polaris/music/sample.mp3 https://github.com/rafaelreis-hotmart/Audio-Sample-files/raw/master/sample.mp3
Open a browser and go to http://<IP_ADDRESS>:5050
, where <IP_ADDRESS>
is the IP address of the system. For the first time, you will be asked to configure Polaris. During set up, specify /music
location for scanning music files. After creating the administrator account, you will be redirected to Polaris web interface.
Uninstall Polaris
To completely remove Polaris, remove its container:
docker rm --force polaris
Remove Polaris image:
docker rmi ogarcia/polaris
You can also remove Polaris data, cache, and music:
sudo rm -rf /opt/polaris
If a user-defined bridge network was created, you can delete it as follows:
docker network rm app-net
Leave a Comment
Cancel reply