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

## Content

Gemini and Amfora

## 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

Description=Agate Gemini Server

ExecStart=/home/USER/.agate/agate -s --content /home/USER/gemini.capsule/ --key /home/USER/.certs/


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 a index.gmi page to test it out, here is an example.

# Gemini Clients

## CLI Clients

  1. Amfora (I user this one)
  2. Azuka
  3. AV-98
  4. Bombadillo

## GUI Clients

  1. Castor
  2. GemiNaut
  3. Kristall
  4. Lagrange

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

# Check the sites in Gemini Protocol




© DarknessCode - LinuxSucks