DEV Community

Cover image for Installing a Gemini pod
Jae Beojkkoch
Jae Beojkkoch

Posted on

Installing a Gemini pod

Greetings everyone, this is my first post on there and today, I'll tell you how to install a Gemini pod.

Alt Text

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
Enter fullscreen mode Exit fullscreen mode

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

DOMAIN=my-domain.tld
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Note: you can use SSL certificates from Let's Encrypt, Zerossl or any other source if you wish.

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~
Enter fullscreen mode Exit fullscreen mode

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.

Original article on my blog!.

Top comments (0)