Publish: 2021-12-14 | Modify: 2023-12-28
In the age of online copyright, you have to pay even if you just want to listen to a song. Even if you purchase a VIP service, the downloaded songs are still encrypted, and there are certain songs that you cannot listen to once your VIP subscription expires. This is the case with XX Music.
So I started looking for a self-hosted service similar to cloud music, which would allow me to play music anytime, anywhere. I found the following software that can meet my needs:
I have been using the free and open-source Jellyfin for multimedia management. It is already doing a great job in managing and playing movies, but the music management feels a bit lacking. Some lossless songs have stuttering or cannot be played.
So I tried Airsonic and Navidrome. Airsonic is a music player developed in Java, with powerful and professional features. It has a lot of customizable music parameters, but as an amateur player, I have no idea what these music parameters mean. It consumes a lot of memory because it is developed in Java, and there are too many parameters, which is not simple and convenient enough. So I found another music player software called Navidrome, which is developed in Golang. It has low memory usage, a simple interface, and is compatible with the Subsonic API. Without further ado, let's deploy it.
Deploying with Docker command line: (please modify the paths accordingly)
docker run -d \
--name navidrome \
--restart=unless-stopped \
--user $(id -u):$(id -g) \
-v /path/to/music:/music \
-v /path/to/data:/data \
-p 4533:4533 \
-e ND_LOGLEVEL=info \
deluan/navidrome:latest
/path/to/music
: The music folder on your local host/path/to/data
: Navidrome configuration data folderHowever, I don't recommend deploying with the command line as it is not convenient to maintain. If you have installed docker-compose, I recommend using docker-compose to deploy. Create a docker-compose.yaml
file with the following content:
version: "3"
services:
navidrome:
container_name: navidrome
image: deluan/navidrome:latest
user: 0:0 # 0:0 means running as root user
ports:
- "4533:4533"
restart: unless-stopped
environment:
# Optional: put your config options customization here. Examples:
ND_SCANSCHEDULE: 1h
ND_LOGLEVEL: info
ND_SESSIONTIMEOUT: 24h
ND_BASEURL: ""
ND_ENABLETRANSCODINGCONFIG: "true"
ND_TRANSCODINGCACHESIZE: "4000M"
ND_IMAGECACHESIZE: "1000M"
volumes:
- "/apps/navidrome/data:/data"
- "/media/Music:/music:ro"
/apps/navidrome/data
: Please specify a local path to store Navidrome data/media/Music:/music
: The path to your music folder on the hostThen run docker-compose up -d
. If everything goes well, you can access it through http://IP:4533
and it will prompt you to set up an account and password on the first visit.
You can access Navidrome on your PC through http://IP:4533
. The interface is simple and conforms to modern aesthetics.
You can click the user button in the upper right corner, go to Personal - Language, and change it to Chinese, as shown in the following image.
For Android, I recommend using the Ultrasonic app, which supports connecting to Navidrome. (iOS officially recommended clients include: play:Sub, substreamer, Amperfy, and iSub). This is based on the assumption that you have set up port forwarding or FRP (not covered in detail here).
The Navidrome interface supports Chinese (not fully localized), but it seems that it cannot display all songs, only albums (you can use the Ultrasonic web interface to bookmark your favorite music in advance), which is a bit different from Chinese habits. If you find a better alternative software, please leave a comment to let me know.
Let's start with the advantages:
Now let's talk about the disadvantages:
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.