in ,

Navidrome: A new option for building your own music library


Notes to editors:This article was selected for the “Self-Reliance” essay contest. The topic of this essay contest is flexible, as long as it revolves around “self-hosting”. Software recommendations, experience sharing, technical popularization, and opinion comments are all welcome. The shortlisted works will receive royalties, Zeabur subscriptions, minority PRIME memberships and other rewards.Learn more

The submission period has ended. You can #Self-reliance Tags View all contributions.


Preface

As an ordinary player who owns a NAS, building a local music library is an indispensable part of enriching home audio and video.My Music Library SolutionIn the article “How to Play Music on NAS”, I briefly introduced some of my current solutions for building my own music library on NAS. But whether it is Jellyfin, Emby or Plex, they are not dedicated music media programs. Even though these software have the function of playing music and the interface is very beautiful, their core use is still in video playback. Therefore, I only recommend friends who also need to watch videos to deploy such media programs, so that they will not be troubled by the fact that the programs have too many unused functions when using them.

Later, I found an open source music server software “Navidrome“. Compared with the three major music players, Navidrome's interface uses Material Design, but the display effect does not meet my personal aesthetic needs; although the web version is universal on all platforms, it still requires an App for immediate use on mobile devices; even if it is compatible with a series of music streaming protocols such as Subsonic/Madsonic/Airsonic, most of the players on the market that support these protocols are in English, with almost no Chinese translation, and are not very convenient to use; not to mention that until now, Navidrome still does not support external LRC lyrics…

With such criticism, you can probably understand why I didn't recommend Navidrome in time. But why do I recommend it now? Recently, when I was surfing the Internet, I saw a group friend recommend a music player program “Yinliu” developed by a Chinese. The interface conforms to the aesthetics of the Chinese people, the design is simple, and the functions are practical, which indirectly solves the pain point of Navidrome, which is not good-looking and not easy to use. Therefore, Navidrome is worth recommending to everyone.

The following operations are all performed on a DS220+ running DSM 7.2.1 and the Docker Compose version is 2.25.0.

Install

First, create a new directory called navidrome and create another folder named data data folder.

Next, prepare some music and upload it to the NAS, copy the folderComplete route.For example /volume1/media/music

Since it is not officially recommended to use root The container is run by a user, so you need to specify the running user of the container. The Synology administrator user is usually 1026:100 You can also log in to the SSH terminal as the current user and enter id username For example, my Synology user name is mikusa

$ id mikusa
uid=1026(mikusa) gid=100(users) groups=100(users),101(administrators),65537(docker)

Then, in creating compose.yaml When user Fill in the configuration 1026:100

If you are really unsure or too lazy to check, then fill in 1000:1000

Then, create a file called compose.yaml Fill in the following text:

services:
  navidrome:
    image: deluan/navidrome:latest
    container_name: navidrome
    user: 1026:100 #用户id
    ports:
      - 4533:4533 #左侧端口如有冲突,可随意修改
    volumes:
      - ./data:/data #数据路径
      - /volume1/media/music:/music:ro #音乐路径
    environment:
      #程序默认语言
      - ND_DEFAULTLANGUAGE=zh-Hans
      #启用GRAVATAR头像
      - ND_ENABLEGRAVATAR=true
      #关闭转码,如需要转码请设置为true
      - ND_ENABLETRANSCODINGCONFIG=false
      #SPOTIFY相关
      # - ND_SPOTIFY_ID=
      # - ND_SPOTIFY_SECRET=
      #LAST.FM相关
      # - ND_LASTFM_LANGUAGE=zh
      # - ND_LASTFM_APIKEY=
      # - ND_LASTFM_SECRET=
      #PROXY相关
      # - HTTP_PROXY=http://proxy:port
      # - HTTPS_PROXY=http://proxy:port
    restart: unless-stopped

You can also select “Create docker-compose.yml” when creating a project and paste the above configuration to avoid the uploading step.

As for environment variables, although the official documentation has dozens of environment variables to choose from, there are not many configurations actually used. Except for fixing the language and turning off transcoding, these are all functions that do not affect usage.

If you want Navidrome to display singer avatars, you need to configure Spotify You will need to create a Spotify account first, thenhere Create app Create an application.

Creating the Spotify App

Just fill in App nameApp description as well as Redirect URI In these three places, Redirect URI needs to be filled in http://localhost/ to save.

