clone

a self-hosted multitenant nostr relay with sites, file storage, git hosting, and inbox and outbox delivery

add a Fly edge for the public domain

Dami committed 5b4b941
A small Fly machine joins the tailnet in userspace mode and forwards
HTTP to a tailnet-only listener on the relay host, so the relay and its
sites serve on a real domain without caps or open ports at home.
commit
5b4b9419f1dab80f45dc90704ff7b26b717be432
parent
3d083407cd82c97a9ec79fc4eb3ac75a0803f34b
author
Dami <dami.etoile@gmail.com>
6 files changed, +110 -0
Adeploy/edge/Caddyfile18++++++++++++++
Adeploy/edge/Dockerfile8++++++
Adeploy/edge/fly.toml38++++++++++++++++++++++++++++++
Adeploy/edge/slate.Caddyfile.snippet14+++++++++++
Adeploy/edge/start.sh18++++++++++++++
Mdocs/personal-relay.md14+++++++++++
A deploy/edge/Caddyfile +18 -0
A deploy/edge/Dockerfile +8 -0
A deploy/edge/fly.toml +38 -0
A deploy/edge/slate.Caddyfile.snippet +14 -0
A deploy/edge/start.sh +18 -0
M docs/personal-relay.md +14 -0
@@ -50,6 +50,20 @@ sudo systemctl restart tiny
5050 5151 The owner is `npub1cq2s86qrtadf36eqq3epm38wmhdynrrcwxf84eldk3f94dkv7ttsrulrz5`. Sign in with that identity to manage the relay.5252 53+## Public domain through a Fly edge54+55+The relay is also reachable at `https://012.run`, with sites on `*.012.run`. A small Fly machine, `deploy/edge`, terminates TLS at Fly's edge, joins the tailnet in userspace mode, and forwards plain HTTP over the tailnet to a listener on the relay host that only the tailnet can reach. Fly's proxy has no request body cap and passes WebSockets.56+57+```sh58+cd deploy/edge59+fly deploy60+fly logs --no-tail # first boot prints a Tailscale login link; open it to approve the machine61+fly certs check 012.run62+fly certs check "*.012.run"63+```64+65+DNS at the registrar, all DNS-only records: A and AAAA for `012.run` and `*.012.run` pointing at the app's addresses from `fly ips list`, and a `_acme-challenge.012.run` CNAME from `fly certs setup "*.012.run"` for the wildcard certificate. The relay host's Caddyfile serves `012.run:8080` and `*.012.run:8080` over plain HTTP for the edge; see `deploy/edge/slate.Caddyfile.snippet`. After the certificates issue, set `--public-url https://012.run` on the relay so signed requests, NIP-11 and site hosts use the public name. The ts.net name keeps working through Funnel.66+5367 ## Repository hosting5468 5569 The relay hosts Git repositories over GRASP. Use [ngit](https://ngit.dev) so the owner signs the announcement, the ref state and each push with a remote signer. `ngit account login` shows a QR code to scan with Amber; the key stays on the phone.