all repos — aaoth.xyz @ 5aae3e80a31476c5762720489f911a989891496d

aaoth.xyz website

_posts/2021-06-02-i-launched-a-gemini-capsule-recently.md (view raw)

 1---
 2title: i launched a gemini capsule recently
 3date: 2021-06-02T22:36:43+03:00
 4author: la-ninpre
 5tags: gemini openbsd
 6---
 7
 8i launched my own gemini capsule, yay!
 9
10it is available on the same domain, just type `gemini://aaoth.xyz` in your
11favourite gemini client.
12
13<!--more-->
14
15for those of you that don't know, gemini is a relatively new internet protocol.
16it is already gained popularity among some enthusiasts out there.
17
18it is intended to be simple and lightweight, it's just plaintext. and the whole
19specification is so simple that usable server and/or client for it could be
20written within about 100 lines of code.
21
22learn more on:
23
24[gemini website](https://gemini.circumlunar.space)
25
26## about quirks and vger
27
28firstly i looked through the list of gemini servers on gemini website.
29and one particular server there attracted me. it was `vger`.
30it is saying that it is secure and openbsd-centric.
31
32so i tried installing it. it is even packaged for openbsd, which was pretty
33convenient, even though i don't mind building stuff from source.
34especially if it is not a big bloated thing.
35
36and surprisingly the configuration was **so** simple, that i even hadn't
37realized it for a first couple of minutes.
38but then i wanted to launch some fancy cgi things, such as, for example,
39gemlikes. it is providing simple like and comment system for a blog.
40
41and there vger failed me. maybe it is me failed myself, but i tried all
42possible configuration options. i think, for now vger is not capable of
43running cgi scripts for some parts of the capsule.
44
45in other words, i'm talking about this.
46consider some capsule with tld `gemini://example.com`.
47it serves some static pages on `gemini://example.com/blog/*` and
48`gemini://example.com/about.gmi`.
49gemlikes need three binaries and a `gemlikes.toml` config file.
50they suggest placing them in `/cgi-bin/gemlikes/`.
51i placed them there, but i couldn't make it so it is how it needs to be.
52my vger is serving only cgi or only static pages.
53
54## another try
55
56so i looked though a list again, and found `gmid` there. it seemed like
57a good option too, because it's written in c and openbsd-aware too.
58
59and this was nice expirience, because gmid's config file is very
60similar to other openbsd's tool configs, such as relayd or httpd.
61the only peculiarity with gmid is that it's not yet packaged for
62openbsd, so i had to compile it manually. and also i created the daemon
63script for it in rc.d(8).
64
65here it is, if you need it:
66
67/etc/rc.d/gmid
68```sh
69#!/bin/ksh
70
71daemon="/usr/local/bin/gmid"
72daemon_flags="-c /etc/gmid.conf"
73
74. /etc/rc.d/rc.subr
75
76rc_pre() {
77    ${rcexec} "${daemon} -n ${daemon_flags}"
78}
79
80rc_cmd $1
81```
82
83and of course, my config is in `/etc/gmid.conf`. manpage of gmid contains
84very good descriptions of all the options available.
85
86## thoughts about geminispace
87
88my first impressions of gemini were a little odd. it's a little bit hard
89to read just text, when you are used to graphically overwhelming
90flashing websites with pictures and interactive stuff.
91but after a little bit of time comes the appretiation of the beauty
92of the pure text. 
93
94i can see gemini as a perfect place to host some informative resources,
95personal blogs and also for creative writing.
96and especially the latter, because it is so easy to spin up your own
97instance, i can see at as a great option for writers out there to
98host their content.