Covid 19 has changed the world in so many ways we’re all missing that contact and togetherness that seems a bit like a distant memory.

One of the things we’ve all missed this year is meeting up with mates, having a few drinks and listening to some great music together. Parties via video conference have sprung up to to help fill (a bit) this need. So on New Years Eve my mates and I were going to have a get together, I thought wouldn’t it be great for us to share the same tunes, not just listen to a livestream online but be able to have our own online radio station where we can choose the playlist.

I’d saved this article a few months back that built a personal music streaming service that took in feeds from Soundcloud, Spotify (premium only), YouTube playlists, TuneIn radio as well as any local music you happed to have lying around either locally or from my Airsonic server (and loads of others have a look at the other extensions here) and streamed them through Icecast.

So I did what I’ve done so many times in the past spun up a VM, and it work. Cool but rather than pat myself on the back thought “Yeah but can I get it in a container”. So I jumped on docker hub and there were repositories for both Mopidy and Icecast, great I thought. I’ll need to read the docs to get them to work together but we have a solution. Then I found Kasim Lemur’s github repo where already had a working docker-compose file. Even better.

There was an outstanding pull request in his repo, so I forked it, ran the build on my machine. It needed the fix in the pull request. So I amended the mopidy Dockerfile and added the fix and all the extra extensions that I wanted in my implementation and pushed it all backup to Github. Have a look here

I couple of things to note. Security wise there is no authentication for Mopidy so if like me you’re planning to share this with friends you will need to open the relevant ports on your router. I did secure this behind a reverse proxy with Authelia. And secondly the implementation of Icecast exposes far to much over the internet by default so that will need securing, there’s a good stackoverflow question about putting Icecast behind a reverse proxy but it was getting close to party time and I had a quick and dirty solution that would work for new years eve and I could shut everything off afterwards and look closer at at securing Icecast once the headache starts to wear off in the new year.