đž Archived View for alaskalinuxuser.ddns.net âş 2021-09-02.gmi captured on 2024-09-29 at 00:15:47. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
">
06w, https://alaskalinuxuser3.ddns.net/wp-content/uploads/2021/07/gemini-
300x235.png 300w, https://alaskalinuxuser3.ddns.net/wp-content/uploads/2021/07/
gemini-768x602.png 768w" sizes="(max-width: 806px) 100vw, 806px" />
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_Techrights.org, 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\nAdding user `gemini' ...\nAdding new group `gemini' (1002) ...\nAdding
new user `gemini' (1002) with group `gemini' ...\nCreating home directory `/
home/gemini' ...\nCopying files from `/etc/skel' ...\nNew password: \nRetype
new password: \npasswd: password updated successfully\nChanging the user
information for gemini\nEnter the new value, or press ENTER for the
default\n\tFull Name []: \n\tRoom Number []: \n\tWork Phone []: \n\tHome Phone
[]: \n\tOther []: \nIs 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\ngemini@alaskalinuxuser-
PowerEdge-R520:~$ mkdir gemini\ngemini@alaskalinuxuser-PowerEdge-R520:~$ mkdir
certs\ngemini@alaskalinuxuser-PowerEdge-R520:~$ cd
gemini\ngemini@alaskalinuxuser-PowerEdge-R520:~/gemini$
ls\ngemini@alaskalinuxuser-PowerEdge-R520:~/gemini$ touch
index.gmi\ngemini@alaskalinuxuser-PowerEdge-R520:~/gemini$ echo "Gemini server
setup in progress..." >> index.gmi \ngemini@alaskalinuxuser-PowerEdge-R520:~/
gemini$ cat index.gmi \nGemini 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\ngemini@alaskalinuxuser-
PowerEdge-R520:~/bin$ wget https://github.com/mbrubeck/agate/releases/download/
v3.1.0/agate.x86_64-unknown-linux-gnu.gz\n--2021-07-20 07:24:44-- https://
github.com/mbrubeck/agate/releases/download/v3.1.0/agate.x86_64-unknown-linux-
gnu.gz\nResolving github.com (github.com)... 192.30.255.112\nConnecting to
github.com (github.com)|192.30.255.112|:443... connected.\nHTTP request sent,
awaiting response... 302 Found\nLocation: https://github-
releases.githubusercontent.com/264589205/6644d980-c827-11eb-92c4-
4b17b81de038?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-
Credential=AKIAIWNJYAX4CSVEH53A%2F20210720%2Fus-east-1%2Fs3%2Faws4_request&X-
Amz-Date=20210720T152424Z&X-Amz-Expires=300&X-Amz-
Signature=3f950f7ff5ce3abe4ffabaeefa74e5b50080dcd54f7936be3cb634238a92bf9f&X-
Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=264589205&response-content-
disposition=attachment%3B%20filename%3Dagate.x86_64-unknown-linux-
gnu.gz&response-content-type=application%2Foctet-stream [following]\n--2021-07-
20 07:24:44-- https://github-releases.githubusercontent.com/264589205/
6644d980-c827-11eb-92c4-4b17b81de038?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-
Credential=AKIAIWNJYAX4CSVEH53A%2F20210720%2Fus-east-1%2Fs3%2Faws4_request&X-
Amz-Date=20210720T152424Z&X-Amz-Expires=300&X-Amz-
Signature=3f950f7ff5ce3abe4ffabaeefa74e5b50080dcd54f7936be3cb634238a92bf9f&X-
Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=264589205&response-content-
disposition=attachment%3B%20filename%3Dagate.x86_64-unknown-linux-
gnu.gz&response-content-type=application%2Foctet-stream\nResolving github-
releases.githubusercontent.com (github-releases.githubusercontent.com)...
185.199.111.154, 185.199.110.154, 185.199.109.154, ...\nConnecting to github-
releases.githubusercontent.com (github-
releases.githubusercontent.com)|185.199.111.154|:443... connected.\nHTTP
request sent, awaiting response... 200 OK\nLength: 1036251 (1012K)
[application/octet-stream]\nSaving to: âÂÂagate.x86_64-unknown-linux-
gnu.gzâÂÂ\n\nagate.x86_64-unknow 100%[===================>] 1012K 2.86MB/
s in 0.3s \n\n2021-07-20 07:24:45 (2.86 MB/s) - âÂÂagate.x86_64-unknown-
linux-gnu.gzâ saved [1036251/1036251]\n\ngemini@alaskalinuxuser-PowerEdge-
R520:~/bin$ ls\nagate.x86_64-unknown-linux-gnu.gz\ngemini@alaskalinuxuser-
PowerEdge-R520:~/bin$ gunzip ./agate.x86_64-unknown-linux-gnu.gz
\ngemini@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:
[Unit]\nDescription=agate\nAfter=network.target\n\n
[Service]\nUser=gemini\nType=simple\nExecStart=/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 alaskalinuxuser.ddns.net
--lang en-GB\n\n[Install]\nWantedBy=default.target
But it didnât work very well. Actually it didnât work at all when I started the
service:
â agate.service - agate\n Loaded: loaded (/etc/systemd/system/
agate.service; enabled; vendor preset: enabled)\n Active: failed (Result:
exit-code) since Tue 2021-07-20 07:42:57 AKDT; 11min ago\n Process: 34151
ExecStart=/home/gemini/bin/agate.x86_64-unknown-linux-gnu -s --content /home/
gemini/gemini/ --key /h>\n Main PID: 34151 (code=exited, status=1/
FAILURE)\n\nJul 20 07:42:57 alaskalinuxuser-PowerEdge-R520 systemd[1]: Started
agate.\nJul 20 07:42:57 alaskalinuxuser-PowerEdge-R520 agate.x86_64-unknown-
linux-gnu[34151]: Unrecognized option: 's'\nJul 20 07:42:57 alaskalinuxuser-
PowerEdge-R520 systemd[1]: agate.service: Main process exited, code=exited,
status=1/FA>\nJul 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 alaskalinuxuser.ddns.net
--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
"alaskalinuxuser.ddns.net", generating them.\n[2021-07-20T16:25:27Z INFO
agate] Listening on [[::]:1965, 0.0.0.0:1965]...\n[2021-07-20T16:25:33Z INFO
agate] [::ffff:192.168.5.251]:1965 - "gemini://alaskalinuxuser.ddns.net" 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.
gemini://alaskalinuxuser.ddns.net
So far it doesnât say much, though!
Linux â keep it simple.