4 d3670d7f 2021-08-13 xhr twind is a simple daemon serving static files over the gemini protocol. It is
5 d3670d7f 2021-08-13 xhr intended to have as few knobs as possible and has no support for a
6 d3670d7f 2021-08-13 xhr configuration file.
11 d3670d7f 2021-08-13 xhr twind is written in plain C and you need to have the following software
14 d3670d7f 2021-08-13 xhr * A C compiler (tested with clang and GCC)
15 d3670d7f 2021-08-13 xhr * LibreSSL or OpenSSL
16 d3670d7f 2021-08-13 xhr * POSIX compatible libc with pthreads support
17 d3670d7f 2021-08-13 xhr * make (both BSD and GNU make will work)
19 d3670d7f 2021-08-13 xhr twind needs a dedicated user called '_twind' and directory to run. The
20 d3670d7f 2021-08-13 xhr Makefile contains a command to create the user. Note that you shall not change
21 d3670d7f 2021-08-13 xhr the user's name and the directory twind needs!
24 d3670d7f 2021-08-13 xhr # make install
27 d3670d7f 2021-08-13 xhr TLS certificates
28 d3670d7f 2021-08-13 xhr ----------------
30 d3670d7f 2021-08-13 xhr twind expects to find a X509 certificate and a corresponding private key
31 d3670d7f 2021-08-13 xhr under the following locations (which cannot be changed):
33 d3670d7f 2021-08-13 xhr * /etc/twind/twind.cert.pem
34 d3670d7f 2021-08-13 xhr * /etc/twind/twind.key.pem
36 d3670d7f 2021-08-13 xhr Either copy your existing keys to these locations or generate a new key and
37 d3670d7f 2021-08-13 xhr certificate via the Makefile. Note that the command overwrites any existing
38 d3670d7f 2021-08-13 xhr key without warning! To generate both key and certificate use the following
39 d3670d7f 2021-08-13 xhr command and provide the hostname via the HN variable. If you don't provide the
40 d3670d7f 2021-08-13 xhr hostname the command will fail!
42 d3670d7f 2021-08-13 xhr # make setuptls HN=example.com
47 d3670d7f 2021-08-13 xhr twind has support for virtual hosts. If your gemini server is called
48 d3670d7f 2021-08-13 xhr example.com you have to create a dedicated sub directory under /var/twind:
50 d3670d7f 2021-08-13 xhr # cd /var/twind
51 d3670d7f 2021-08-13 xhr # mkdir example.com
52 d3670d7f 2021-08-13 xhr # <copy files into the example.com directory>
54 d3670d7f 2021-08-13 xhr In case your server is also reachable via gemini.example.com and you want to
55 d3670d7f 2021-08-13 xhr serve the same content as on example.com you can create a symlink. In case you
56 d3670d7f 2021-08-13 xhr want to serve different content, you have to create a dedicated sub directory.
58 d3670d7f 2021-08-13 xhr twind needs root permissions to start and will drop its privileges as soon as
59 d3670d7f 2021-08-13 xhr possible. It will also chroot to /var/twind.
63 d3670d7f 2021-08-13 xhr For debugging purposes, you can start twind with -df option so that debugging
64 d3670d7f 2021-08-13 xhr and running in the foreground is enabled.