Danny's Lab

Engineering the World

A Wiki for the Home

Published on: Aug 21, 2023
Reading time: 2 minutes

Background

With our growing home (digital) infrastructure, I needed a simple web-page for my home network so that my family knows where to find our various intranet services. At first I was going to a simple web page (either plain HTML or perhaps using Publish. It would've been a little fun to use an LCARS-based theme as well.

But then I realized that at some point my family would probably want to make edits/corrections/additions as well. So I figured it'd be more practicle to find a simple wiki. I had a few basic criterea though:

  • Easy to use UI
  • Simple to manage (ideally no database)
  • Active community
  • Searchable

I was surprised to learn there's a few git-backed wiki's out there, which solves the management problem for me (i.e. not requiring a database). git+markdown also provides the benefit not being locked into a specific choice.

There's numerous lists out there for different wikis. Of the ones I found, I liked these the most:

I actually liked some of the feature set of Jingo more, but then I saw it does not have an anonymous mode. While I do want to have a way to track who makes what changes, I don't have a good Identity management solution implemented yet (more on that later). So I opted for Gollum.

Gollum on QNAP via Container Station 3

While I could always issue docker commands manually, or even install portainer-ce, I'm really trying to decrease the amount of time I have to spend maintaining things in the future. Part of that often means sticking with vendor supported tools even if they don't give me everything I may want. So I'm opting for using QNAP's Container Station to manage my containers right now.

However, installing gollum via docker on QNAP, I kept getting an error: Rugged::ConfigError - repository path '/wiki/' is not owned by current user. I tried various docker tricks, but there doesn't seem to be a way to do uid mapping with Container Station 3. However, I was able to find someone suggest running:

"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",

But I also didn't have a way of doing this. The solution was simple enough. Include in the drive remapping the /root folder and include a .gitconfig file with the content:

[safe] directory = /wiki

Problem solved. Gollumn now runs without error.

My full configuration then includes:

  • Port mapping 80:4567 (tcp) and using NAT, which effectively makes this the home page of my QNAP
  • Remap the following drives (local:remote):
/share/ContainerData/gollum-wiki/config:/etc/gollum /share/ContainerData/gollum-wiki/root:/root /share/ContainerData/gollum-wiki/uploads:/uploads /share/ContainerData/gollum-wiki/wikidata:/wiki
  • Change entrypoint to:
/docker-run.sh --local-time

Note: gollum's standard parameters are available here.

Useful environment settings:

  • TIMEZONE=America/Los_Angeles (does not appear to work? TZ is more typical of Docker images, but that did not appear to change anything either)
  • GOLLUM_AUTHOR_USERNAME - set the author's username for git commits
  • GOLLUM_AUTHOR_EMAIL - set the author's email for git commits