Published on

Mini-PC for hosting cool stuff

Authors

Table Of Contents

Table of Contents

Background Info

I was fascinated with the mini-PC's being used for stuff like batocera and after making the last one for myself, I was wondering what to do with the one that I thought was broken.

Turns out that it wasn't broken, I simply had the wrong video output location so it didn't output anything to my monitor... woops.

Regardless, it was a now fully functioning mini-PC that I seemingly had no use for. That is, until I realized that it was time to actualize what I had been preparing these past few months.

Over the past few months, I had been working on how to digitize and amass the entirety of my music library into one collection that is sorted and usable. To achieve this, I had acquired hardware to rip from CDs, vinyls, and cassettes. This was extremely fun, but time-consuming process.

While doing this, I also got the idea to also re-obtain the videos that were lost to ancient technology like the VHS and VHS-C. In doing so, I was hoping to relive personal memories as well as show the power of what I was doing to my family. One example of this, was that we got to see videos of myself as a baby. Videos that none of us had seen in well over 2 decades. This was extremely touching for all of us, and I felt a great sense of pride in being able to do this.

So with the hardware to rip most media types:

  • CD's
  • DVD's
  • VHS & VHS-C
  • Vinyl
  • Cassettes

(Note: Eventually I also bought a Blu-Ray R/W player for Blu-Ray discs.)

I was looking to digitize my collection of stuff for my family.

Jellyfin

After some research online, I looked into the hardware and software setup required to host my own server to contain this information. Think of it like my own personal Netflix and Spotify. I really dislike the current subscription-based model that software seems to be the norm. It really makes me sad since ownership is now relinquished in exchange for ease of access.

This is personal opinion, but I really dislike it. So in an effort to fight against it, I have always held a personal collection of my media locally. The problem was growing apparent that it was too challenging to handle and store it without a proper method, format, or software. This makes sense since I had been doing this since I was in middle school.

The answer was Jellyfin. It is a software like Plex or Emby that allows you to host your own media content on your own. I really like that it's FOSS and is extremely well supported for end-user devices compared to more new technologies like Emby. That means that I can download the Jellyfin app from the google play store, apple app store, or from the smart TV app list too.

Jellyfin can be connected to the internet, meaning that I could connect to it remotely so long as I had internet connection. It would also organize all the data together in a concise, organized library that I would eventually host myself.

Initially, I was thinking that I would do it once I moved out, but sometimes life just happens. I had the hardware, capabilities, and time to do it.

I started by organizing it on my Windows PC and hosting it via workarounds to just get used to the system. I understood what I needed, and how I would implement it in actuality based on what I had learned from this mini-experiment.

The Windows Jellyfin setup

This setup used my main PC, Windows 11 now (ew) to serve as the host for this jellyfin server. I followed this guide to make the server run via

  • Caddy
  • DuckDNS
  • Jellyfin

all hosted via my windows machine.

It worked fairly well, and setting it up made me understand what I really valued, which was uptime. Sometimes DuckDNS would just go down, and I could not control that. Another big issue was that I was running it on my main machine which meant that I had to keep my beefy PC on all the time, for several days at a time. I wanted to migrate to something that used resources more efficiently (namely power) and was slightly more sophisticated (higher uptime as well as more proper domain).

Technologies used

This setup required:

  • Caddy: Managing server
  • DuckDNS: DNS
  • Jellyfin: Library format and handler

with the programs used to get the media being:

  • EAC (Exact Audio Copy): Rips CD's
  • Handbrake: Rips unencrypted videos (home videos is what I used it for)
  • MakeMKV: Rips both encrypted and unencrypted videos (again home videos that Handbrake failed to read)
  • VLC: Whatever didn't work with the above software, was handled by VLC. Tanky motherfuckin software VLC is. Like a GUI ffmpeg with even more functionality lol.
  • FFMPEG: Media conversion. Sometimes file types were mismatched, or not exactly how I wanted them to be. FFMPEG handled that with ease. Love that software so much.

The Mini-PC solution

When moving to the Mini-PC which I designated as a Debian machine, I needed alternatives to some of these Windows only software. I really didn't want to try to run things in Wine. It would probably work out just fine, but I prefer running programs on the hardware they are designed for. I have had some previous negative experiences with Wine, but in the future perhaps I will touch Wine again.

In essence, I needed to somehow move my library to be linux compatible. Luckily, I had the foresight to store it all on an external hard drive formatted as NTFS so that it could work with both linux and windows easily.

