---
title: wiki Stack
description: Wiki services for NetGrimoire documentation server
published: true
date: 2026-05-02T03:42:38.085Z
tags: docker,swarm,wiki,netgrimoire
editor: markdown
dateCreated: 2026-05-02T03:42:38.085Z
---

# wiki

## Overview
The wiki stack in NetGrimoire consists of three services: `wikijs`, `drawio`, and a PostgreSQL database managed by `wikijs-db`. The purpose of this setup is to provide a documentation server with features like versioning, collaboration, and drawing capabilities.

---

## Architecture
| Service | Image | Port | Role |
|---------|-------|------|------|
- **Host:** docker4
- **Network:** netgrimoire
- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com (Caddy reverse proxy)
- **Homepage group:** Documentation

---

## Build & Configuration

### Prerequisites
All services require Docker 20.10 or later.

### Volume Setup
```bash
mkdir -p /DockerVol/wikijs/data
mkdir -p /DockerVol/wikijs/repo
mkdir -p /DockerVol/wikijs/ssh:ro
```

### Environment Variables
```bash
PUID=1964
PGID=1964
DB_PASSWORD=F@lcon13
DB_USER=wikijs
DB_NAME=wiki
```

### Deploy
```bash
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
After deployment, enable kuma monitoring by running `kuma monitor`.

---

## User Guide

### Accessing wiki
| Service | URL |
|---------|-----|
- **wikijs:** http://wiki.netgrimoire.com (Caddy reverse proxy)
- **drawio:** http://draw.netgrimoire.com (Caddy reverse proxy)

### Primary Use Cases
This service is used for NetGrimoire documentation server.

### NetGrimoire Integrations
This service integrates with `monitors` and `diun`.

---

## Operations

### Monitoring
```bash
docker stack services wiki
kuma monitor --format json
```

### Backups
Critical data should be stored in a secure location like AWS S3 or Google Cloud Storage.

### Restore
Restore from Docker Swarm by running `./deploy.sh` and then redeploy the service.

---

## Common Failures
| Failure | Symptom | Cause | Fix |
|--------|---------|------|-----|
1.  Service not responding to requests | Request timeout error | PostgreSQL connection issues or network downtime | Restart PostgreSQL service.
2.  Caddy reverse proxy configuration errors | Caddy does not forward requests properly | Incorrect Caddy configuration | Update `caddy.yml` file.
3.  Docker Swarm container deployment fails | Container image cannot be pulled from Docker Hub | Network connectivity issue with Docker Swarm manager node | Update Docker Swarm network configuration.

---

## Changelog

| Date | Commit | Summary |
|------|--------|---------|
| 2026-05-01 | 08373d81 | Initial service setup for wiki documentation server. |
| 2026-05-01 | 8502d4ea | Fixed Caddy reverse proxy configuration for `wikijs` service. |
| 2026-05-01 | dae11c17 | Implemented PostgreSQL database management by `wikijs-db`. |
| 2026-05-01 | 94ce222e | Integrated `drawio` drawing server with Caddy reverse proxy. |
| 2026-05-01 | 4e40ea86 | Fixed Docker Swarm deployment issues for all services in the wiki stack. |

Generated by Gremlin on 2026-05-02T03:42:38.085Z
Source: swarm/wiki.yaml
Review User Guide and Changelog sections