Scroll to navigation

KIWIX(1) General Commands Manual KIWIX(1)

NAME

kiwix-serve - Kiwix HTTP Server

SYNOPSIS

kiwix-serve --library [OPTIONS] LIBRARY_FILE_PATH
kiwix-serve [OPTIONS] ZIM_FILE_PATH ...

DESCRIPTION

The kiwix-serve command is used to run a stand-alone HTTP server for serving ZIM contents over the network.

ARGUMENTS

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(s). Multiple arguments are allowed.

OPTIONS

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.

Listen only on this IP address. By default, the server listens on all available IP addresses.

TCP port on which to listen for HTTP requests (default: 80).

URL prefix on which the content should be made available (default: empty).

Detach the HTTP server daemon from the main process.

Exit when the process with id PID stops running.

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).

Disable the library home button in the ZIM viewer toolbar.

Disable the search box in the ZIM viewer toolbar.

Prevent users from directly navigating to external resources via links in ZIM content.

Number of threads to run in parallel (default: 4).

Maximum number of ZIM files in a fulltext multizim search (default: No limit).

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”.

Override the welcome page with a custom HTML file.

Max number of (concurrent) connections per IP (default: infinite, recommended: >= 6).

Startup even when ZIM files are invalid (those will be skipped)

Print debug log to STDOUT.

Print the software version.

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

AUTHORS

Emmanuel Engelhart <kelson@kiwix.org>
Vasudev Kamath <kamathvasudev@gmail.com>

10 July 2023