4 **gmid** - dead simple gemini server
10 \[**-c** *cert.pem*]
12 \[**-k** *key.pem*]
17 is a very simple and minimal gemini server.
18 It only supports serving static content, and strive to be as simple as
22 will strip any sequence of
26 in the requests made by clients, so it's impossible to serve content
30 Furthermore, on OpenBSD,
34 are used to ensure that
36 dosen't do anything else than read files from the given directory and
37 accept network connections.
39 It should be noted that
41 is very simple in its implementation, and so it may not be appropriate
42 for serving site with lots of users.
43 After all, the code is single threaded and use a single process.
45 The options are as follows:
49 > The certificate to use, by default is
54 > The root directory to serve.
56 > won't serve any file that is outside that directory.
60 > Print the usage and exit
64 > The key for the certificate, by default is
69 To quickly getting started
71 $ # generate a cert and a key
72 $ openssl req -x509 -newkey rsa:4096 -keyout key.pem \
73 -out cert.pem -days 365 -nodes
75 $ cat <<EOF > docs/index.gmi
79 $ gmid -c cert.pem -k key.pem -d docs
81 now you can visit gemini://localhost/ with your preferred gemini client.
85 * it doesn't support virtual host: the host part of the request URL is
88 * it doesn't fork in the background or anything like that.
90 OpenBSD 6.8 - October 2, 2020