A self-hosted, federated soundcloud. Funkwhale.

My desire to self-host all the services I currently pay for continues unabated and Soundcloud is next. Although it remains a great place to discover artists and share music, for my purposes (uploading my terrible mixes) it’s overkill. Those €100 I can redirect elsewhere, in this case a Plex lifetime pass for even more self-hosting haha.

Anyway, Funkwhale has been on my radar for a while and I decided to add yet another service to the raspberry pi at home. I wish I could say the process was easy and fast, because it was the exact opposite. Although the documentation is extensive, I encountered a huge variety of hardware, software and miscellaneous problems that turned this into a huge timesink. Along the way I learned a couple of things about janitoring services and about myself, namely that my time is clearly worthless. In no particular order, here are some of the problems I encountered.

  • ARM architectures (the raspberry pi) do not support most docker images. You’ll either have to extensively tweak and rebuild the image, or hope someone has done that for you. The errors are cryptic, the build process is slow, and the whole value-prop of docker saving you time goes out the window. To funkwhales credit there are a bunch of clear instructions in the docs, but I still ultimately failed and went with the python installation.
  • Someone tipped me off that Yunohost comes with Funkwhale already bundled, but that only led to other weird-ass problems like not detecting the correct external ip associated with my domain. For some reason that I don’t care enough to discover, yunohost resolves the ip of the pi by calling out to ip.yunohost.org, which returns something completely different that curling https://api.ipify.org or other public ip reporting services. My existing tried & tested method for performing dynamic dns on this domain is to simply curl once more to the cloudflare API in order to update the A record when my isp issues a new external ip.
  • Lots of troubleshooting the external hard drives: undervoltage errors and mysterious unmounting (despite having their own power supplies, which lead me to conclude that the power supply of the pi itself wasn’t up to snuff), bad superblocks (never buy Western Digital products, but I knew this already). Ultimately I just jammed a 16gb usb key in there and called it a day. The syncthing agent will automatically pull down any new files from the appropriate folder on my desktop, where the mixing deck is connected. Oh, and if you ever get around to using syncthing seriously, absolutely do manually specify which device is pull-only, and definitely do not accidentally leave the default bi-directional sync on. Like me, you will regret it. Oh, and turn on versioning.
  • Funkwhale will refuse to import music tracks without metadata or tags. Do you know which types of music files are generated without artist, year, genre or title? That’s right, mixes. Thus, you need to run MusicBrainz Picard and manually specify metadata.
  • One of the appealing features of soundcloud is that you can listen without registering an account, which is contrary to the Funkwhale use-case: you are meant to register an account on some instance which grants you listening access. I want my mixes anonymously accessible, so I had to tweak the surprisingly unintuitive permissions of funkwhale in order to allow that.
  • There’s probably a bunch more annoying things I solved along the way that I forgot about but hey, that’s why they pay you the big bucks in IT; the capacity for dealing with continuous frustration.

After much struggle, the service is now live over at https://choons.rpavlov.com/library/