KIWIX(1)

πŸ“¦
version 3.8.2 Β· 3 versions
, in alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

✨ 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 --library option, 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 default kiwix-serve is 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 addresses
    • ipv6 : 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 a SIGHUP signal to the kiwix-serve process β€” and this works whether or not you passed the --monitorLibrary/-M option. 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 to STDOUT. 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 ⭐


πŸ‘‘ 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 πŸ’œβœ¨