Quick start
From install to a live relay in minutes: config, validation, start, stop and a health check.
1. Create a configuration
nostrfy init writes a default, fully-commented nostrfy.toml:
nostrfy --config nostrfy.toml initOpen it in a text editor and adjust it — every option is commented.
2. Validate the config
nostrfy check is strongly recommended before starting; if anything is wrong, it reports
exactly what is wrong.
nostrfy --config nostrfy.toml check3. Start the relay
nostrfy --config nostrfy.toml startRuns as a daemon. Add --foreground to run in the terminal.
Then verify the relay is up with the health endpoint:
curl http://127.0.0.1:8080/health=> {"status":"ok"}
4. Point a client at it
From the same machine, connect to ws://<host>:8080. The default host is 127.0.0.1, which only accepts local connections. To reach the relay from other machines,
set server.host = "0.0.0.0" in the config:
[server]
host = "0.0.0.0"For wss:// you need a TLS-terminating proxy (nginx or Caddy) in front — see the deployment docs.
5. Stop and restart
nostrfy --config nostrfy.toml stop
nostrfy --config nostrfy.toml restart
kill -HUP $(cat nostrfy.pid) # reload the config without a restartrestart re-reads the config; SIGHUP reloads most settings without restarting.
Effectively operating it
nostrfy statsshows live statistics — also available over HTTP as/relay/statsand/metrics.- The log runs to
daemon.log_filewith automatic rotation. RUST_LOGcontrols the log level (e.g.RUST_LOG=nostrfy=debug).