Now with that, I had to actually find the software alternatives and set them up. I also wanted to try to utilize docker so that I could compartmentalize the software to be portable, should I migrate to another machine.

Migrating to the Mini-PC

First, I wanted to get a good design before implementing this stuff. To achieve this, I set up the whole system using Docker. I also wanted more uptime, so I pivoted from DuckDNS to Cloudflare with a custom domain. The rest of the system would remain the same. I would simply have to create it all inside the docker container, and then it would be done!

  • Docker: Containerize the whole shebang
  • Caddy: Server
  • Jellyfin: Media library
  • Cloudflare: DNS

All running on my Debian machine. I chose debian over ubuntu cuz I don't like Gnome as the default. I also had never tried debian before. I also wan

The choice to utilize Debian was severalfold:

  • I don't like Gnome as the default environment. I think it looks nasty. If you like it, that's awesome. It's just not for me. Like pickles. Or Mayo.
  • I had never used debian before and wanted to try it out sometime.
  • I wanted something that was stable with LTS.
  • I absolutely did not want to have to worry about constant updates and stuff.
  • I had little desire to modify the machine to my tastes, beyond the minimal setup and stuff. This means that out of the box, it should just let me do what I'm trying to do.
  • Good docs and library support (apt is cool.)

Technologies used

Almost all of the software was already linux compatible with readily available apt/other package managers. The only thing that didn't work natively was EAC.

After some brief research online, I found a funny named one called ABCDE that really stuck with me. So I opted to use it for ripping the CD's from then on. It also ran in the terminal, which made the whole process faster for me. It was awesome. Linux is great folks. I highly recommend exploring it and doing wacky shit like this. Just get involved and get your hands dirty.

Media Formats

Music

I store the Music in 16-bit 44.1 kHz quality FLAC. According to research online, namely this source as well as other people's opinions on the internet, I decided on this quality as a maximum limit for what I store my music as. I also tested the other higher qualities and found them overkill which supported the findings from this article.

I also use the FLAC filetype. This filetype is useful since it's lossless and compressed too. The name of FLAC is actually (Free Lossless Audio Codec) which is neat. Compared to wav's it can take up to 50% less space, and also allows for metadata (i.e. tagging).

Tagging

Speaking of Tagging, I utilize MusicBrainz for tagging. It is basically an extremely large database of music metadata. It has everything you would want to tag your CD's and digital music files.

I utilize their software MusicBrainz Picard which is a FOSS that allows you to tag CD's or audio files with their system. It integrates FLAWLESSLY between their website and software version. You can copy the link for the exact CD release that you have in the URL and drag it into Picard, and it is just THERE. ABSOLUTELY MENTAL.

I don't even think people realize how incredible that is given the VAST amount of music information they have in their database. Did I mention that it's *NIX and Windows compatible?

Movies / Video data

I utilize .mkv files since they are lossless and combine all information from the video into a single file.

It was always smaller than wavs, and I could also tag them. Can't beat that.

The Results of Jellyfin migration

With the setup done, I now have a Mini-PC that has all the stuff I need, in a less demanding machine, with even better tools compared to that with the windows setup. What a success! I am extremely pleased with it. I will continue to tinker with it, but am otherwise satisfied with what I've done.

Check out the repo for that stuff here.

Next idea - Discord bot

With the Mini-PC done, I was thinking of what else I could run in a docker container. Several years ago, I had made a discord bot that would do simple things, but never had the funds to host it somewhere. It was just a waste of money to do something extremely niche.

HOWEVER!

With the Mini-PC, I could just run it in a docker container and bam it's done.

I was excited to find another cool use for this Mini-PC that I legit could not stop myself from coding for the rest of the weekend. I normally try to not "work" on stuff over the weekend, but I could not contain my excitement with this new toy.

The idea was to re-create this discord bot and then run it in the docker container.

It doesn't do too much right now, but I will be making small updates over time. I don't really have anything crazy planned, but it's extremely lightweight so it's fine. It's what I would consider a "mini-project".

Check out the repo here.

Reflections

I am really excited and happy with the results that I have gotten already with this thing. I am currently hosting my entire media collection and have 0 expenses besides the device, and domain from Cloudflare.

I am looking forward to making other containers for mini-projects and stuff.

This was a great learning experience too. I feel a bit more comfortable with:

  • docker
  • linux as a whole
  • home-labbing/networking

which are areas that I could definitely improve upon.

I am overall giving this a 10/10 and highly recommend other people in tech do the same thing

What Is _?