This is the titan2 repo for the dailybuild server.
It the static binary is built in a GitHub runner and sent over to the dailybuild
server automatically after a push in the master
branch.
dailybuild members are free to contribute. Note that the upstream changes will be merged into this repository.
A minimal Gemini server written in Go. Launch your Gemini capsule atop a Titan II rocket.
I did have Titan II down to 110 lines, including whitespace, but the addition of comments, logging and a couple of very necessary security fixes have subsequently bloated the code to 157 lines.
If you have go
installed and a GOPATH
configured, then clone the repo and run go install
:
git clone https://gitlab.com/lostleonardo/titan2.git
cd titan2
go install
Or you can download a prebuilt Linux binary from the 'Releases' page of this project.
Titan II is configured using command line arguments. Provided that you have titan2
in your PATH
,
you can run it like so:
titan2 -hostname my.site -dir /home/ll/gemini -crt /home/ll/certs/crt.pem -key /home/ll/certs/key.pem -port 1965
You can access the help via titan2 -h
.
Rather than provide a full tutorial on this page, I shall simply link to two of the best. This by Chris Were and this by Uoou are both excellent.
They demonstrate the process using Agate, but it should be straightfoward to adapt the steps. Most of what you need is in this repository; simply change the configuration values to match your environment rather than mine.
Titan II takes its lead from Go-Gemini and Melchior and, of course, the Gemini spec, which is a masterpiece of minimalism.
A week or so ago, I was discovering Mastadon and ActivityPub, and thinking about building an ActivityPub server. Then, Gemini swept in and I was truly inspired. The minimalism, the design philosophy, the focus on security and the DIY ethic are a breath of fresh air. Not to mention the aesthetics; Gemini capsules in Geminispace with a protocol positioned somewhere between Mercury (Gopher) and Apollo (the Web). Great stuff.
In my little corner of cyberspace, there has been so much attention lavished on Gemini so quickly that I can't now remember (it's only been a week!) exactly where I first heard or read about it, but it was probably one of the following: Chris Were, HexDSL or Uoou. Those guys have produced some of the best videos on the subject over the past couple of weeks.
Seriously though, the spec is obviously vital; none of the fun that people are having with servers and browsers and reading and writing would be possible without the Gemini protocol.
However, minimal as it is, there are parts of the spec that, for the time being, I do not need and, as result, I have not implemented. If I have overlooked anything essential, however, do please let me know.
I have no use for input at the moment and, to be honest, I need to read up on exactly how it is supposed to work.
Likewise, I don't need a server that implements redirects; all I want to do is serve static content from a single directory. I could add redirects, if required. Would parsing a text file that maps an old URL path to a new URL path fit the bill?
The spec itself acknowledges that minimal implementations are unlikely to make use of this capability.
Titan II successfully launched its first payload into Geminispace on 2021-02-04 at roughly 23:42 GMT.
My Gemini capsule is at: gemini://gemini.lostleonardo.xyz
.