I discovered Funkwhale a while back, but didn’t go further than understanding where it fit as a cool “Fediverse” project.
But ever since my 2021 ICT Goals post, I’ve been wanting a media player that lets me play my own music. Stuff that I’ve purchased from Bandcamp/BeatPort/iTunes or from CDs that I’ve purchased and ripped onto my computer. Unfortunately I have three regularly used machines (1 desktop, 2 laptops), plus my phone, meaning a standard music player application isn’t appropriate for managing my library. Nikki and I also want to amalgamate our music collections too, which makes it even harder managing 6+ applications and their connected libraries.
Thankfully I recently remembered Funkwhale again and decided it might solve some of these issues.
- I could run it on some spare hardware or as a VM.
- Each family member could have an account and library.
- We could lock down access so we’re not breaking copyright law.
- We could stream music to any device we’re on, potentially even while we’re out and about.
I’ve had it set up for a few weeks now and thought I would write a post describing my setup and my thoughts so far.
Configuration
I purchased a new Raspberry Pi 4B (4GB) a while back, and set it to work as a new OSMC media server, replacing an old Raspberry Pi 3B+ running the same. It functions as a “home Netflix”, allowing us to stream any of the movies or TV series we’ve purchased and loaded onto our NAS (or DVDs we’ve ripped). It’s plugged into our TV and we can kickstart a show from any phone/computer on the network, or even stream from the RPi to our phone if we want to watch something on a personal device. This also helps play into the ownership of our media and the way in which we access it from the 2021 ICT Goals post.
After I completed the upgreade, I had a Raspbery Pi 3B+ spare, and decided to set it up for use as a Funkwhale server.
The instructions online were pretty clear; I chose the Quick Install option and managed to get up and running quickly (with HTTPS thanks to Let’s Encrypt). I think I had some runaround getting ARM versions of some of the packages; if I do a rebuild I will record the exact steps for posterity.
After it was on and running, I turned down worker concurrency because I found the default setting left it hanging a lot and not being able to work.
The big problem I foresaw however was the 16GB of space I had on the microSD card. But this is where I wanted to explore an idea I’d had in a previous post about my NAS. I set up a SMB share on my FreeNAS box (LBS) which required a username/password, then configured Samba on the RPi to mount it as a share through /etc/fstab
:
//lbs.home.domain/funkwhale /srv/funkwhale/data cifs noperm,_netdev,username=coolguy69,password=ultr4c00l 0 0
Through the Funkwhale web administration I was able to edit user quotas — giving each user about 100GB of space for storage — disabled federation (for now), ensured sure the instance had public registration disabled and registration moderation enabled.
Since I’d set up a domain for my Funkwhale instance and pointed it to my home IP, I also added a routing rule in my HAProxy VM for HTTP and HTTPS so whether on or off the home network we could still get to the Funkwhale instance.
Update 2022-04-22: Make sure to edit your /etc/nginx/sites-enabled/your.funkwhale.domain.conf
config file and increase client_max_body_size
top about 500M
if you’re using FLAC or other lossless files. Otherwise you might have issues uploading any songs over the default 100MB limit.
Update 2022-05-15: If you have a power outage and your NAS reboots and takes longer than your Raspberry Pi, the RPi will not mount the SMB/CIFS share and any new music you upload (before you remount) will be directly onto the Raspberry Pi (instead of the NAS).
Update 2023-08-08: At some point this year I moved this off the Raspberry Pi and to a VM with a bit more grunt. The RPi worked but often froze and needed to be rebooted;
Thoughts
I’ve been slowly loading music as I buy stuff from Bandcamp (weekly, but more on their Bandcamp Fridays). I haven’t done a lot of chill listening so far as there’s a limited amount of music and I’m still using Spotify for playlists and new artist curation. Currently I’m cranking Pulp Glitchin’s PARENTAL GUIDANCE VOL 1 (gotta support the locals) through Funkwhale while I write this post and it’s all going swimmingly.
There’s only one account on my server, for myself; but I might invite my wife soon if she wants a new music option. In terms of uploads I have ~450 songs in either FLAC (new stuff) or 320kbps MP3s (older purchases).
Given that it’s a perfect fresh start for my library, I’ve become really anal about making sure everything has album art and correct names/artists/albums and I have to shout out to MusicBrainz Picard for making that easier. From an organisational perspective I feel better about it than my ~150GB of unlabelled, badly tagged tunez that I’ve aggregated over the years from my own collections and those of friends and other people at LAN parties and get togethers (gosh, some of that feels like a relic of the past).
Looking forward to see what the future brings for my little Funkwhale instance.