My Gemini Shard
2021-03-05
So, I made a Gemini shard. What's Gemini, you ask? It's a new-ish internet
protocol that's low-fi and secure by design. You want text? They got text.
You want links? Bet your ass there's links. You want pictures? Fuck you, buy
a magazine.
Outside of setting up SSL certs, which for a smoothbrain like me was far and
away the biggest hurdle of this enterprise, a Gemini shard is a simple thing to
run and maintain. The markup for the files is a purposely abridged Markdown
knock-off, meaning there isn't a lot of syntax to worry about. If you get into
reddit arguments, you can """design""" a Gemini shard no problem.
(Shard is their term for site, by the way.)
I haven't added much to my shard yet, as I'm a boring loser without much to say
unless you want the details of my wanking schedule. Still, it's nice to have
another little piece of the internet to call home.
Is it a meme? A bit of one, sure. Is it some hipster bullshit? Yeah probably.
It's still neat though.
For educational purposes, I'll tag a brief run-down on setting up a Gemini shard
to the end of this post. It's literally just what I wrote for myself in my
how-to note. Enjoy.
Edit (2021-10-27):
My shard went down months ago and I forgot to mention it, lol. I gave
the machine that was hosting it to my sister and forgot all about the
damn thing. Oh well. You aren't missing much.
Relevant links:
Browsers
Graphical
- Kristall
- Lagrange
- Castor
- GemiNaut (Windows)
Terminal
- Amfora
- Asuka
- Bombadillo (also works for gopher)
Setting up a server
This was annoying to figure out. I think I was overthinking it.
First, to run a server, you'll need server software, duh. I recommend either
Agate
or
Gemserv
Next, after installing either of those, generate and sign a key for yourself
with this:
openssl req -x509 -newkey rsa:4096 -keyout key.rsa -out cert.pem \ -days 3650 -nodes -subj "/CN=example.com"
Note the 'example.com'. If you're running it locally, use 'localhost' or
whatever domain you've got going, I guess. If you're running it somewhere else
like a VPS, use the domain of the site.
Finally, run the server.
Agate: agate --content /path/to/content --key /path/to/key --cert /path/to/cert Gemserv: gemserv CONFIG_PATH (obviously, edit the config first)
The files you need
To run a shard, you'll need at least three things:
- A Key, as generated above
- A Certificate, same
- At least one .gmi file (defaults to index.gmi).
- Optionally, a favicon.txt with a single emoji symbol in it and nothing else
You can add other stuff and navigate via links like a webserver.
Syntax
# level 1 heading ## level 2 heading ### level 3 heading * Bulleted lists ``` Code span (end with ``` as well) > quoted text => path/to/URI URI description These are links, and can be absolute '/path/, relative 'subdir/file', or outside links as well (http:// or gemini://).
As far as I know, gemini purposely provides no provisions for things like images, video, audio, etc. Those will just have to be links, which the browser will have to handle however it likes.