Gohper and Gemini server baked by ATproto
  • Crystal 98.4%
  • Just 1.1%
  • Dockerfile 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alexander Fortin ce7ad81348
All checks were successful
Release / build-and-push-1 (push) Successful in 1m28s
Release / build-and-push (push) Successful in 0s
Release / publish-release-1 (push) Successful in 7s
Release / publish-release (push) Successful in 0s
Release / deploy-1 (push) Successful in 3s
Release / deploy (push) Successful in 0s
chore(release): v0.3.0
2026-11-08 07:48:54 +07:00
.forgejo/workflows fix(ci): use correct name for release deploy step 2026-10-26 21:13:59 +07:00
scripts chore: remove release.cr 2026-10-27 20:59:49 +07:00
spec feat: add gemini server 2026-11-08 07:27:07 +07:00
src feat: add gemini server 2026-11-08 07:27:07 +07:00
.ameba.yml feat: first draft 2026-10-26 16:18:46 +07:00
.env.example feat: add gemini server 2026-11-08 07:27:07 +07:00
.gitignore feat: first draft 2026-10-26 16:18:46 +07:00
banner.txt feat: add support for banner file 2026-10-27 08:03:02 +07:00
CHANGELOG.md chore(release): v0.3.0 2026-11-08 07:48:54 +07:00
Containerfile feat: add gemini server 2026-11-08 07:27:07 +07:00
justfile refactor: cleanup from unused code 2026-10-31 16:59:25 +07:00
lefthook.yml feat: first draft 2026-10-26 16:18:46 +07:00
LICENSE feat: first draft 2026-10-26 16:18:46 +07:00
README.md feat: add gemini server 2026-11-08 07:27:07 +07:00
renovate.json feat: first draft 2026-10-26 16:18:46 +07:00
shard.lock feat: first draft 2026-10-26 16:18:46 +07:00
shard.yml chore(release): v0.3.0 2026-11-08 07:48:54 +07:00

💎 Crystal Goph 💎

A Gopher and Gemini server backed by an ATproto PDS, written in Crystal.

Serves your Bluesky posts, profile, and images as a Gopher hole and Gemini server over TCP — the PDS is the source of truth.

See it in action

You can find my Crystal Goph powered phlog at gopher://gopher.l3x.in and its Gemini mirror at gemini://gemini.l3x.in.

How to run it

Configuration via environment variables only:

Variable Default Meaning
DID — (required) did:plc:... — the repo owner DID
PDS_URL resolved via plc.directory from the DID optional override, e.g. https://social.l3x.in
LISTEN_BIND 0.0.0.0 bind address
GOPHER_PORT 7070 gopher listen port
GEMINI_PORT 1965 Gemini front end port — terminates TLS itself when GEMINI_CERT_FILE/GEMINI_KEY_FILE are set (Gemini mandates TLS); otherwise speaks plain TCP for use behind a TLS-terminating front end
GEMINI_CERT_FILE `` PEM cert chain enabling TLS on the Gemini port (requires GEMINI_KEY_FILE)
GEMINI_KEY_FILE `` PEM private key for the Gemini TLS cert (requires GEMINI_CERT_FILE)
ADVERTISE_HOST localhost host written into gophermaps
ADVERTISE_PORT GOPHER_PORT port written into gophermaps
CACHE_DIR ./cache snapshot + blob cache
POLL_INTERVAL 60 seconds between PDS head checks
LOG_LEVEL info debug/info/warn/error/none
ROOT_BANNER_FILE `` path to the banner file

Run as:

  • (Podman) container: podman run --rm forge.l3x.in/alex/crystalgoph:latest
  • or build the binary: crystal build --release --output crystalgoth src/main.cr && ./crystalgoth

Binary accepts a --help flag to list currently available options, starts the server if no flags given.

Development

Requirements:

  • Crystal >= 1.22.0 (runtime)
  • Just >= 1.59.0 (task runner)

Setup

just setup  # Install dev dependencies (Ameba) and build the bin/ameba launcher
just        # List all available commands

License

MIT — see LICENSE.