4 min read 897 words Updated Mar 22, 2026 Created Mar 22, 2026
#IT#blog#docker#hugo#nextcloud#obsidian#python

As you probably guessed my first idea was this blog post. It is synchronized with my nextcloud instance and its content is processed by Hugo to make a beautiful site with it. I self-host it behind the traefik reverse proxy. It is also version controlled so that I can track more easily the ideas I got and maybe so that other can I submit theirs

Roadmap

  1. Make a nextcloud folder ✅
  2. Install hugo + nginx (custom docker image) ✅
  3. Traefik configuration ✅
  4. How to automate the changes ? ✅
    1. Detect file change ✅
    2. Rsync Nextcloud files to hugo ✅
    3. Hugo build ✅
    4. Done ! ✅

Solving

The idea was to have something very, very close to the original obsidian sync experience so I though about creating a vault directly on Nextcloud since I have this installed on every devices I have. But the problem was that the iOS app wouldn't let me import a vault. So I installed this: Remotely-Save with that I could save a local vault (perfect for a backup) and push, when I need, the changes on Nextcloud

This plugin supports many standard methods to sync a vault with a cloud provider including Nextcloud. Filling the webdav address and my credentials and I'm now good to go ! I can have a fully local vault backed up on my Nextcloud server. Installing and configuring the plugin on iOS and the first part of the roadmap is fully done !

I then started to make a custom docker image. Nothing too crazy I just need Hugo, Nginx, and the inotifywait command to detect any file change. During this process I learned that when a volume is created during the container launch, the files present in the host mount point are predominant on those present in the container meaning that you wouldn't want to have important files on there during the image building process as they won't be available when the container will be running.

Then I just asked llama3.3 to generate me an nginx config file to serve the static files generated by Hugo, updated the traefik configuration following the configuration I have for other services, and BOOM my site is online, editable with obsidian, from everywhere, backed up locally and with a nice interface.

I did watch this video of networkchuck that I found super helpful I just adapted some things here and there !

Improving

I chose PaperMod for the because for its search page but I could tweak a bit more the theme config file ! And one thing that would be great is to rename some things from my docker container / image that are not clear enough. I remember now that I have some unnecessary dependencies in my docker image due to testing. I need to remove them in order to lighten up the blog image.

I did setup an OpenWebUI page with Ollama so that I have some models to play around (the Ollama part needs to be exposed so I can use the same models on everything I use). Unfortunately, it seems pretty complicated for me to setup a knowledge base based on this entire blog using OpenWebUI is it not as simple a precise the path of the markdown files used to create this blog to OpenWebUI and you are good to go. So I need to find a solution for this.

When changing the theme for PaperMod I also did a complete rework of the blog server structure. Now I have three docker containers:

  1. Hugo -> blog-hugo

    Generates hugo site

  2. Python + docker -> blog-webhook

    has a fastapi http server to handle webhook requests from github (when a push occurs), modifies the Markdown files to update links, and tells the blog-hugo site to generate a new site when a webhook request is received

  3. Nginx -> blog-nginx

    Simply serve the resulting static files generated by Hugo

Now the markdown files are stored on a github repository. Here it is:
https://github.com/TheWhale01/blog-ideas

On NixOS

I created a NixOS module using flakes to have this build blog pipeline on my server (Erebos). Here is the github repo containing the flake definition: https://github.com/TheWhale01/blog-builder With this, I just need to push the changes to my ideas repo and then github will send a webhook request to my server which will trigger a git pull and a site recompilation using Hugo. I improved the python program so that I can create and configure from scratch my Hugo site.

Updates

Some time passed since the last update. And I've discovered new tools ! Hugo was great because I was able to chose between a lot of themes but this came at a price, the configuration was not consistent between each themes so it was pretty hard to make something reliable in NixOS. But that changed when I came across Kiln which does pretty much the same thing as Hugo except that it's made to work with Obsidian vaults. The configuration allows me to choose between different themes and color palettes. This is perfect for my use case so I've update the repository https://github.com/TheWhale01/blog-builder so that it can work with Kiln (which is available directly on NixOS through a flake).

Now I can host multiple vaults on my server with different domain names and configurations without any trouble !