Matthew's Wiki Setup

These are my notes on how to spin up a Federated Wiki. If you're really new, it'd be better to read Host a Site first.

⚠️ Below I've used "myuser" and "wiki.matthew.nz" as placeholders for your user and domain. Please pick and use your own.

I have created a basic Docker image repo for Federated Wiki on Github. You can use this to spin up an instance. Project .

Sample docker-compose.yml:

wiki.matthew.nz: build: "images/wiki" entrypoint: "wiki --config /config.json" restart: always volumes: - ./etc/wiki.matthew.nz.json:/config.json:ro - ~myuser/www/wiki.matthew.nz:/root/.wiki:rw

Pick a login provider and use this to format a JSON file from the wiki-security-passportjs plugin and save it out to "wiki.matthew.nz.json". Providers

{ "farm": false, "url": "wiki.matthew.nz", "security_useHttps": true, "security_type": "passportjs", "github_clientID": "FROM_PASSPORTJS_GUIDE", "github_clientSecret": "FROM_PASSPORTJS_GUIDE" }

You can rotate secrets, change icons, or modify the app name from the Developers area in Github. Settings

Periodic Updates

Sample config ~myuser/www/wiki.matthew.nz.json:

You can run updates on a schedule using Cron and scripts using Make.

Sample cron /etc/cron.d/maintenance:

MAILTO=spam@matthew.nz # minute (0-59), # | hour (0-23), # | | day of the month (1-31), # | | | month of the year (1-12), # | | | | day of the week (0-6 with 0=Sunday). # | | | | | user # | | | | | | commands 30 0 * * 3 myuser cd ~myuser/docker && make

Backups

Based on this setup, you should make regular backups of the ~/wiki folder. A good tool to do this is Restic, but I've seen examples of federated wiki farm backups that just push straight to github.

Customise

Wiki icons can be changed from the About Flagmatic Plugin page. This can be helpful if you're trying to distinguish yourself from other Wiki's.