summaryrefslogtreecommitdiffstats
path: root/system/kiwix-tools-bin/docs/man/kiwix-serve.1
blob: 69d86b462ebe69ca7d5ca27b1cc4bceceac5da81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
.TH KIWIX 1 "10 July 2023"

.SH NAME
kiwix-serve \- Kiwix HTTP Server

.SH SYNOPSIS

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

.SH DESCRIPTION
The \fBkiwix-serve\fR command is used to run a stand-alone HTTP server for serving ZIM contents over the network.

.SH ARGUMENTS
.TP
\fBLIBRARY_FILE_PATH\fR
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.

.TP
\fBZIM_FILE_PATH ...\fR
ZIM file path(s). Multiple arguments are allowed.

.SH OPTIONS
.TP
\fB--library\fR
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.

.TP
\fB-i ADDR, --address=ADDR\fR
Listen only on this IP address. By default, the server listens on all available IP addresses.

.TP
\fB-p PORT, --port=PORT\fR
TCP port on which to listen for HTTP requests (default: 80).

.TP
\fB-r ROOT, --urlRootLocation=ROOT\fR
URL prefix on which the content should be made available (default: empty).

.TP
\fB-d, --daemon\fR
Detach the HTTP server daemon from the main process.

.TP
\fB-a PID, --attachToProcess=PID\fR
Exit when the process with id PID stops running.

.TP
\fB-M, --monitorLibrary\fR
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
\*(lqkiwix-serve\*(rq process (this works regardless of the presence of the
\*(lq--monitorLibrary\*(rq/\*(lq-M\*(rq option).

.TP
\fB-m, --nolibrarybutton\fR
Disable the library home button in the ZIM viewer toolbar.

.TP
\fB-n, --nosearchbar\fR
Disable the search box in the ZIM viewer toolbar.

.TP
\fB-b, --blockexternal\fR
Prevent users from directly navigating to external resources via links in ZIM content.

.TP
\fB-t N, --threads=N\fR
Number of threads to run in parallel (default: 4).

.TP
\fB-s N, --searchLimit=N\fR
Maximum number of ZIM files in a fulltext multizim search (default: No limit).

.TP
\fB-z, --nodatealiases\fR
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 \*(lq_YYYY-MM\*(rq. For example, a ZIM file named \*(lqwikipedia_en_all_2020-08.zim\*(rq will be accessible both as \*(lqwikipedia_en_all_2020-08\*(rq and \*(lqwikipedia_en_all\*(rq.

.TP
\fB-c PATH, --customIndex=PATH\fR
Override the welcome page with a custom HTML file.

.TP
\fB-L N, --ipConnectionLimit=N\fR
Max number of (concurrent) connections per IP (default: infinite, recommended: >= 6).

.TP
\fB-k, --skipInvalid\fR
Startup even when ZIM files are invalid (those will be skipped)

.TP
\fB-v, --verbose\fR
Print debug log to STDOUT.

.TP
\fB-V, --version\fR
Print the software version.

.TP
\fB-h, --help\fR
Print a help message.

.SH EXAMPLES
Serve a single ZIM file:
.sp
.nf
.B kiwix-serve myzim.zim
.fi

Serve multiple ZIM files:
.sp
.nf
.B kiwix-serve zim1.zim zim2.zim zim3.zim
.fi

Serve ZIM files from a library:
.sp
.nf
.B kiwix-serve --library library.xml
.fi

.SH DOCUMENTATION
Online documentation: https://kiwix-tools.readthedocs.io/en/latest/kiwix-serve.html
.br
Source code: https://github.com/kiwix/kiwix-tools
.br
More info: https://wiki.kiwix.org/wiki/Kiwix-serve

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