A lightweight, tree-based Markdown wiki – no database, just a single Go binary.
LeafWiki is designed for teams and individuals who want a clean, fast, and self-hosted knowledge base — with full control over structure, content, and deployment.
MVP released – actively developed LeafWiki is already powering real documentation workflows — but it’s still in early development. It's not yet production-ready for mission-critical teams.
Expect active development, some rough edges, and fast iteration.
Want to try it and help shape it? You’re more than welcome.
LeafWiki now builds and runs natively on:
- Linux (x86_64 and ARM64)
- Windows (x86_64)
- Raspberry Pi (tested with 64-bit OS)
- 🧾 Markdown-first with live editor + preview
- 🌲 True tree-structured pages (nested folders)
- 🔒 Role-based access (admin / editor)
- 🧠 no DB required
- 📂 Per-page assets with upload support
- 🖼️ Embed images and files with Markdown
- ⚙️ Single statically-linked Go binary (no dependencies)
- 🚀 Easily self-hosted (Docker or standalone)
- 🔁 Session auth with JWT tokens + refresh
- 🔍 Search functionality for page titles and content
- 📱 Mobile-friendly design
- 🌐 Public pages (viewable without login)
After trying out tools like Wiki.js, Confluence, and DokuWiki, I wanted something simpler: no database, easy to host, Markdown-based, and truly Git-friendly.
- Why use a database just to store Markdown?
- Why should setup be a weekend project?
- Why can't a wiki just be file-based and fast?
LeafWiki was born out of that frustration — and the desire to have:
- 🧾 Clean Markdown files, organized in folders
- 🧠 A real tree structure, not a flat list
- ⚙️ A single binary with no external dependencies
- 🛠️ Something teams can actually self-host without DevOps pain
It’s not trying to be everything — just a solid, minimal wiki for people who want clarity over complexity.
# Download the latest release from GitHub
chmod +x leafwiki
./leafwiki --jwt-secret=yoursecret
Default port is 8080
, and the default data directory is ./data
.
You can change the data directory with the --data-dir
flag.
✅ Native ARM64 builds are available in the Releases section.
The first time you run LeafWiki, it will create an admin user with the default password admin
.
You can change this password later in the admin settings or by using the CLI:
./leafwiki --admin-password=newpassword --jwt-secret=yoursecret
Note:
--admin-password
(or theLEAFWIKI_ADMIN_PASSWORD
env var) is only used on first startup, when no admin user exists yet.
If you need to reset the admin password, you can do so by running:
./leafwiki reset-admin-password
Flag | Description | Default |
---|---|---|
--jwt-secret |
Secret used for signing JWTs (required) | – |
--port |
Port the server listens on | 8080 |
--data-dir |
Directory where data is stored | ./data |
--admin-password |
Initial admin password (used only if no admin exists) | admin |
--public-access |
Allow public access to the wiki (no auth required) | false |
Instead of CLI flags, you can also configure LeafWiki using environment variables:
Variable | Description | Default |
---|---|---|
LEAFWIKI_PORT |
Port the server listens on | 8080 |
LEAFWIKI_DATA_DIR |
Path to the data storage directory | ./data |
LEAFWIKI_ADMIN_PASSWORD |
Initial admin password (used only if no admin exists yet) | admin |
LEAFWIKI_JWT_SECRET |
Secret used to sign JWT tokens (required) | – |
LEAFWIKI_PUBLIC_ACCESS |
Allow public access to the wiki (no auth required) | false |
These environment variables override the default values and are especially useful in containerized or production environments.
# 1. Clone the repo
git clone https://github.com/perber/leafwiki.git
cd leafwiki
# 2. Install frontend dependencies
cd ui/leafwiki-ui
npm install
npm run dev # Starts Vite dev server on http://localhost:5173
# 3. In another terminal, start the backend
cd ../../cmd/leafwiki
go run main.go
- Tree-based page structure
- Markdown file creation
- Slug + file path mapping
- Move / rename / delete logic
- Markdown editor with preview
- File/image uploads per page
- Simple page title search
- Asset management (images, files)
- Basic JWT auth (session-based)
- Use CodeMirror for Markdown editing
- Add Toolbar with common actions like bold, italic, links, etc.
- Allow Undo/Redo actions
- Allow uploading multiple files at once
- Allow renaming of uploaded files
- Fix caching issues with uploaded assets
- Fix syntax highlighting in preview
- Fix favicon not displayed
- ARM64 support for Raspberry Pi and other ARM devices (thanks @nahaktarun)
- Add Search functionality for page titles and content
- Add Mobile optimizations for better usability
- Allow Public Pages (viewable pages without login)
- Add shortcuts in the editor (e.g. Ctrl+S to save, Ctrl+B for bold, Ctrl+Z for undo, ...)
- Smaller improvements and bugfixes in the UI
- Static pages (Required for SEO and public pages)
- Dogfooding (using LeafWiki to document LeafWiki)
- Showcase release
- Automatic import of existing Markdown files
- Optimistic locking (conflict resolution)
- Versioning (history)
- Git integration
- Automatic update of links
- Simple to run: No container, no DB, just Go
- Simple to host: You know where your data is
- Simple to trust: Markdown is portable & future-proof
Contributions, discussions and feedback are very welcome.
This project is still early – feel free to open issues or ideas!
We now have an official Discord server → ask questions, get help, contribute, or just say hi.
Main channels:
#welcome
– Say hi, introduce yourself#general
– General discussion about LeafWiki (ideas, feedback, off-topic, ...)#support
– Help with issues, questions, or troubleshooting#release-announcements
– Updates on new releases, features, and improvements#questions
– Any questions about the code, structure, roadmap, or contributing
More updates coming soon.
Watch the repo or drop a star ⭐ if you’re curious!