Something went wrong. Try again.
Something went wrong. Try again.
README.md
ziran-relay — sm service #
The hosted relay for Ziran live sessions (wss://relay.ziran.space/ws), run
behind the supramundane Caddy front.
Deploy:
deno task build:relay # cross-compiles the relay → deploy/relay/relay-linux-x64
cd deploy/relay
sm deploy # or: sm deploy --local (serves relay.ziran.bast)
Notes:
- No secrets. Production auth is atproto service-auth: the relay verifies
each caller's ~60s JWT against their public DID document. Dev HMAC tokens
are disabled via
ZIRAN_RELAY_DEV_AUTH=off(set in the Dockerfile). If an override is ever needed, put it in an uncommitted.envhere — compose loads it when present. - The binary is a build artifact (gitignored); rebuild it before every deploy so the image matches the repo.
- State lives in the shared sm data root (
…/data/ziran-relay), so the standard backups cover it. The host dir is root-owned; the container's entrypoint chowns it and then drops to the unprivilegedziranuser (running as that user directly would die onmkdir /data/docs). https://relay.ziran.space/.well-known/did.jsonis served by the relay itself, makingdid:web:relay.ziran.spaceresolvable.