Self-Hosting Wikipedia (and other sites ...) with Kiwix

In this article we'll be deploying Kiwix using docker and docker compose. You can look at the github repositories and contribute to its many projects (server, mobile, browser and desktop apps). Here is an example of what it looks like: Disclaimer ℹ️ This article is helpful if you want to self-host an OFFLINE version of different sites (Wikipedia, Wikitionnary, Stack Exchange, DevDocs ...) in your home, or on a portable server to bring it with you (It should work on a Raspberry-Pi). ⚠️ This article is not for you if you want to host and edit your own version of Wikipedia, but there should be resources on MediaWiki out there. You also don't need this if you just want to read .zim files directly on your local computer or phone, kiwix client apps are largely enough. Setup Instructions This installation was tested on ubuntu 24.04, both server and desktop, but it should work on any system with docker installed. Most of this tutorial is a step-by-step guide largely inspired by joinboiser github repository Pre-requisites A system with docker installed Your favorite command line Your favorite editor Create the project structure and empty files: mkdir -p kiwix/zims mkdir -p kiwix/scripts cd kiwix touch Dockerfile touch docker-compose.yml touch scripts/provision.sh touch scripts/entrypoint.sh chmod +x scripts/provision.sh chmod +x scripts/entrypoint.sh Get static sites data Kiwix uses .zim files, you can find a nice repository on the official kiwix downloads repository.

Mar 13, 2025 - 14:34
 0
Self-Hosting Wikipedia (and other sites ...) with Kiwix

In this article we'll be deploying Kiwix using docker and docker compose. You can look at the github repositories and contribute to its many projects (server, mobile, browser and desktop apps).

Here is an example of what it looks like:

Image description

Disclaimer

ℹ️ This article is helpful if you want to self-host an OFFLINE version of different sites (Wikipedia, Wikitionnary, Stack Exchange, DevDocs ...) in your home, or on a portable server to bring it with you (It should work on a Raspberry-Pi).

⚠️ This article is not for you if you want to host and edit your own version of Wikipedia, but there should be resources on MediaWiki out there. You also don't need this if you just want to read .zim files directly on your local computer or phone, kiwix client apps are largely enough.

Setup Instructions

This installation was tested on ubuntu 24.04, both server and desktop, but it should work on any system with docker installed. Most of this tutorial is a step-by-step guide largely inspired by joinboiser github repository

Pre-requisites

  • A system with docker installed
  • Your favorite command line
  • Your favorite editor

Create the project structure and empty files:

mkdir -p kiwix/zims
mkdir -p kiwix/scripts

cd kiwix

touch Dockerfile
touch docker-compose.yml
touch scripts/provision.sh
touch scripts/entrypoint.sh

chmod +x scripts/provision.sh
chmod +x scripts/entrypoint.sh

Get static sites data

Kiwix uses .zim files, you can find a nice repository on the official kiwix downloads repository.