No description
Find a file
2022-01-05 17:02:05 -03:00
contrib v0.1.0 -- serve gemtext files 2022-01-05 17:02:05 -03:00
src v0.1.0 -- serve gemtext files 2022-01-05 17:02:05 -03:00
.gitignore v0.1.0 -- serve gemtext files 2022-01-05 17:02:05 -03:00
LICENSE v0.1.0 -- serve gemtext files 2022-01-05 17:02:05 -03:00
Makefile v0.1.0 -- serve gemtext files 2022-01-05 17:02:05 -03:00
README.md v0.1.0 -- serve gemtext files 2022-01-05 17:02:05 -03:00
shard.yml v0.1.0 -- serve gemtext files 2022-01-05 17:02:05 -03:00

gemini

This is a Gemini server for ad-hoc hosting. It depends on a TLS termination service like Nginx or HAProxy. This allow us to configure TLS like we need to and offload safety to a better reviewed project.

Installation

crystal build --release src/gemini.cr
strip --strip-all ./gemini
install -m 755 ./gemini /usr/local/bin/gemini
# Or
make gemini
sudo make install

Usage

gemini runs on port 19650/tcp without security on. Make sure to keep this port closed on your firewall, but open 1965/tcp for TLS connections.

gemini expects to serve files from the directory it's run from, and serves several hosts under their own directory.

# Enter the directory you're hosting capsules from
cd /srv/gemini
# Create a directory for the capsule
install -dm 750 -o user -g gemini gemini.sutty.coop.ar
# Create a Gemtext file
echo "Hi" > gemini.sutty.coop.ar/index.gmi
# Run the server
gemini

Configure your Nginx server to proxy Gemini requests to gemini. There's an example configuration on contrib/.

To test your setup, visit gemini://gemini.sutty.coop.ar

Self-signed certificates

The example configuration reuses the Let's Encrypt certificates we already issue at Sutty for our sites. If you want to use a self-signed certificate, GnuTLS provides the simplest way.

certtool --generate-privkey --outfile gemini.key
certtool --generate-self-signed --load-privkey gemini.key --outfile gemini.crt

The only fields required are CN for your domain, and a certification duration in days, you can press Enter for everything else.

Development

You'll need to install Crystal ~>1.2.2.

Gemini Specification v0.16.0

Contributing

# 1. Fork it
git clone https://gitea.sutty.coop.ar/Sutty/gemini.git
cd gemini
git remote rename origin upstream
# 2. Work on your changes
# [...]
# 3. Send patches
git format-patch upstream
git send-email --to=f@sutty.coop.ar *.patch