💾 Archived View for gemini.uber.space captured on 2023-04-19 at 22:11:09. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-06-03)

➡️ Next capture (2023-07-10)

🚧 View Differences

-=-=-=-=-=-=-

Gemini on Uberspace 🚀

This is a short introduction on how to use Gemini on Uberspace using the Orion Gemini server.

Download Orion binary

Use wget to download the Orion binary:

[isabell@stardust ~]$ wget https://github.com/grisu48/orion/releases/download/v0.1/orion_linux_amd64 -O ~/bin/orion
[…]
HTTP request sent, awaiting response... 200 OK
Length: 5641502 (5.4M) [application/octet-stream]
Saving to: ‘/home/isabell/bin/orion’

100%[=============================================================================>] 5,641,502    383KB/s   in 12s

2022-05-12 10:13:26 (459 KB/s) - ‘/home/isabell/bin/orion’ saved [5641502/5641502]

[isabell@stardust ~]$

Make the downloaded binary executable:

[isabell@stardust ~]$ chmod +x ~/bin/orion
[isabell@stardust ~]$

Download the sample orion.conf file

[isabell@stardust ~]$ wget https://raw.githubusercontent.com/grisu48/orion/master/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 ~]$

Create the content diretory

[isabell@stardust ~]$ mkdir ~/gemini
[isabell@stardust ~]$

Make sure your certificate and key are present

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 ~]$

Open a port

[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.

Edit orion.conf

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

supervisord service

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 ~]$

Cronjob

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 content

Create a file named index.gmi in ~/gemini/ and fill it with your Gemini content.

Access your Gemini site

Use a Gemini client to access your Gemini site at

gemini://isabell.uber.space:41240/

Make your to use your port number and user name instead of 41240 / isabell.

Uberspace

Uberspace manual

Gemini software

Let's Encrypt

Orion

Orion binary

Sample orion.conf