Posted onEdited onIntutorialViews: Word count in article: 5kReading time ≈5 mins.
I have a Navidrome server before. Now because of I am living in Sweden, the latency is too high for connecting to the old server. So I create a new instance in Stockholm in Oracle, a free server, in order to get a better music experience. Now let me tell you how to migrate Navidrome to a new server.
How to migrate Navidrome
For my circumstance, I will use the same path in new server. If you want to use new path for music, you need to modify the database of Navidrome, which is not within the scope of this article. All in one sentence, you just need to copy /var/lib/navidrome/, /var/www/music/ to your new server and install Navidrome again, then you got the same Navidrome as the old one, all the playlist and password are same.
Log into your old server as root.
1 2
tar -cvzf navidrome_backup.tar.gz /var/lib/navidrome/ tar -cvzf music_backup.tar.gz /var/www/music/
Then transfer these two files to your new server using any way you can. For me, I used web server.
[Unit] Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic After=remote-fs.target network.target AssertPathExists=/var/lib/navidrome
# You can uncomment the following line if you're not using the jukebox This # will prevent navidrome from accessing any real (physical) devices #PrivateDevices=yes
# You can change the following line to `strict` instead of `full` if you don't # want navidrome to be able to write anything on your filesystem outside of # /var/lib/navidrome. ProtectSystem=full
# You can uncomment the following line if you don't have any media in /home/*. # This will prevent navidrome from ever reading/writing anything there. #ProtectHome=true
# You can customize some Navidrome config options by setting environment variables here. Ex: #Environment=ND_BASEURL="/navidrome"
1 2 3 4 5 6 7
sudo systemctl daemon-reload sudo systemctl start navidrome.service sudo systemctl status navidrome.service sudo systemctl enable navidrome.service vim /etc/nginx/.htpasswd # copy this value in your old server, the path is /etc/apache2/.htpasswd ln -s /etc/nginx/sites-available/music.new.server /etc/nginx/sites-enabled/ vim /etc/nginx/sites-available/music.new.server
server { listen443 ssl; server_name music.new.server;
# SSL Configuration, comment these line until you applied a license for your domain ssl_certificate /etc/letsencrypt/live/music.new.server/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/music.new.server/privkey.pem;