Greetings Tinkerers!

In the past couple of months I’ve been tinkering with some cool ways of modifying my homelab and writing k8s operators.

Alright so … as y’all know I am a huge music addict…

(cough!.)

music-is-beautiful

… and my Spotify Premium membership just ended ( forgot to create a mandate … I guess a good thing? ), while looking to renew I was wondering why don’t I just self host something which can replace spotify for me.

I had couple of requirements for me to consider something as a spotify replacement-

  • Scrobble things to last.fm
  • Now playing on my discord through rpc
  • Able to add/remove songs easily along with multi device syncing.

Previously, I used to have a single Smb server and used Mixplorer to pull songs to all my devices but … come on good UI is needed as well and Mixplorer isn’t really a music player lol.

navi

On r/selfhosting, I’ve come across the very same thing I was looking for Navidrome.

Off I went into the Installation, Got the arm64 for my raspberry pi cluster and got it running on k8s, It was pretty straight forward deployments binded to my music local storage.

I’ll attach the repo of all the files and scripts later here

Gist

image

K8s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
pacchu@pacsrv:~/navidrome$ kubectl get -f ./
NAME                                              READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/navicord-discord-rpc-deployment   1/1     1            1           15h

NAME                            CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                     STORAGECLASS   VOLUMEATTRIBUTESCLASS   REASON   AGE
persistentvolume/navidrome-pv   50Gi       RWO            Retain           Bound    navidrome/navidrome-pvc   manual         <unset>                          17d

NAME                                  STATUS   VOLUME         CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS   AGE
persistentvolumeclaim/navidrome-pvc   Bound    navidrome-pv   50Gi       RWO            manual         <unset>                 17d

NAME                        READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/navidrome   1/1     1            1           17d

NAME                TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)    AGE
service/navidrome   ClusterIP   10.43.57.30   <none>        4533/TCP   17d

NAME                                            CLASS               HOSTS                       ADDRESS                                                 PORTS   AGE
ingress.networking.k8s.io/navidrome-cf-tunnel   cloudflare-tunnel   navidrome.prashantnook.in   ***   80      17d

Now for Clients, I’ve decided to go with just the web application for my desktop since its pretty slick and lightweight to be run, While for android there are many cool ones but I am using Tempo@fdroid

image

Spotify <-> Navidrome migrations

Now for the important things … how do I bring my spotify songs into navidrome, I have over 1600+ Songs on spotify, Sadly spotify didnt have any google takeaway like feature, also Downloading songs is Piracy (duh) so we’re going off legal stuff here ;)

If Buying isnt owning, Pirating isnt stealing :D

To be honest Streaming is far better than buying songs induvidually for 23 INR like back on google play music days (2014s).

Spotdl

Anyhow, To download spotify songs I came across this amazing tool spotdl which queries youtube for the song name and downloads via ytdlp.

Wrote a simple script to fetch all my liked songs and make a long txt file containing urls. This was using spotipy.

Spotipy script to export

1
2
3
4
5
6
pacchu@pacsrv: $ cat liked_song_urls.txt | head
https://open.spotify.com/track/3RXUgPNIbUgFxsDWuBQEt6
https://open.spotify.com/track/0MHStU0muAIEMbwdnebYu2
https://open.spotify.com/track/0tCbGwXOpEiYIxkr8S2FAr
https://open.spotify.com/track/02sy7FAs8dkDNYsHp4Ul3f
https://open.spotify.com/track/5sBDrrtLGbV64QJnEqfjer

Now its just a matter of looping the big list and downloading via spotdl.

and viola populated the entire pv with some of my spotify songs.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
pacchu@pacsrv: $ ls 
...
'美波 - DROP.mp3'
'美波 - ホロネス.mp3'
'藤澤慶昌 - 魔術の授業.mp3'
'양방언 - No Boundary - Live at Sejong Center for the Performing Arts in Seoul, 2018.11.21.mp3'
'양방언 - 暁のヨナ/Akatsuki-no-YONA.mp3'

pacchu@pacsrv: $ ls | wc -l
707

Although it didn’t alot of niche songs I listen to (over 1000+) this really suffices me since all my recents are included in this!

Last.fm Integration

I use itspacchu@lastfm to keep track of my scrobbing data, Luckily lastfm is natively supported by navidrome

image

Popping in my client and secret and I got scrobbing working!! (The cool chart in beginning of this blog ^^)

Discord RPC Integration

Now for the final (not so) important thing, Discord Listening to.. Status messages, Spotify integration is strong with discord but navidrome doesn’t really have any native support for discord RPC.

I found this which claims to connect with navidrome server and send discord rpc status logixism/navicord.

It works!

Screenshot From 2025-06-29 15-57-49

image

Well now I shall be now binging songs through Navidrome, There are alot more things to do to make it as seamless as spotify,

Maybe have a discord bot to automatically download songs based on spotify link being provided to it, or

Another things is to rewrite the discord rpc in go for fun cause why not?

Anyhow hopefully I will see how long I can run this before my laziness kicks in :D

Bonus ramblings (Asahi Appreciation)

asahi

If you’re wondering why it says pacashi… I am now running Asahi Linux on my Mac :D

image

Daily driving this is really fun compared to Macos, Although its sometimes pain to run this due to limited 8G ram of my M1 air and lack of USB C Display out support (yet as of now).

If y’all haven’t heard of asahi linux project, Enjoy

Maybe I might write a post about it in future about my experiences with Asahi!

Cheers!