As I’ve mentioned before, my brother, The Quiet Learner, has set up his own gemlog and gemini server. I’ve been tinkering with the idea of creating a script or program that reads my WordPress blog and automatically builds a gemlog from that. That way what little technology knowledge I posses is freely available to view by others, even those who dislike the world wide web.

I started out by installing and setting up a gemini server. A quick search online lead me to a write up about it on, but there were a few hiccups along the way, so I’ll post my setup and thoughts.

It started out plain enough, after opening port 1965 in the firewall, I created a new user, called gemini.

root@alaskalinuxuser-PowerEdge-R520:/home/alaskalinuxuser# adduser gemini
Adding user `gemini' ...
Adding new group `gemini' (1002) ...
Adding new user `gemini' (1002) with group `gemini' ...
Creating home directory `/home/gemini' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for gemini
Enter the new value, or press ENTER for the default
	Full Name []: 
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y

Then, after switching to the gemini user, I created some folders, and a bare-bones gemini page:

gemini@alaskalinuxuser-PowerEdge-R520:~$ mkdir bin
gemini@alaskalinuxuser-PowerEdge-R520:~$ mkdir gemini
gemini@alaskalinuxuser-PowerEdge-R520:~$ mkdir certs
gemini@alaskalinuxuser-PowerEdge-R520:~$ cd gemini
gemini@alaskalinuxuser-PowerEdge-R520:~/gemini$ ls
gemini@alaskalinuxuser-PowerEdge-R520:~/gemini$ touch index.gmi
gemini@alaskalinuxuser-PowerEdge-R520:~/gemini$ echo "Gemini server setup in progress..." >> index.gmi 
gemini@alaskalinuxuser-PowerEdge-R520:~/gemini$ cat index.gmi 
Gemini server setup in progress...

I changed directories to my newly created bin folder and downloaded agate for an x86_64 system. Then I gunzipped it and made it executable:

gemini@alaskalinuxuser-PowerEdge-R520:~$ cd bin
gemini@alaskalinuxuser-PowerEdge-R520:~/bin$ wget
--2021-07-20 07:24:44--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: [following]
--2021-07-20 07:24:44--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1036251 (1012K) [application/octet-stream]
Saving to: ‘agate.x86_64-unknown-linux-gnu.gz’

agate.x86_64-unknow 100%[===================>]   1012K  2.86MB/s    in 0.3s    

2021-07-20 07:24:45 (2.86 MB/s) - ‘agate.x86_64-unknown-linux-gnu.gz’ saved [1036251/1036251]

gemini@alaskalinuxuser-PowerEdge-R520:~/bin$ ls
gemini@alaskalinuxuser-PowerEdge-R520:~/bin$ gunzip ./agate.x86_64-unknown-linux-gnu.gz 
gemini@alaskalinuxuser-PowerEdge-R520:~/bin$ chmod a+x ./agate.x86_64-unknown-linux-gnu 

As the root user I edited /etc/systemd/system/agate.service with nano:


ExecStart=/home/gemini/bin/agate.x86_64-unknown-linux-gnu -s --content /home/gemini/gemini/ --key /home/gemini/certs/key.pem --cert /home/gemini/certs/cert.pem --hostname --lang en-GB


But it didn’t work very well. Actually it didn’t work at all when I started the service:

● agate.service - agate
     Loaded: loaded (/etc/systemd/system/agate.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2021-07-20 07:42:57 AKDT; 11min ago
    Process: 34151 ExecStart=/home/gemini/bin/agate.x86_64-unknown-linux-gnu -s --content /home/gemini/gemini/ --key /h>
   Main PID: 34151 (code=exited, status=1/FAILURE)

Jul 20 07:42:57 alaskalinuxuser-PowerEdge-R520 systemd[1]: Started agate.
Jul 20 07:42:57 alaskalinuxuser-PowerEdge-R520 agate.x86_64-unknown-linux-gnu[34151]: Unrecognized option: 's'
Jul 20 07:42:57 alaskalinuxuser-PowerEdge-R520 systemd[1]: agate.service: Main process exited, code=exited, status=1/FA>
Jul 20 07:42:57 alaskalinuxuser-PowerEdge-R520 systemd[1]: agate.service: Failed with result 'exit-code'.

Turns out I needed to edit the ExecStart command a little, I finally came up with this after reading the agate help:

ExecStart=/home/gemini/bin/agate.x86_64-unknown-linux-gnu --content /home/gemini/gemini/ --certs /home/gemini/certs/ --hostname --lang en-GB

And from the logs, I could see it was working. By the way, it makes it’s own certificates, and didn’t use the ones I had previously made. I recommend doing it this way unless you need to use your own pre-made certs.

[2021-07-20T16:25:27Z INFO  agate] No certificate or key found for "", generating them.
[2021-07-20T16:25:27Z INFO  agate] Listening on [[::]:1965,]...
[2021-07-20T16:25:33Z INFO  agate] [::ffff:]:1965 - "gemini://" 20 "text/gemini;lang=en-GB"

And that was it. Now I have a functioning gemini server with a short gemlog. You can check it out if you’d like, but you’ll need a gemini browser, like Castor.


So far it doesn’t say much, though!

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *