Home server

A decade ago, I have grown frustrated with my multimedia setup. I had hundreds of movies on a computer connected to the television. Navigating the increasingly disorganised collection from the couch was a painful experience. I tried all sorts of solutions, but they usually made the situation even worse.

Out of sheer frustration, I decided to build my own media server. At first, it was a simple page that listed the media files, and launched VLC when you clicked one. Through several redesigns and rewrites, it became a far more complex thing. I added a cover list, authentication, automatic triage, support for episodes and seasons, browser playback, a responsive design, subtitles support, Chromecast support, SSL and so on.

My home server is my longest-running project, and one of my favourites. It does exactly what it should, and it's a great sandbox to test new technologies.

What it does

When a torrent is finished downloading, the media files appear in the triage pile. On the triage page, I associate the files to movies or TV shows. The server pulls the movie title, description and poster from TMDb. The movies then show up in the list.

In the background, the media files are renamed and moved to the media library. In the library, all the files are neatly named and sorted. They are converted to .mp4, and the subtitles are converted to .vtt. This allows the movies to be played in the browser, on the Chromecast, and on mobile devices.

To access any of this, you need a user account. When you are logged in, you have access to the whole collection. You can mark movies as seen, and the web player resumes playback where you left off. There are regular accounts, and administrator accounts. Admins have extra permissions.

How it does it

In its current iteration, my home server is a VueJS frontend, a Django backend and an rq conversion pipeline. The conversion pipeline uses ffmpeg to convert the movies for web playback, and mkvtoolnix to extract subtitles from MKV files. I get movie information and posters from the TMDb API. Everything runs inside Docker containers on a Thinkpad T510 stashed under my kitchen counter.