Use Rclone to mount OneDrive music files and Navidrome to build the website, both deployed using Docker.
Rclone
First, you need to run Rclone on Windows to get the configuration, then install and mount the files on your server.
Get Token
Download Rclone for Windows from: https://rclone.org/downloads/
Extract the files, open the folder in cmd, and run:
| |
Log in and authorize in the browser window that pops up. Once finished, it will print a Token (the part between the curly braces, including the braces).
Get Configuration File
Run the command:
| |
Follow the prompts to configure it. The configuration file is generated at:
| |
Copy Configuration File
First, create two folders on the server:
| |
Move your configuration file into the config folder.
Mount Directory
Run this command to pull the image:
| |
Mount the directory:
| |
The & at the end of the command runs it in the background. It will print the process PID. To stop it, use:
| |
Want to know more? See: Linux Study Chapter 6: Managing Running Processes
Following the example, this mounts the music directory from OneDrive to /home/docker/rclone/data/music.
References:
- https://rclone.org/onedrive/
- https://rclone.cn/install.html
- Mounting OneDrive/GoogleDrive on Linux with Rclone and setting up Auto-start
Deploying Navidrome
Using docker-compose. First, create a folder:
| |
Create a docker-compose.yml file and add the following:
| |
Check more variables here: Navidrome Configuration Options - Navidrome
Then run:
| |
Access it via IP:8001.
References:
Song Metadata
To categorize your songs properly, you need to embed metadata (including lyrics) into the files.
You can use the tool MusicTag.
Author’s site: MusicTag PC Version
Other tools exist, such as this Web version: xhongc/music-tag-web
Using Clients
While the web interface works fine on PC, it’s not great on mobile. Fortunately, there are several compatible clients.