Blob


1 .\"
2 .\" Copyright (c) 2021 Matthias Schmidt
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .\"
17 .Dd August 25, 2021
18 .Dt TWIND 8
19 .Os
20 .Sh NAME
21 .Nm twind
22 .Nd Simple gemini server
23 .Sh SYNOPSIS
24 .Nm twind
25 .Op Fl dfV
26 .Op Fl p Ar port
27 .Sh DESCRIPTION
28 .Nm
29 is a simple daemon serving static files over the gemini protocol.
30 It is intended to have as few knobs as possible and has no support for
31 a configuration file.
32 .Pp
33 The options are as follows:
34 .Bl -tag -width Ds
35 .It Fl d
36 Enable debug log messages.
37 Most useful together with
38 .Fl f .
39 .It Fl f
40 Do not daemonize.
41 If this option is specified,
42 .Nm
43 will run in the foreground and log to
44 .Em stderr .
45 .It Fl p Ar port
46 Listen on Port
47 .Ar port
48 instead of the default 1965.
49 .It Fl V
50 Display the version and exit.
51 .El
52 .Pp
53 .Nm
54 listens on the any address (:: and 0.0.0.0) for both IPv4 and IPv6.
55 .Pp
56 .Nm
57 has support for virtual hosts by default.
58 To serve files for a specific host you have to place them in a sub directory
59 named after the domain under
60 .Pa /var/twind .
61 .Pp
62 .Nm
63 starts as root and then drops privileges to a dedicated
64 _twind user.
65 By default, two sub-processes are started jailing themselves with
66 .Xr chroot 8
67 to
68 .Pa /var/twind .
69 .Sh FILES
70 The following path cannot be changed, i.e. you have to name your
71 TLS certificate and key file exactly as shown.
72 .Pp
73 .Bl -tag -width Ds -compact
74 .It Pa /etc/twind/twind.cert.pem
75 TLS certificate for
76 .Nm
77 .It Pa /etc/twind/twind.key.pem
78 Private key for the certificate mentioned above.
79 .It Pa /var/twind/
80 Default location for the gemini (gmi) files.
81 Contains one sub directory for each virtual host.
82 .It Pa /var/twind/example.com/
83 Subdirectory containing gemini files for the
84 .Em example.com
85 host.
86 .It Pa /var/twind/logs/
87 Subdirectory containing access and error logs.
88 .El
89 .Sh EXIT STATUS
90 .Nm
91 normally exists with 0 or with -1 if an error occurred.
92 .Sh AUTHORS
93 .Nm
94 was written by
95 .An Matthias Schmidt Aq Mt xhr@giessen.ccc.de .