KIWIX(1)
β¨ KIWIX(1) β the kiwix-serve page, bestie edition β¨
okay so you opened the manual for kiwix-serve from the General Commands Manual and honestly? iconic choice. let's get into it π
πΈ NAME πΈ
kiwix-serve β the Kiwix HTTP Server. she serves, that's the whole job π«Ά
π¦ SYNOPSIS π¦
kiwix-serve --library [OPTIONS] LIBRARY_FILE_PATH
kiwix-serve [OPTIONS] ZIM_FILE_PATH ...
two ways in, pick your fighter β¨
π DESCRIPTION π
so like, kiwix-serve is the command you run when you want a stand-alone HTTP server that serves up ZIM contents over the network. that's it, that's the vibe. no cap π
π ARGUMENTS π
LIBRARY_FILE_PATHβ the path of an XML library file that lists out the ZIM files you wanna serve. β οΈ this one is only for when you're using the--libraryoption, okay? and plot twist: you can hand her multiple library files as a semicolon (;) separated list. go off πZIM_FILE_PATH ...β ZIM file path(s). multiple arguments? allowed. she's not gonna stop you π
π OPTIONS π
--libraryβ by defaultkiwix-serveis expecting a big ol' list of ZIM files as command line arguments. but if you pass--library, you're telling her "bestie, that command line argument is actually a library XML file". vibe shift π-i ADDR,--address=ADDRβ only listen on this specific IP address. by default she listens on all available IP addresses (generous queen). OR you can use these special values to pick which types of connections to accept:all: listen for connections on all IP addresses (IPv4 and IPv6) π«Άipv4: listen for connections on all IPv4 addressesipv6: listen for connections on all IPv6 addresses
-p PORT,--port=PORTβ the TCP port to listen on for HTTP requests (default:80). yes,80. the classic π-r ROOT,--urlRootLocation=ROOTβ the URL prefix the content should be made available on (default: empty). so like, put her in a lil subfolder of your URLs β¨-d,--daemonβ detach the HTTP server daemon from the main process. she's independent now, she doesn't need you π-a PID,--attachToProcess=PIDβ exit when the process with id PID stops running. attached, literally π-M,--monitorLibraryβ watch the XML library file and reload it automatically when it changes. she's keeping an eye on it π
fyi: library reloading can be forced anytime by sending aSIGHUPsignal to thekiwix-serveprocess β and this works whether or not you passed the--monitorLibrary/-Moption. so yeah, that's always on the table π₯
-m,--nolibrarybuttonβ disable the library home button in the ZIM viewer toolbar. bye button π-n,--nosearchbarβ disable the search box in the ZIM viewer toolbar. no search for you π-b,--blockexternalβ stop users from directly navigating to external resources through links inside ZIM content. gatekeeping, but make it security π‘οΈ-t N,--threads=Nβ how many threads to run in parallel (default:4). multitasking queen π-s N,--searchLimit=Nβ max number of ZIM files in a fulltext multizim search (default:No limit). limitless fr fr πΈ-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. so for example, a ZIM file named wikipedia_en_all_2020-08.zim will be accessible as both wikipedia_en_all_2020-08 and wikipedia_en_all. two names, one file, slay β¨
-c PATH,--customIndex=PATHβ override the welcome page with your own custom HTML file. make it yours, main character energy π-L N,--ipConnectionLimit=Nβ max number of (concurrent) connections per IP (default:infinite, recommended:>= 6). like, pls set this π-k,--skipInvalidβ startup even when ZIM files are invalid (those will be skipped). she's flexible π«Ά-v,--verboseβ print debug log toSTDOUT. she's telling you everything π£οΈ-V,--versionβ print the software version. receipts β-h,--helpβ print a help message. when in doubt π
π 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>
and that's the whole page, bestie!! π¦ this lil masterpiece is dated 10 July 2023, it lives in the kiwix-tools docs, and it's page KIWIX(1) in the General Commands Manual. go serve something iconic πβ¨
π¦ where this page comes from
- alpine 3.24: kiwix-tools-doc 3.8.2-r0 Β· GPL-3.0-or-later
- arch rolling: kiwix-tools 3.8.2-3 Β· GPL-3.0-or-later
- fedora 43: kiwix-tools 3.7.0^20241221git43b0041-2.fc43 Β· GPL-3.0-or-later
- fedora 44: kiwix-tools 3.8.1-2.fc44 Β· GPL-3.0-or-later
- nixos 26.05: kiwix-tools 3.8.2
- nixpkgs unstable: kiwix-tools 3.8.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms