Dave's part of the internet

Not all of this will be relevant. Or even useful.

Self Hosting is awesome - Komga for comics

2025-01-12 Dave

In my last post about my newly acquired synology server, I talked about how happy I was with the system I had bought and the plethora of options that can be installed via the Synology package manager.

Yeah forget all that, Docker is where it’s at.

I was trying to find a way to see about reading the various books and comics I’ve gotten from Humble Bundle over the years on my phone without having to log into the actual NAS, navigate the filesystem and download the item to my device. There was nothing in the package manager that solved this problem but it didn’t take long to start to stumble across other solutions which blew the package manager out of the water.

I first came across Komga which is a dedicated comic, manga, magazine and (as of recently) an ebook manager. This seemed perfect for what I was looking for and I would find that the UI for the app was exactly what I was looking for with a “bookshelf” style UI where you could browse collections or individual titles as you can see below:

One of the dedicated “libraries” in my collection

Komga was the initial app that drove me to learn more about selfhosting on my own NAS, a feature which Synology themselves do work to empower their users to do with their own supported package called “Container Manager”. This UI wraps around some of the key functionality that docker uses, namely offering a UI to show the images you’ve pulled, the containers actually running, and some basic monitoring of the containers running and the resources being consumed as a result.

I really can’t stress enough how easy it is to use any of the guides on Marius Hosting if you want to get docker up and running on a NAS, they really are idiot proof, tried and tested by yours truly

I had spent a good chunk of my professional career at this point working with docker containers and managing them in kubernetes clusters but for whatever reason, I had yet to set up anything at home so this was not particularly difficult to get up and running but there are definitely a few steps to getting containers running correctly the first while on a synology NAS. In no particular order, here are some issues to watch for when setting them up for the first time.

  1. Create a dedicated folder, as near root as possible for where your docker containers will mount host directories AND store configuration.
  2. Once this dedicated folder is set up, you will need to ensure that the UUID running the docker container has the appropriate permissions to communicate with the folder you have specified. This is the reason I have everything in \volume1\docker.
  3. Inevitably, the above will not be sufficient and if you end up like me, you’ll want to be able to communicate with another folder like \volume1\media\comics, you need to remember to also grant the docker user access to this folder. You’re probably catching on that file permissions are important but I’m stressing them as even though I knew to expect them, they still trip me up regularly.
  4. I’m just going to recommend that if you start adding containers to your nas, consider additional tools such as Watchtower, for automating container updates and Portainer, for managing your containers in a more professional manner

Once docker is up and running, it won’t take long at all to get Komga up and running as a container, and here you can find Marius’s far superior guide on what the configuration for this will look like as you spin up the container in terms of mounts etc. One thing to note here is, if you’re like me and you’ve already got a decent collection that you’re going to get Komga to ingest, be aware that you’re going to want to give this a few hours in it’s initial process as it indexes and catalogs all the literature you have in it’s own internal database. I spent far too much time impatiently waiting to try this out and I would have liked to know this fact before hand.

Once the initial import happened though, I was able to use the web interface to view my files which, while satisfying, didn’t solve the problem I was looking for. Happily, komga is set up to work with a few apps that can connect to it natively to allow “streaming” from the komga server direct to the device. The app I chose was Mihon which I find particularly good to use.

Mihon can then be configured to read your komga server details via a komga extension on the app (more details on that here) where you can enter in the credentials you will have set up also for your komga server when doing it’s initial set up.

So finally I’ve arrived at the point where either my phone or tablet can be used when I’m on the sofa or in the bed to connect to my comics server and catch up on my reading! And that’s just the first step in the self hosting journey!