💾 Archived View for darknesscode.xyz › linux › install-gemini-server.gmi captured on 2024-03-21 at 15:06:25. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-05)

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

Install and Setup a Gemini Server

Several months ago I discovered the **Gemini** protocol in the **HTTP** protocol. I read some articles about it and decide to give it a try and setup my own server.

This is what I did to have up and running my **Gemini Capsule**, I think is not the best way but it works fine.

Amfora and Gemini [img]

Directory Structure

Before install the server and create the systemd service that we need. First create this directories

mkdir .agate .certs gemini.capsule

All the directories were created in the home user.

Generate the TLS Certificate

First let's create the TLS certificates that we need for our capsule, go to the directory that was created

cd .certs

Now run this command

openssl req -new -subj "/CN=yourdomain.xxx" -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -days 1825 -nodes -out cert.pem -keyout key.pem

Change *yourdamain.xxx* for your domain. The certificates that were created will last 5 year, if that is way to much for just change the days you want

Install Agate Gemini Server

There are several server out there for a Gemini server, I choose **Agate** for its simplicity and lightweight

Download the binary file from

wget https://github.com/mbrubeck/agate/releases/download/v2.3.0/agate.x86_64-unknown-linux-gnu.gz

Unpack the file with

gzip -d agate.x86_64-unknown-linux-gnu.gz

For an easy way to work with that file rename it just to agate

mv agate.x86_64-unknown-linux-gnu agate

Move the binary file to its directory and make the binary executable

mv agate .agate/
sudo chmod +x .agate/agate

Setup a Systemd Service

Now to work with **Agate** we need to create a systemd service, since I'm usegin a Debian server systemd is present in the system.

sudo vim /etc/systemd/system/agate.service

Copy and past this code in the new file

[Unit]
Description=Agate Gemini Server
After=network.target

[Service]
User=USER
Type=simple
ExecStart=/home/USER/.agate/agate -s --content /home/USER/gemini.capsule/ --key /home/USER/.certs/

[Install]
WantedBy=default.target

Change USER for your user name or the server user

Start and Enable the Systemd Service

To start and enabled the new server just run

sudo systemctl start agate
sudo systemctl enable agate

If everything goes well, now is time to test you new capsule, here are a list of clients. But first we need an index.gmi

Here is an example

Gemini Clients

CLI Clients

GUI Clients

I haven't use any of the GUI clients, I like to live in the terminal.

That's it!

----------

Home

Linux

Notes

MicroLog

----------

© DarknessCode