💾 Archived View for gemini.uber.space captured on 2024-08-31 at 11:20:47. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-07-08)
-=-=-=-=-=-=-
This is a short introduction on how to use Gemini on Uberspace using the Orion Gemini server.
Use wget to download the Orion source ZIP file:
[isabell@stardust ~]$ $ wget https://codeberg.org/grisu48/orion/releases/download/v0.1/orion-amd64 --2024-06-25 18:09:44-- https://codeberg.org/grisu48/orion/releases/download/v0.1/orion-amd64 Resolving codeberg.org (codeberg.org)... 217.197.91.145, 2001:67c:1401:20f0::1 Connecting to codeberg.org (codeberg.org)|217.197.91.145|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 6471574 (6.2M) [application/octet-stream] Saving to: ‘orion-amd64’ 100%[==================================================================================================================>] 6,471,574 38.4MB/s in 0.2s 2024-06-25 18:09:44 (38.4 MB/s) - ‘orion-amd64’ saved [6471574/6471574] [isabell@stardust ~]$
Make the binary executable and move it to ~/bin:
[isabell@stardust ~]$ chmod orion-amd64 [isabell@stardust ~]$ mv orion-amd64 ~/bin/orion [isabell@stardust ~]$
[isabell@stardust ~]$ wget https://codeberg.org/grisu48/orion/raw/branch/main/orion.conf -O ~/etc/orion.conf […] HTTP request sent, awaiting response... 200 OK Length: 644 [text/plain] Saving to: ‘/home/isabell/orion.conf’ 100%[=============================================================================>] 644 --.-K/s in 0s 2022-05-12 10:02:04 (18.8 MB/s) - ‘/home/isabell/orion.conf’ saved [644/644] [isabell@stardust ~]$
[isabell@stardust ~]$ mkdir ~/gemini [isabell@stardust ~]$
Uberspace provides Let's Encrypt certificates. These are generated with the first HTTPS request to your (sub)domain. Issue one HTTPS request to your uber.space address to make sure the certificate and key exist:
[isabell@stardust ~]$ curl -s https://$USER.uber.space > /dev/null [isabell@stardust ~]$
The crt and key files should now be present in ~/etc/certificates/
[isabell@stardust ~]$ ll ~/etc/certificates/ total 12 -rw-r-----. 1 root isabell 5950 May 12 10:01 isabell.uber.space.crt -rw-r-----. 1 root isabell 3247 May 12 10:01 isabell.uber.space.key [isabell@stardust ~]$
Since Uberspace doesn't have out of the box Gemini support, your server cannot run on Gemini's default port of 1965.
[isabell@stardust ~]$ uberspace port add Port 41240 will be open for TCP and UDP traffic in a few minutes.
Write down the port number, you will need it in the next step. You will also need to include it in every link to your Gemini page.
Change the Hostname, Bind, Certfile, Keyfile, and ContentDir lines. Make sure to adapt the Hostname, port number and certificate / key file names and paths.
## orion configuration file example ## Please modify this file to your needs ## lines starting with a '#' are comments and will be ignored ## Server hostname and listen address ## Bind ':1965' will bind to any IP address and port 1965 Hostname = isabell.uber.space Bind = :41240 ## TLS certificate ## Note: Those files will be loaded before chroot! Certfile = /home/isabell/etc/certificates/isabell.uber.space.crt Keyfile = /home/isabell/etc/certificates/isabell.uber.space.key ## Content directory ContentDir = /home/isabell/gemini ## Chroot into this directory (uncomment to enable) ## Note: If enabled, the ContentDir needs to be adapted accordingly # chroot = /srv/gemini/ ## Custom user and group ids to run orion as # Uid = 5000 # Gid = 5000
Create a file ~/etc/services.d/orion.ini with this content:
[program:orion] command=%(ENV_HOME)s/bin/orion -config %(ENV_HOME)s/etc/orion.conf startsecs=30
Run `supervisorctl update` to start your service
[isabell@stardust ~]$ supervisorctl update orion: added process group [isabell@stardust ~]$
After 30 seconds, orion should be in status RUNNING:
[isabell@stardust ~]$ supervisorctl status orion RUNNING pid 22348, uptime 0:01:29 [isabell@stardust ~]$
Uberspace regularly updates your Let's Encrypt certificate. This is done when it is accessed via HTTPS and the certificate's expires in less than 30 days. By regularly accessing the HTTPS site and restarting the Orion service, it will load the updated certificate. Run `crontab -e` to edit your crontab in your default editor and enter
@monthly /bin/curl -s https://$USER.uber.space > /dev/null 2>&1 @monthly sleep 30 ; /usr/bin/supervisorctl restart orion > /dev/null
Save the crontab.
Create a file named index.gmi in ~/gemini/ and fill it with your Gemini content.
Use a Gemini client to access your Gemini site at
gemini://isabell.uber.space:41240/
Make sure to use your own port number and user name instead of 41240 / isabell.
Updated on 25 June 2024 for Orion v0.1