Skip to content

Requirements and operations

This page applies to BYOC and on-premise deployments. In SaaS, Renaiss covers all of it.

Sizing is agreed during onboarding from your workload.

Need BYOC On-premise
Kubernetes with a dedicated node pool for builds Your cloud’s managed service Your distribution
A dedicated node pool for deployed agents and hosted MCP servers (runtime) Your cloud’s managed service Your distribution
PostgreSQL 18, private, highly available, backed up Managed service Yours
Object storage for sandbox snapshots Your cloud’s S3-compatible
Secret manager Your cloud’s Yours
Container registry with Khala’s images Your cloud’s Yours
Load balancer with TLS, and DNS names Your cloud’s, your certificate Yours, your certificate authority
SMTP for sign-in codes, with SPF and DKIM on the sender domain Your cloud’s email service or a provider Internal relay
Git host that can issue short-lived, repository-scoped tokens Yours Yours
Model endpoint Hosted provider, your cloud’s model service or GPUs Your GPUs, or a hosted provider in connected mode
Egress control NAT with fixed addresses, private endpoints Firewall rules per destination
Monitoring (optional) Your cloud’s monitoring service or your collector Your collector
Identity provider for single sign-on (optional) Yours Yours

The control plane is small: stateless API processes and one database. There is no cache server and no message broker to run.

  1. Prepare the platform with the checklist above.
  2. Mirror the release into your registry. Releases are container images and a Helm chart, signed, with a bill of materials. Air-gapped sites receive them as an offline bundle.
  3. Create the database and an owner role for Khala.
  4. Provide configuration and secrets through your secret manager.
  5. Run the migrations as a one-off job: api migrate.
  6. Install the control plane with the chart and your values. Wait for /ready.
  7. Create the organization and its first owner.
  8. Install the build plane and the runtime plane on their dedicated node pools.
  9. Run the installation check: a test build that proves a sandbox is isolated, that a connection outside the allowlist is refused, and that a pull request reaches a scratch repository.
  10. Fill the catalog: models and their endpoints, MCP servers, policies.

The API is configured with environment variables. Secrets come from your secret manager or your platform’s secret mechanism, never from files in the image.

Variable Purpose
KHALA_ENV production turns on the production checks below
PORT Listening port. Default 8787
DATABASE_URL PostgreSQL connection string. Required
KHALA_ALLOWED_ORIGINS Origins allowed to call the API. Never a wildcard
KHALA_AUTH_SECRET Key used to hash sign-in codes. At least 32 characters
KHALA_COOKIE_SECURE Session cookie Secure flag. On by default in production
SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD, SMTP_FROM, SMTP_TLS Email delivery
LOG_LEVEL Default info

In production the API refuses to start with a development secret, with a missing database URL, or with email delivery set to write to the log.

  • Run two or more API instances across zones or racks behind the load balancer. They hold no state, and sign-in limits are counted in the database, so they stay correct with any number of instances.
  • The database is the component to protect: a standby in a second zone and point-in-time recovery.
  • The build pool can lose a node without losing records. A build whose sandbox disappears is resumed or reported as failed; its steps and logs are already in the database.
Endpoint Meaning
GET /health The process is up
GET /ready The process can reach the database. Returns 503 if it cannot

Use /ready for load balancer and readiness checks.

Migrations are SQL files embedded in the API binary. They do not run on start. You run them as a separate step before rolling out a new version, so a schema change is always a deliberate action.

On SIGTERM the API stops accepting connections and gives requests in flight ten seconds to finish, which fits a rolling update.

The API writes structured JSON logs to standard output, one line per request with method, path, status, duration and a request ID. Send X-Request-ID and it is reused, so a request can be followed across your systems. What the logs contain and leave out is on Logs, audit and retention. To send metrics and traces to your monitoring systems, see Telemetry.

Everything durable is in PostgreSQL. Back it up with your usual tooling and test the restore. Sandbox snapshots in object storage are working state, not records, and need no backup.

  1. Mirror the new release into your registry.
  2. Back up the database.
  3. Run the migrations of the new version.
  4. Roll out the new API and panel.
  5. Roll out the build plane and the runtime plane. Deployed agents move to the new version on their next resume.

The web panel is served from your installation under your domain. The desktop application is built to point at your own endpoint.