# Operate the relay

Source: https://usecns.dev/thalamus-guide-operate-the-relay/

[Start here](https://usecns.dev/manual-thalamus/)
[CLI commands](https://usecns.dev/commands-thalamus/)
[Configuration & integration](https://usecns.dev/thalamus-topics/)

Use [registration and discovery](https://usecns.dev/thalamus-topic-register-members-and-check-discovery/) to change membership at runtime. Config changes otherwise need a controlled restart. Persistent registrations use `--state-file`; request history separately needs a writable `--state-dir` and can be read with `thalamus replay`.

Before maintenance, [drain the member](https://usecns.dev/thalamus-topic-drain-members-and-handle-failures/). Existing streams continue, and new selections go elsewhere. Failover affects later selections: Thalamus does not replay an already-started generation. Endpoint fallback is for discovery reachability, not automatic inference retries. Callers must decide whether retrying is safe.

For production operation, use the procedures for [protected administration](https://usecns.dev/thalamus-topic-administer-the-relay-and-inspect-headers/), [telemetry and replay](https://usecns.dev/thalamus-topic-record-telemetry-and-replay-history/), and [deployment and troubleshooting](https://usecns.dev/thalamus-topic-deploy-and-troubleshoot/). Routing continues if telemetry storage is unavailable; inspect its health separately rather than assuming every request was recorded.