Introduction
Gollum is a wiki system built on top of Git, originally created by GitHub for its own wiki feature. Every page is a file in a Git repository, so you get full version control, branching, and merging for free. It runs as a lightweight Ruby web application.
What Gollum Does
- Renders wiki pages from Git-tracked files in Markdown, AsciiDoc, Org, reStructuredText, and other formats
- Provides a web-based WYSIWYG and raw editor with live preview
- Tracks every edit as a Git commit with full diff and blame history
- Supports file uploads, diagrams via Mermaid and PlantUML, and math via MathJax
- Offers full-text search across all pages using a built-in adapter
Architecture Overview
Gollum is a Sinatra-based Ruby application backed by the Rugged library (libgit2 bindings). Each wiki maps to a single Git repository; page reads are Git tree lookups, and saves are commits. The rendering pipeline converts markup to HTML through a chain of filters (macros, tags, sanitization). Because the store is plain Git, you can clone, edit offline, and push changes back.
Self-Hosting & Configuration
- Install via
gem install gollum(requires Ruby 3.1+ and CMake for Rugged) - Run with
gollum --host 0.0.0.0 --port 4567 /path/to/repo - Use
--allow-uploadsto enable image and file attachments - Configure authentication through a Rack middleware or reverse proxy (Nginx, Caddy)
- Deploy with Docker:
docker run -v wiki:/wiki -p 4567:4567 gollumwiki/gollum
Key Features
- Zero-database architecture — everything lives in Git
- Multi-format markup support with automatic format detection
- Page history, diff view, and revert with standard Git tooling
- Sidebar, header, and footer templates for consistent page layout
- Extensible via custom macros and Rack middleware
Comparison with Similar Tools
- Wiki.js — Full-featured with database, GraphQL API, and built-in auth; heavier to operate
- BookStack — Organized by shelves/books/chapters; MySQL-backed, richer RBAC
- Outline — Collaborative knowledge base with real-time editing; requires PostgreSQL and Redis
- Docmost — Modern collaborative wiki with block editor; needs more infrastructure
- HedgeDoc — Real-time collaborative Markdown; focused on single documents rather than wiki structure
FAQ
Q: Can I use Gollum with an existing Git repository? A: Yes. Point Gollum at any Git repo and it will serve files matching supported markup extensions as wiki pages.
Q: Does Gollum support authentication? A: Gollum itself has no built-in auth. Use OmniAuth middleware, HTTP basic auth via your reverse proxy, or Authelia/Authentik in front.
Q: How do I back up a Gollum wiki? A: The wiki is a Git repo — push it to any remote (GitHub, Gitea, bare server) for backup and redundancy.
Q: Can multiple users edit at the same time? A: Concurrent edits are handled via Git merges. Conflicting changes to the same page will require manual resolution.