Skip to content

dannyswat/wikirego

Repository files navigation

wiki rego

Go Server CI React Client CI Docker Build Release

A lightweight, file-based wiki application written in Go with a React front-end. It supports markdown editing, page revisions, user authentication, and inline Excalidraw diagrams.

Features

  • Page Management: Create, read, update, and delete wiki pages.
  • Rich Text Editing: Uses CKEditor for WYSIWYG content editing.
  • Revision History: Track changes and revert to previous revisions.
  • User Authentication: Secure login, password change, and optional account lockout.
  • Excalidraw Diagrams: Draw and embed diagrams directly in pages.
  • File-Based Storage: Uses a simple filedb for data storage—no external database required.
  • Docker Support: Single-container deployment with static Go binary and built React assets.

Live Demo

Quick Start (Pre-built Binary)

Download the latest ZIP for your platform from the Releases page:

Platform File
Linux x64 wikirego-linux-amd64.zip
Linux ARM64 wikirego-linux-arm64.zip
macOS x64 wikirego-darwin-amd64.zip
macOS Apple Silicon wikirego-darwin-arm64.zip
Windows x64 wikirego-windows-amd64.zip

Running on Linux / macOS

# Extract the archive
unzip wikirego-linux-amd64.zip -d wikirego
cd wikirego

# Make the binary executable (Linux/macOS only)
chmod +x wikirego

# Start the server
./wikirego

Running on Windows

:: Extract the ZIP, then from the extracted folder:
wikirego.exe

The application will be available at http://localhost:8080

Environment Variables

Variable Default Description
PORT 8080 Port the server listens on
SERVER_PORT Alternative port variable
HTTP_PLATFORM_PORT Port variable for Azure App Service
TLS_CERT Path to TLS certificate file (enables HTTPS)
TLS_KEY Path to TLS private key file (enables HTTPS)

Example: Run on a custom port

PORT=9090 ./wikirego

Example: Run with HTTPS

TLS_CERT=/path/to/cert.pem TLS_KEY=/path/to/key.pem PORT=443 ./wikirego

When both TLS_CERT and TLS_KEY are set, the server automatically serves HTTPS. If either is missing, the server falls back to plain HTTP.


Quick Start (Docker)

An official Docker image is available on Docker Hub: dannyswat/wikirego

1. Run with Docker

# Pull the latest image
docker pull dannyswat/wikirego:latest

# Start container (maps port 8080)
docker run -d \
  --name wikirego \
  -p 8080:8080 \
  -v $(pwd)/server/data:/app/data \
  -v $(pwd)/server/media:/app/media \
  -v $(pwd)/server/conf:/app/conf \
  dannyswat/wikirego:latest

The application will be available at http://localhost:8080

2. Using Docker Compose

A docker-compose.yml is provided for convenience:

# From project root
docker-compose up -d --build

This will build (if needed) and start the wikirego service, mounting server/data and server/media for persistence.


Custom Build

Prerequisites

  • Go 1.26.2+
  • Node.js 14+ and npm/Yarn
  • Git (if using Go modules from VCS)

1. Build and run manually

# From project root
# 1) Build server
cd server
go build -o wikirego.exe ./cmd/web/main.go

# 2) Build client
cd ../client
npm install
npm run build

# 3) Copy client assets into server/public
rm -rf ../server/public/*
cp -r dist/* ../server/public/

# 4) Run the server
cd ../server
./wikirego.exe

The server listens on port 8080 by default. Browse to http://localhost:8080

2. Windows Build (build.bat)

A simple build.bat script is provided:

cd %~dp0
rmdir /s /q build
mkdir build\data
copy release\* build
mkdir build\public
copy server\public\* build\public
cd server
go build -o ..\build\wikirego.exe
cd ..\client
npm install
npm run build
copy dist\* ..\build\public

Run build.bat and then launch build\wikirego.exe.


Configuration

The application reads files from:

  • Data: data/ (wiki pages, users, and settings)
  • Media: media/ (diagram JSON, SVG, and uploads)
  • Conf: conf/ (FIDO2 and other configuration)
  • Views: views/ (HTML templates)
  • Public: public/ (static assets from React build)

All paths are relative to the working directory where the binary is executed. When using Docker, these are mounted as volumes (see above).

HTTPS / TLS

Set TLS_CERT and TLS_KEY to the paths of your certificate and private key files to enable HTTPS. When only one variable is set (or neither), the server starts in plain HTTP mode.

TLS_CERT=./cert.pem TLS_KEY=./key.pem PORT=443 ./wikirego

License

This project is dual-licensed. You may choose either:

  • AGPLv3: Use and distribute under the terms of the GNU Affero General Public License v3. See LICENSE for details and the full terms.
  • Commercial: Obtain a commercial license from the copyright holder if you need to avoid AGPL obligations for commercial deployments. For commercial licensing inquiries, please contact the wikirego maintainer at https://github.com/dannyswat/wikirego/issues.

When using this project, pick the license that applies to your situation and follow its terms. If you're unsure, consult legal counsel.

About

An open source lightweight and user friendly web based wiki application

Topics

Resources

License

Stars

Watchers

Forks

Contributors