generated from alex/base-template
Gohper and Gemini server baked by ATproto
- Crystal 98.4%
- Just 1.1%
- Dockerfile 0.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
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
|
||
| .forgejo/workflows | ||
| scripts | ||
| spec | ||
| src | ||
| .ameba.yml | ||
| .env.example | ||
| .gitignore | ||
| banner.txt | ||
| CHANGELOG.md | ||
| Containerfile | ||
| justfile | ||
| lefthook.yml | ||
| LICENSE | ||
| README.md | ||
| renovate.json | ||
| shard.lock | ||
| shard.yml | ||
💎 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:
Setup
just setup # Install dev dependencies (Ameba) and build the bin/ameba launcher
just # List all available commands
License
MIT — see LICENSE.