sylvain durand

Discovering the Gemini protocol

Recently, I made the discovery of the Gemini protocol, developed earlier this year, and I must say I was immediately quite excited about it.

I miss the web of 20 years ago: simpler, open, where you used to browse directories to find some small websites, often made by passionate amateurs. All the content was available, there were no barriers, no social networks, no tracking. The pages did not exceed a few tens of kilobytes.

Above all, we used to meet people there: small personal sites, forums and IRC chats were meeting places where one could share and exchange a lot of things.

Internet has been privatized. The small web still exists, but is buried and hardly appears in search engines anymore. There is more content and people than ever before, and yet one quickly locks oneself into the same routines and circles. Web languages have become so complex that building a new browser has become impossible. We have built an oligopoly.

Gemini takes the daring step of starting from scratch: rather than starting from scratch with HTTP and HTML, it reinvents them, in a deliberately minimalist and non-extensible way.

Gemini server with Agate

It is said that Gemini is designed so that a server or client can be designed in less than 24 hours. In fact, there are already a large number of alternatives! I finally chose Agate.

On my server under Debian, I directly install the binaries from Github.

gunzip agate.x86_64-unknown-linux-gnu.gz
mv agate.x86_64-unknown-linux-gnu agate
chmod +x agate
sudo mv agate /usr/local/bin/agate

I gives the correct writes to /var/gemini (assuming the user is part of www-data group):

mkdir /var/gemini
sudo chown -R www-data:www-data /var/gemini
sudo chmod -R g+rwX /var/gemini

The server is then simply started with:

agate --content /var/gemini/ --hostname domain.tld

The space will then be available at gemini://domain.tld. To start it at boot, I use systemd:

# /etc/systemd/system/agate.service
[Unit]
Description=Agate

[Service]
Type=simple
Restart=always
RestartSec=5
Environment="PYTHONUNBUFFERED=1"
ExecStart=agate --content /var/gemini/ --hostname domain.tld
StandardOutput=file:/var/log/gemini.log
StandardError=file:/var/log/gemini_error.log

[Install]
WantedBy=default.target

We can then start it with:

sudo systemctl start agate

To activate it on reboot:

sudo systemctl enable agate

First page

Gemini uses simple text files, with the extension .gmi.

The specification is particularly simple! Text, without any formating. Possibility to make headings, codes and quotations with a markdown-like language. The links have original syntax with “=>”.

An index.gmi located in /var/gemini should now be available with a Gemini client.

Gemini client

As with servers, there are many possible clients. I chose Amfora, which I find very pleasant to use, and which has the taste of being directly available with pacman.

sudo pacman -Syu amfora

First impressions

Of course, this minimalist tool will only be of interest to a very few. The world on Gemini is very small. A few pages allow to list the servers, and a small search engine is active. A few hundred sites exist, not all of them are active.

On the other hand, browsing these pages allowed me to discover many individuals, with their blogs (or rather their gemlog), and I took the time to read artisanal content that I hadn’t chosen (or that hadn’t been chosen for me), which hadn’t happened for a long time!

Obviously, this protocol will not supplant the web, and it does not pretend to do so. I don’t know if it will gather a sufficient community to live by itself (even if some interesting names, including one of the creators of Sway are there!). But I wish it to find his niche.