The New Distributed Wiki


All Pages > Services > The New Distributed Wiki

Introduction

dn42-wiki-go is a lightweight, Git-backed wiki engine designed for DN42. It is based on wiki-ng, aims to replace the old Gollum-based DN42 distributed wiki.

It can serve pages live through its built-in Go HTTP server or generate a fully static HTML export for external hosting. All content is stored in a Git repository, making it easy to replicate across nodes or run in disconnected environments.

Operating Modes

You can run dn42-wiki-go in three different ways:

  1. Run static build once then exit (--build or live=false)
    The App renders all Markdown files into HTML under outputDir and exits.
    Best for setups where your own cron job handles Git sync and file publishing.

  2. Live mode without reverse proxy (live=true)
    The built-in HTTP server directly serves pages, assets, and APIs.
    Suitable for simple deployments.

  3. Live mode behind a reverse proxy
    The reverse proxy (nginx, Caddy, HAProxy, etc.) serves the generated files, and only API endpoints are forwarded to the App.
    See config.example.json for example configs and nginx-vhost.conf for a reverse-proxy reference.

    Recommended for production and anycast nodes.

Features

Quick Start

Pre-built binaries are available in the GitHub releases.

Please do not forget to clone the repository to copy config.example.json(to config.json) and the template folder. They should be put together in the same production directory.

Manual Build

  1. Install Go 1.24+ and ensure the git executable is available in PATH.
  2. Copy the example config: cp config.example.json config.json Then edit the settings you need.
  3. Build for your platform (example: Linux amd64):
    export GOOS=linux
    export GOARCH=amd64
    ./build.sh
    

Determine which user is used to run dn42-wiki-go, then create ~/.gitconfig for this user, which will be used by git.

For example:

[user]
        email = noreply@dn42.jp    
        name = IEDON.DN42 Wiki Mirror(116)

Both systemd socket enabler and UNIX domain socket are supported, check example configuration files: dn42-wiki-go.socket and dn42-wiki-go.service.

If you would like to use with Docker: Dockerfile and docker-compose.yml are also provided, bind proper directories and map config.json for the App to use, then you are all set.

Webhook Endpoints

When webhook.enabled = true, the server exposes:

If webhook.secret is set, requests must include an Authorization header that matches the secret.

Polling Integration

When webhook.polling.enabled = true, the server registers with a remote notify service and triggers /api/webhook/pull whenever a refresh completes.

This is compatible with dn42notifyd and similar tools.

Configuration Reference

All settings are provided through a JSON file. Below is a concise reference of all options.

Runtime

Git

Webhook

Paths and templating

TLS

Logging and client IP handling

Notes