Then return to the console, click Apply, enter the application settings, and you can get Client ID and Client secret. Corresponding to the environment variables ND_SPOTIFY_ID and ND_SPOTIFY_SECRET

If you want Navidrome to display singer profiles, popular songs and other related information, you need to configure it in the environment variables Last.fm. Also create a Last.fm account, then create API Account. Just fill in the application name. After submission API Application Just copy and paste the Key and Secret into the environment variables.

Last.fm API Application

The above two external functions depend on your personal network conditions. If they cannot be used, you may also need to configure proxy In addition, if you need to increase or decrease environment variables, please refer toOfficial Documentation

Open Container Manger on DSM, click Project on the left, and then create a new project. You can name the project anything, for example navidrome set the path to the folder created in the above preparation steps.

Create a project

It is not necessary to enable the web portal, but you can configure it if necessary.

No web portal configuration required

The container can then be started.

use

After starting the container, Navidrome is ready to use with almost no additional setup required.

When you first access IP:4533, Navidrome will ask you to create an administrator account first.

Because the default language has been configured in the environment variables, there is no need to change the user language, it is directly Chinese.

Although Navidrome does not use MusicBrainz's music metadata as strictly as Plex, you can still refer to theAn incomplete guide to using MusicBrainz》After adding ID3Tags information to the music, add it to Navidrome. In short, as long as you prepare the music, Navidrome can be used out of the box.

Spotify and Last.fm, which are configured when you install Navidrome, will eventually allow artist pages to display relevant information such as avatars and bios.

Even if you don't configure Last.fm-related environment variables, you can still check “Enable Last.fm's favorite records” in the personalization settings to record the music you have listened to through Last.fm.

Log in to your Last.fm account on the authorization page that jumps to your browser and allow access.In Navidrome, each user can configure his or her own Last.fm account to record the music played.

As long as the network is working properly, you can see the music playing in almost real time.

Forgot to introduce, this is what Navidrome looks like when it displays lyrics.Currently only inline lyrics can be displayed.

This is what happens on mobile devices.

By the way, I embedded bilingual lyrics, which should be displayed in two lines. Now you know how bad Navidrome's support for lyrics is.

Audio Stream

So, in order to make Navidrome a little easier to use, my suggestion is to use a third-party client. Navidrome currently supports Subsonic/Madsonic/Airsonic protocols. There are many clients on the market that support these protocols, but most of them areDoes not support ChineseThe emergence of “audio streaming” provides Chinese users with an additional choice.

Audio Stream” is a music player developed by Chinese people, supporting Subsonic/Navidrome/Jellyfin/Emby/AudioStation. It is now available on Android and iOS, and may support Windows and tvOS platforms in the future. The audio stream is developed using Flutter, with a simple and beautiful interface, with transparency and Gaussian blur as the main features, and a layout similar to NetEase Cloud Music. There is basically no threshold to get started. You canYinliu official websiteGet the Android installation package, or search for “Audio Stream” in the iOS AppStore to download it.

Using the audio stream is very simple. We just need to fill in the Navidrome address, username and password to log in, and then we can enter the audio stream homepage.

If you have a large amount of music, the audio stream may take a while to scan.

Next, you should notice that the homepageMain Line“This is the most surprising feature of the audio stream. It supports switching between the primary and backup lines. In other words, you can fill in the intranet address for the primary line and the external network address for the backup line. In this way, when you go out, the audio stream can automatically switch to the external network address, and when you return home, it will automatically switch back to the intranet. Since the streaming media has a cache, the music will not be interrupted during the network switching process.

The homepage is arranged in order of latest album, daily recommendation, recently played, most frequently played and random album. Among them, the daily recommendation is a random 50 songs. If you feel that these 50 songs do not suit your current mood, you can refresh and change a batch immediately, which is a good function.

On the playback page, you can swipe left to enter recommendations and swipe right to enter lyrics. The audio stream supports reading the lyrics embedded in the music and displays them in two lines in both languages.

In short, every aspect of Audiostream is very similar to the music apps we often use, and there is almost no barrier to getting started.

That’s all for now. As for the rest of the features of Navidrome and Audio Stream, please discover and experience them on your own!

> Download Minority Client,focus on Minority Little Red Bookexperience the wonderful digital life🍃

> Practical and easy to use Genuine softwarethe minority presents you 🚀

purses

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

Golang concurrent fork/join mode

Worried about neutrality being undermined? Cisco's OpenDNS stops providing DNS services to users in France and Portugal