💾 Archived View for gem.chriswere.uk › gemserver.gmi captured on 2022-01-08 at 13:36:58. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
This document is a work in progress. If you have any suggestions for this page, please feel free to get in touch via Mastodon/Fediverse @chriswere@linuxrocks.online.
A video tutorial accompanying these instructions on PeerTube
Download Agate from Github with this command. It's probably best to go to github.com directly for the latest version, but you can download Agate using wget with a command similar to this.
wget https://github.com/mbrubeck/agate/releases/download/v2.3.0/agate.x86_64-unknown-linux-gnu.gz
Unzip the file using Gunzip
gunzip agate.x86_64-unknown-linux-gnu.gz
Make the binary executable
chmod +x agate.x86_64-unknown-linux-gnu
Create the systemd service. This makes sure that the server is started after every reboot. This command uses the nano text editor.
sudo nano /etc/systemd/system/agate.service
Copy/paste this file inside
[Unit] Description=agate After=network.target [Service] User=USER Type=simple ExecStart=/home/USER/bin/agate.x86_64-unknown-linux-gnu -s --content /home/USER/gemini/ --key /home/USER/certs/key.pem --cert /home/USER/certs/cert.pem --hostname YOURDOMAIN.COM --lang en-GB [Install] WantedBy=default.target
Generate the TLS certificate. Change YOURDOMAIN.COM to the domain of you gemini capsule. The files cert.pem and key.pem should be in the location specified by the systemd service file you just created.
openssl req -new -subj "/CN=YOURDOMAIN.COM" -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -days 3650 -nodes -out cert.pem -keyout key.pem
Start the systemd service
sudo systemctl start agate
Enable the systemd service
sudo systemctl enable agate