Self-hosted wiki software: BookStack, Wiki.js, DokuWiki (and offline Wikipedia)
By Pull This RepoPosted 5 min read
Short answer
For a self-hosted wiki, pick BookStack (MIT, MySQL or MariaDB) for tidy team docs, Wiki.js 3 (AGPL-3.0, PostgreSQL) for Markdown and live collaboration, or DokuWiki (GPL-2.0) if you want no database at all. MediaWiki runs Wikipedia itself. To host a copy of Wikipedia, run kiwix-serve in Docker with a ZIM file from Kiwix.
A self-hosted wiki is a website where your team writes and links pages, running on a server you control instead of a paid cloud service. The best known free options are BookStack, Wiki.js, DokuWiki, Outline and MediaWiki, and they differ most in which database they need and how pages are organised. This page compares them with licences, stars and versions from the GitHub API, and requirements from each project's own docs, all read on 22 November 2026. At the end, we show how to run your own offline copy of Wikipedia.
Which self-hosted wiki should you pick?
| Wiki | Best for | Licence | Stars on 22 Nov 2026 | Database | Latest release |
|---|---|---|---|---|---|
| BookStack | structured team docs | MIT | 19,148 | MySQL 8.0+ or MariaDB 10.6+ | v26.09.3, 11 Nov 2026 |
| Wiki.js | Markdown, live collaboration | AGPL-3.0 | 29,357 | PostgreSQL 17 or 18 | 3.5.0, 20 Nov 2026 |
| DokuWiki | simple wiki, no database | GPL-2.0 | 4,745 | none, plain files | release-2026-07-14c, 2 Sep 2026 |
| Outline | internal knowledge base with SSO | Business Source License 1.1 | 41,337 | PostgreSQL and Redis | v1.13.0, 15 Nov 2026 |
| MediaWiki | large public wikis | GPL-2.0 or later | 5,232 (mirror) | MariaDB, MySQL, PostgreSQL or SQLite | releases on mediawiki.org |
Two notes on the GitHub numbers. BookStack's repo description says it is now managed on Codeberg, and MediaWiki's GitHub repo is a mirror, so their stars undercount real use.
Is BookStack the best self-hosted wiki for teams?
It is the most structured. BookStack's README calls it "an opinionated documentation platform" meant to be simple for anyone with basic word processing skills. Content lives in books, chapters and pages, and you can search one book or all of them, which makes it a good self hosted knowledge base for teams that want order more than freeform linking.
The requirements page lists PHP 8.2 or newer, MySQL 8.0+ or MariaDB 10.6+, and Composer 2.2.0+. The easiest install is BookStack's official script on a fresh Ubuntu 26.04 server:
wget https://codeberg.org/bookstack/devops/raw/branch/main/scripts/installation-ubuntu-26.04.sh
chmod a+x installation-ubuntu-26.04.sh
sudo ./installation-ubuntu-26.04.shThe script installs Apache, MySQL 8.4 and PHP 8.5 and prints a random admin password at the end. The docs warn that it could overwrite any existing web setup on the machine, so only run it on a clean server. There are also scripts for Ubuntu 24.04 and 22.04, and community Docker images from LinuxServer.io and solidnerd. Shared hosting is not supported.
What changed in Wiki.js 3?
Wiki.js 3 is out. Its site says "Wiki.js 3.x, Now available", the GitHub releases show 3.3.0 on 9 November 2026 and 3.5.0 on 20 November, and the docs at docs.js.wiki now cover 3.x. Version 3.5.0 added import tools for Confluence, DokuWiki and XWiki.
A big change for self-hosters is the database. The 3.x requirements page says Wiki.js requires PostgreSQL, lists versions 17 and 18, and needs the ltree and pg_trgm extensions. It also needs its own domain or subdomain, because installing in a sub-folder is not supported, and at least 1 GB of RAM on Linux.
With a PostgreSQL container named db on the same Docker network, the docs give this example:
docker run -d -p 8080:3000 --name wiki --restart unless-stopped \
-e "ADMIN_EMAIL=you@example.com" -e "ADMIN_PASS=SuperSecret123" \
-e "DB_HOST=db" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" \
ghcr.io/requarks/wiki:3Use your own email and passwords. The docs say not to use the latest tag, because it is no longer assigned in 3.x. Browse to port 8080 and sign in with the admin details you set.
Should you still run Wiki.js 2?
Only if you already do. The Wiki.js 2 docs, still online at docs.requarks.io, use the ghcr.io/requarks/wiki:2 image and a DB_TYPE setting that accepts MySQL, PostgreSQL, MariaDB, SQL Server or SQLite. That is why many older tutorials show a one container SQLite setup. For a new wiki, start on 3.x with PostgreSQL so you do not face a migration later. If you have an existing 2.x wiki on MySQL, plan the move to PostgreSQL as part of the upgrade.
Why choose DokuWiki?
Because it has no database. DokuWiki's default config stores everything under ./data, with pages in data/pages as text files. Its composer file requires PHP 8.2 or newer. That makes backups as simple as copying a folder, and it runs on very small servers.
It is GPL-2.0, and its last tagged release on GitHub is release-2026-07-14c from 2 September 2026.
Where do Outline and MediaWiki fit?
Outline is a team knowledge base. It is source available under the Business Source License 1.1 rather than OSI open source, and its docs say it does not support email and password login natively, so you need an SSO, OIDC or SAML provider. It runs with PostgreSQL and Redis via Docker Compose. We cover it in more detail in our self-hosted Notion alternatives roundup.
MediaWiki is the software behind Wikipedia. Its requirements page says the latest version needs PHP 8.3.0 or newer and one of MariaDB 10.3+, MySQL 5.7+, PostgreSQL 10+ or SQLite 3.31+, and recommends MariaDB or MySQL because Wikimedia uses MariaDB. On Debian or Ubuntu it suggests starting with:
sudo apt-get install apache2 mariadb-server php php-intl php-mbstring php-apcu php-curl php-mysql php-xmlThen you download MediaWiki, set up a database and run the web installer. It suits large public wikis, and it expects more setup work than the others.
How do you self-host Wikipedia offline?
You do not need MediaWiki for this. Kiwix packs whole websites, including Wikipedia, into single ZIM files, and its kiwix-serve tool (GPL-3.0, release 3.8.2) serves them as a website on your network.
Sizes for English Wikipedia on Kiwix's download server on 22 November 2026:
| File | Contents | Size listed |
|---|---|---|
| wikipedia_en_all_maxi_2026-08 | every article with images | 119G |
| wikipedia_en_all_nopic_2026-06 | every article, no images | 49G |
| wikipedia_en_all_mini_2026-09 | mini edition | 13G |
Kiwix's library also lists Simple English Wikipedia from September 2026 at about 3.1 GB with images, 1.1 GB without and 0.5 GB mini, which is a good way to test first.
Put the ZIM file in a folder, for example /srv/zim, and run the official server image:
docker run -v /srv/zim:/data -p 8080:8080 ghcr.io/kiwix/kiwix-serve '*.zim'Open http://your-server:8080 and browse Wikipedia with no internet connection. The same container can serve several ZIM files at once, and it builds for amd64, arm64 and arm/v7, so a Raspberry Pi with a big drive works.
What is the catch?
- Databases need care. BookStack, Wiki.js, Outline and MediaWiki all need a database you back up and upgrade. DokuWiki is the exception.
- Wiki.js 3 changed a lot. Guides written for Wiki.js 2 may show MySQL or SQLite setups that 3.x no longer supports.
- Outline needs SSO. No built in password login means setting up an identity provider first.
- Offline Wikipedia is big and goes stale. The full English file is 119G and is a snapshot, so download a new one when you want fresh articles.
- Public wikis attract spam. If anyone can edit, plan for accounts, captchas and moderation.
For more apps you can run at home, see the awesome self-hosted list, and if your team also needs chat, our self-hosted Slack alternatives guide covers Mattermost and Zulip.
Pull it. Stash it.
Questions people ask
What is the easiest self-hosted wiki to install?
DokuWiki needs only PHP and stores pages as files in its data folder, so there is no database to set up. BookStack's official Ubuntu script installs everything on a fresh server in one run. Wiki.js is quickest if you already use Docker and PostgreSQL.
Can I self-host Wikipedia?
Yes. Kiwix packs Wikipedia into ZIM files and kiwix-serve shows them in a browser. On 22 November 2026 Kiwix's download server listed the full English Wikipedia with images at 119G, without images at 49G, and a smaller mini edition at 13G.
Does Wiki.js 3 still support MySQL or SQLite?
No. The Wiki.js 3 requirements page says it requires PostgreSQL, with versions 17 and 18 supported, and the ltree and pg_trgm extensions. Wiki.js 2 supported MySQL, MariaDB, SQL Server and SQLite, so check which version a guide is written for.
Is a wiki the same as a knowledge base?
Mostly. A self hosted knowledge base is usually a wiki with stricter structure and permissions. BookStack's books, chapters and pages suit that style better than an open edit wiki like MediaWiki.
Sources
- 1BookStackApp/BookStack
- 2BookStack docs: installation (read 2026-11-22)
- 3requarks/wiki
- 4Wiki.js official site (read 2026-11-22)
- 5Wiki.js docs: requirements (read 2026-11-22)
- 6Wiki.js docs: installation (read 2026-11-22)
- 7Wiki.js 2 docs: Docker (read 2026-11-22)
- 8dokuwiki/dokuwiki
- 9outline/outline
- 10Outline docs: Docker hosting (read 2026-11-22)
- 11wikimedia/mediawiki
- 12MediaWiki manual: installation requirements (read 2026-11-22)
- 13kiwix/kiwix-tools
- 14Kiwix download server: Wikipedia ZIM files (read 2026-11-22)
More repos like this
Get tomorrow's repo in your feed
One free, open source repo a day as a short video, shown working, with the catch named. Pull it. Stash it.
