cara-server is the control-plane process for Caravanserai. It exposes the REST API that cara-agent instances and caractrl communicate with, runs the scheduler that assigns projects to nodes, and continuously drives workloads toward their desired state. It requires a PostgreSQL database for persistence.
Configuration precedence
cara-server merges configuration from four sources. Later sources override earlier ones:
config.yaml— file in the working directory.env— dotenv file in the working directory- Environment variables
- CLI flags
You do not need to use all four sources. A single
.env file or a set of environment variables is sufficient for most deployments.Configuration reference
Enable debug-level logging. Set to
true to emit verbose structured log output. Env var: DEBUG.IP address for the HTTP server to bind to. Use
127.0.0.1 to restrict access to localhost. Env var: HOST.TCP port for the HTTP server. Env var:
PORT.PostgreSQL connection string (DSN). Env var:
DATABASE_URL.Accepted formats:OTLP gRPC endpoint for OpenTelemetry trace and metric export. Env var:
OTEL_COLLECTOR_URL.otel_collector_url is optional. When omitted, observability export is disabled and cara-server runs without tracing. Set this to the gRPC address of your OpenTelemetry Collector (for example, otel-collector:4317) to enable distributed tracing.Configuration examples
config.yaml
Placeconfig.yaml in the same directory as the cara-server binary:
config.yaml
.env file
.env