Jae’s News

Beep Boop

Home > Software > Installing your own Gemini pod

Installing your own Gemini pod

Monday 22 February 2021, by Jae

Gemini is a lightweight protocol made to be private and to be light.
Today, I’ll teach you how to deploy your own server, named "pod" so you can brag about it online.

Prerequisites

  • A brain
  • Some time (20 minutes maximum)
  • A server (dedicated, VPS, magical potato)
  • A domain pointed to that server
  • Basics in Docker
  • Something that tastes good to drink as a reward after

Starting up
For simplicity reasons, we will use docker-compose.
As for the server image, we will use adrianhesketh/gemini.

Create a docker-compose.yml file containing:

version: '2.1'
services:
 gemini:
   image: adrianhesketh/gemini:latest
   ports:
     - 1965:1965
   environment:
     - PORT=1965
     - DOMAIN
   volumes:
     - ./certs:/certs
     - ./content:/content

In order to contain the domain, create a .env file containing:

DOMAIN=my-domain.tld

Now, let’s create the required directories by doing mkdir {certs,content} and move on by generating the certificates.
Navigate in the ’certs’ directory using cd certs and generate the SSL certificates using:

openssl ecparam -genkey -name secp384r1 -out server.key
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650

Now, return to the root (where the docker-compose.yml is) and edit the file content/index.gmi.
Put inside:

# Hello world!
## This is my Gemini Pod~

Now, all you have to do left is to execute docker-compose up -d to start your server.
After booting it up, navigate to your domain using a Gemini browser and you should see a nice page saying "Hello world!".

Congratulations, you have now your own Gemini pod, you can now drink whatever you prepared earlier!
You can learn more about the page syntax of Gemini by going on their official website.