Production Deployment
Ciaren is local-first, but you can host it for a team on a trusted network. One
ciaren serve process serves the editor, the API, and the scheduler on a single
port, so a deployment is that process, a database, a data volume, and usually a
reverse proxy for TLS.
Before you expose Ciaren
Ciaren has not had a formal independent third-party security audit. The API is
unauthenticated by default and can run code (Python Transform nodes, plugin
install). Before you bind beyond localhost, set CIAREN_API_TOKEN, put Ciaren
behind trusted access controls, and read the
security notes.
ciaren serve prints a warning when you bind a non-loopback address without a
token.
Checklist
-
Install and bind. The wheel bundles the editor.
python -m pip install ciaren ciaren serve --host 0.0.0.0 --port 8055 --log-level info -
Label the environment. Set
CIAREN_ENVIRONMENT=production. It also makesciaren db resetrefuse to run without--force. -
Require a token. Set
CIAREN_API_TOKENto a long random value. Open the editor athttps://your-host/?api_token=<token>. It keeps the token for that browser tab session. Scripts sendAuthorization: Bearer <token>. -
Use a managed database. Set
CIAREN_DATABASE_URLto PostgreSQL or MySQL (see Database and data directory) and runciaren db upgradebefore each start. -
Persist the data directory. Put
CIAREN_DATA_DIRon a volume you back up. -
Run it under a supervisor such as systemd or Docker, so it restarts after a crash. See Docker.
-
Add the probes below and, if you ship logs to a collector, set
CIAREN_LOG_FORMAT=json(one JSON object per line).
For the settings that matter on a shared server (execution mode, run timeout, connector guards), see Execution tuning and the Configuration Reference.
Reverse proxy and origins
Ciaren serves the built editor and /api from the same origin, so one upstream
is enough. This nginx server block terminates TLS in front of it:
server {
listen 443 ssl;
server_name ciaren.example.com;
# ssl_certificate ... ; ssl_certificate_key ... ;
client_max_body_size 200m; # at least CIAREN_MAX_UPLOAD_SIZE_MB
location / {
proxy_pass http://127.0.0.1:8055;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off; # lets live run logs stream
}
}nginx rejects bodies over 1 MB by default, so raise client_max_body_size or
uploads fail before they reach Ciaren.
Browser requests that change data are checked against the page's origin. With
CIAREN_API_TOKEN set, the token already defeats cross-site requests and the
check steps aside. Without a token, add the public hostname to
CIAREN_TRUSTED_HOSTS, or the UI gets 403 on every save:
CIAREN_TRUSTED_HOSTS='["ciaren.example.com"]'You only need CIAREN_CORS_ORIGINS when a page on a different origin calls the
API, for example the Vite dev server on port 5173 against a remote backend.
Health probes
| Endpoint | Use as | Behavior |
|---|---|---|
/health | liveness probe | Answers while the process is up |
/ready | readiness probe | Returns 503 until the database is reachable |
Neither needs the API token. See REST API conventions.
See also
- Advanced Setup: how settings are resolved
- Docker: the container image and its volume
- Security model