Quick setup for a Kiwix server
Kiwix is an application for browsing content packaged from websites like Wikipedia (and other Mikimedia projects), Stack Overflow (and other Q&A websites from Stack Exchange) and many other educational resources without reaching out to the global network. Helpful in areas that are particularly remote or restrictive in terms of traffic or censorship.
This is a setup of Kiwix focused on ease of installation and maintenance using Docker.
🔗 See the website of the Kiwix project for more details
- You will need a supported (amd64, armv7, arm64) hardware platform and enough disk space to store ZIM files
- Your hardware platform should have Linux, Docker and Docker Compose installed
- Download ZIM content files from the internet, e. g. Kiwix Library
- Prefer BitTorrent downloads (
.torrentfiles or magnet links) for larger files to distribute the load - Expect BitTorrent downloads to work only for the more popular files
- Prefer BitTorrent downloads (
- Gather your ZIM files in a certain folder on the device
- Create a new folder for configurations somewhere (e. g.
kiwix-servein your home folder)- Copy over
docker-compose.yamlfrom here into that folder with no changes - Copy over
.envfrom here and replace the values insideKIWIX_FILESneeds to point at a folder that contains ZIM filesKIWIX_PORTcan stay as-is, but feel free to modify according to your preferences
- Copy over
- Run
docker-compose up -dto start- Startup might take a while depending on how many ZIM files you have and how big they are
- You can also run
docker-compose logs -fto see the output of the application, use Ctrl+C or Ctrl+\ to exit
- Navigate to
http://$IP_ADDRESS:$KIWIX_PORTto see your content- Replace
$IP_ADDRESSwith the IP address of your machine - Replace
$KIWIX_PORTwith the number defined in your.envfile - E. g. from the same machine and with the already specified port this could be
http://127.0.0.1:2080
- Replace
How is this better than the official Docker way?
- No redundant list of ZIM files neither in
docker-compose.ymlor in any XML files you'd have to populate usingkiwix-manage— just drop new files into the folder and restart the container for them to be picked up automatically - Host mount is read-only, which is a minor security improvement