kiwix-serve1
Kiwix http server
Usage
kiwix-serve --library
[OPTIONS]
LIBRARY_FILE_PATH
kiwix-serve [OPTIONS]
ZIM_FILE_PATH ...
Overview
The kiwix-serve command is used to run a stand-alone HTTP server for serving ZIM contents over the network.
Arguments
LIBRARY_FILE_PATH-
Path of an XML library file listing ZIM files to serve. To be used only with the --library option. Multiple library files can be provided as a semicolon (;) separated list.
- ZIM_FILE_PATH ...
-
ZIM file path(s). Multiple arguments are allowed.
Options
-
--library -
By default, kiwix-serve expects a list of ZIM files as command line arguments. Providing the --library option tells kiwix-serve that the command line argument is rather a library XML file.
-
-i ADDR, --address=ADDR -
Listen only on this IP address. By default, the server listens on all available IP addresses. Alternatively, you can use special values to define which types of connections to accept:
all : Listen for connections on all IP addresses (IPv4 and IPv6).
ipv4 : Listen for connections on all IPv4 addresses.
ipv6 : Listen for connections on all IPv6 addresses.
-
-p PORT, --port=PORT -
TCP port on which to listen for HTTP requests (default: 80).
-
-r ROOT, --urlRootLocation=ROOT -
URL prefix on which the content should be made available (default: empty).
-
-d, --daemon -
Detach the HTTP server daemon from the main process.
-
-a PID, --attachToProcess=PID -
Exit when the process with id PID stops running.
-
-M, --monitorLibrary -
Monitor the XML library file and reload it automatically when it changes.
Library reloading can be forced anytime by sending a SIGHUP signal to the “kiwix-serve” process (this works regardless of the presence of the “--monitorLibrary”/“-M” option).
-
-m, --nolibrarybutton -
Disable the library home button in the ZIM viewer toolbar.
-
-n, --nosearchbar -
Disable the search box in the ZIM viewer toolbar.
-
-b, --blockexternal -
Prevent users from directly navigating to external resources via links in ZIM content.
-
-t N, --threads=N -
Number of threads to run in parallel (default: 4).
-
-s N, --searchLimit=N -
Maximum number of ZIM files in a fulltext multizim search (default: No limit).
-
-z, --nodatealiases -
Create URL aliases for each content by removing the date embedded in the file name.
The expected format of the date in the filename is “_YYYY-MM”. For example, a ZIM file named “wikipedia_en_all_2020-08.zim” will be accessible both as “wikipedia_en_all_2020-08” and “wikipedia_en_all”.
-
-c PATH, --customIndex=PATH -
Override the welcome page with a custom HTML file.
-
-L N, --ipConnectionLimit=N -
Max number of (concurrent) connections per IP (default: infinite, recommended: >= 6).
-
-k, --skipInvalid -
Startup even when ZIM files are invalid (those will be skipped)
-
-v, --verbose -
Print debug log to STDOUT.
-
-V, --version -
Print the software version.
-
-h, --help -
Print a help message.
Examples
Serve a single ZIM file:
kiwix-serve myzim.zim
Serve multiple ZIM files:
kiwix-serve zim1.zim zim2.zim zim3.zim
Serve ZIM files from a library:
kiwix-serve --library library.xml
Documentation
Online documentation: https://kiwix-tools.readthedocs.io/en/latest/kiwix-serve.html
Source code: https://github.com/kiwix/kiwix-tools
More info: https://wiki.kiwix.org/wiki/Kiwix-serve
Releases
4 releases since Debian 11 (Bullseye); the text changed 2 times.
--address since Debian 13 (Trixie);
--blockexternal since Debian 13 (Trixie);
--customIndex since Debian 13 (Trixie);
--help since Debian 13 (Trixie);
--ipConnectionLimit since Debian 13 (Trixie);
--monitorLibrary since Debian 13 (Trixie);
--nodatealiases since Debian 13 (Trixie);
--nolibrarybutton since Debian 13 (Trixie);
--nosearchbar since Debian 13 (Trixie);
--searchLimit since Debian 13 (Trixie);
--skipInvalid since Debian 13 (Trixie);
--threads since Debian 13 (Trixie);
--urlRootLocation since Debian 13 (Trixie);
--version since Debian 13 (Trixie);
-L since Debian 13 (Trixie);
-M since Debian 13 (Trixie);
-V since Debian 13 (Trixie);
-a since Debian 13 (Trixie);
-b since Debian 13 (Trixie);
-c since Debian 13 (Trixie);
-d since Debian 13 (Trixie);
-h since Debian 13 (Trixie);
-i since Debian 13 (Trixie);
-k since Debian 13 (Trixie);
-m since Debian 13 (Trixie);
-n since Debian 13 (Trixie);
-p since Debian 13 (Trixie);
-r since Debian 13 (Trixie);
-s since Debian 13 (Trixie);
-t since Debian 13 (Trixie);
-v since Debian 13 (Trixie);
-z since Debian 13 (Trixie).
--index until Debian 12 (Bookworm).