Netgrimoire/Netgrimoire/Services/wiki/wiki.md

3.3 KiB

title description published date tags editor dateCreated
wiki Stack Wiki Services for NetGrimoire true 2026-05-03T02:56:58.448Z docker,swarm,wiki,netgrimoire markdown 2026-05-03T02:56:58.448Z

wiki

Overview

The wiki Stack in NetGrimoire consists of three services: wikijs, drawio, and wikijs-db. These services provide a fully functional documentation server, a drawing tool, and a database for storing data, respectively.


Architecture

| Service | Image | Port | Role |

  • WikiJS: requarks/wiki:2 | 3000 | Documentation Server |
  • DrawIO: jgraph/drawio:latest | 8080 | Draw Tool |
  • WikiDB: postgres:16-alpine | 5432 | Database |

Exposed via Caddy domains:

  • wiki.netgrimoire.com
  • draw.netgrimoire.com

Homepage group: Documentation


Build & Configuration

Prerequisites

Set up Docker Swarm manager and worker nodes with the required environment variables.

mkdir -p /DockerVol/wikijs-data
mkdir -p /DockerVol/wikijs/repo
mkdir -p /DockerVol/drawio

Chown if needed.

chown -R user:group /DockerVol/wikijs/
chown -R user:group /DockerVol/drawio/

Environment Variables

Generate environment variables for the services:

export PUID=1964
export PGID=1964

Deploy

Deploy the wiki Stack using the following commands:

cd services/swarm/stack/wiki
set -a && source .env && set +a
docker stack config --compose-file wiki-stack.yml > resolved.yml
docker stack deploy --compose-file resolved.yml wiki
rm resolved.yml
docker stack services wiki

First Run

Post-deploy steps:

  • Initialize the database: docker exec -it wikijs-db psql -U wikijs -d wiki
  • Import data from repository (if applicable)

User Guide

Accessing wiki

Service URL Purpose

Primary Use Cases

Use the wiki as a documentation server for NetGrimoire services and projects.

NetGrimoire Integrations

Connects to other services in NetGrimoire, including Crowdsourced Security and Authentik.


Operations

Monitoring

[kuma monitors from kuma.* labels]

docker stack services wiki
docker service logs -f wikijs -f drawio

Backups

Critical: /DockerVol/wikijs-db Reconstructable: /DockerVol/wikijs-data and /DockerVol/drawio

Restore

Restore the wiki Stack by running ./deploy.sh.


Common Failures

Symptom Cause Fix
Service not available No services up Check service status with docker stack services
Database error Database corruption Run docker exec -it wikijs-db psql -U wikijs -d wiki to initialize database
Drawing tool issues DrawIO data corruption Run docker exec -it drawio to restart server

Changelog

Date Commit Summary
2026-05-02 394193bf Initial documentation for wiki Stack
2026-05-02 5e2763c1 Added Caddy domains and labels
2026-05-02 5630285d Updated service images and environment variables
2026-05-02 f74f9fa0 Improved documentation formatting and structure
2026-05-02 9a96d8cf Added NetGrimoire integrations section
2026-05-02 1df34d3b Fixed minor typos and formatting issues

Generated by Gremlin on 2026-05-03T02:56:58.448Z Source: swarm/wiki.yaml Review User Guide and Changelog sections