Blob


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