Security
This page is a checklist to go through before you expose a self-hosted cetra to other people.
Network
Section titled “Network”- Terminate TLS in front of cetra. cetra serves plain HTTP. Put a reverse proxy or a load balancer in front, set
public_urlto thehttps://URL, and publish only the proxy’s port. See TLS. - Set
trusted_proxiesto the proxy’s address, so rate limits and logs use the client’s address and not the proxy’s. Leave it empty if nothing sits in front of cetra, since cetra then ignoresX-Forwarded-For. - Keep
metrics_addrprivate. The Prometheus endpoint has no authentication. Bind it to a loopback or cluster-internal address, never to a public interface. See Monitoring. - Publish only the ports you use. Port 8080 serves the UI and API, 4317 and 4318 serve OTLP. Set
grpc_addrorotlp_http_addrto an empty string to turn one off. The compose files publish on127.0.0.1unless you changeCETRA_BIND. - Decide who can sign up.
auth.signupdefaults toinvite_only. Useopenonly on a private network, andauth.signup_domainsto limit the email domains.
Secrets
Section titled “Secrets”- Keep secrets in environment variables from a file only the service can read (
cetra.envwith compose, anEnvironmentFilewith systemd, a Secret with Helm), not in a sharedcetra.toml. See Secrets. - Back up
secret.keywith the data. It encrypts stored LLM connection keys and webhook secrets, and a backup without it cannot be read. If you setencryption_keyyourself, keep that value with your other secrets. See Backup and restore. - Do not share
sk-cetra-keys. An API key can write traces to its project. Create one key per application and rotate one that leaks.
Outbound requests
Section titled “Outbound requests”- Leave
security.allow_private_network_egressoff unless you need it. LLM judges and webhooks then cannot reach loopback, private, link-local or cloud-metadata addresses, which stops a user from pointing them at your internal services. Turn it on only for a local Ollama or vLLM, and then only on a network where that is acceptable. See the configuration reference. - Use
restore_modefor restore drills, so a restored copy sends no alerts, webhooks or emails. See Backup and restore. - Decide about the heartbeat. cetra sends one anonymous heartbeat a day to
telemetry.cetra.sh. Allow that host in your egress rules, or setCETRA_TELEMETRY=off. See Telemetry.
Running the process
Section titled “Running the process”- Run one instance per data directory, as a user that is not root, with the data directory owned by that user. The Docker image runs as uid 65532 on a read-only root file system.
- Pin the version of the image or chart, and read the release notes before you upgrade. Verify downloads as described in Install.
- Back up and rehearse the restore. A backup you have not restored is not yet a backup. See Backup and restore.
- Keep payloads out of logs. cetra’s logs contain IDs and sizes, never prompts, completions or secret values. Keep it that way if you set
log.levelto a filter that includes other crates.