All templates

Kiwix Server

v1.0.0

A server for hosting Kiwix (.zim) archives, useful for offline access to Wikipedia and other content.

archivewiki by LeviSnoot
x-arcane:
  icon-light: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/kiwix-light.svg
  icon-dark: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/kiwix-dark.svg
  icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/kiwix.svg
  urls:
    - https://kiwix.org/en/
    - https://wiki.kiwix.org/wiki/Kiwix-serve
    - https://kiwix-tools.readthedocs.io/en/latest/kiwix-serve.html
    - https://github.com/kiwix/kiwix-tools/tree/main/docker/server

services:
  kiwix:
    container_name: kiwix
    image: ghcr.io/kiwix/kiwix-serve:latest
    ports:
      - ${APP_PORT:-8080}:8080
    volumes:
      - ${ZIM_PATH}:/data
    environment:
      - DOWNLOAD=${DOWNLOAD_URL:-}
    command: ["*.zim"]
    healthcheck:
      test:
        ["CMD", "wget", "--spider", "--tries=1", "-q", "http://localhost:8080/catalog/v2/root.xml"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s
    restart: unless-stopped
    labels:
      com.getarcaneapp.arcane.icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/kiwix.svg

README

kiwix-serve is a lightweight web server that allows you to serve ZIM archives.

Before deploying

Review the template environment variables:

  1. Set APP_PORT to the port you want to use for the Kiwix server (default is 8080).
  2. Set ZIM_PATH to the directory where you want to store ZIM files. This directory should be writable by the container and needs to contain at least one .zim file.
  3. Optionally set DOWNLOAD_URL to the URL of a ZIM file to download on startup. This variable only takes one URL.