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 (
.torrent
files 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-serve
in your home folder)- Copy over
docker-compose.yaml
from here into that folder with no changes - Copy over
.env
from here and replace the values insideKIWIX_FILES
needs to point at a folder that contains ZIM filesKIWIX_PORT
can stay as-is, but feel free to modify according to your preferences
- Copy over
- Run
docker-compose up -d
to 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 -f
to see the output of the application, use Ctrl+C or Ctrl+\ to exit
- Navigate to
http://$IP_ADDRESS:$KIWIX_PORT
to see your content- Replace
$IP_ADDRESS
with the IP address of your machine - Replace
$KIWIX_PORT
with the number defined in your.env
file - 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.yml
or 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