Run it where you want

Castra runs on your own infrastructure. Use Docker Compose on a Linux host, Kubernetes, or a managed container platform. Nothing calls home. One image runs in many roles, and each role scales on its own. If you would rather not run it yourself, see Castra Cloud.

Three ways to run it

1. Single host

One command sets up Docker Compose on one machine. The simplest start, and enough for a small team.

2. Scaled

Run more copies of only the roles that are busy, on Kubernetes or a managed container platform. Collaborative editing stays at one instance.

3. Cloud services swapped in

Keep the application on your infrastructure and point it at managed services. The open protocols make this a configuration change.

What runs

A web front end, one server image in several roles, and standard data services underneath.

  • PeopleBrowsers for staff and requesters
  • webServes the app and routes requests to the API
Castra server image

One image. Run it as a single all-in-one process, or start each role on its own: an environment variable picks the role.

Serve
  • collablive editing in Caelussingle instance
  • realtimelive updates to browsers
Work
  • worker-jobsbackground jobsseveral copies
  • worker-slaSLA timers in Mercuryseveral copies
  • previewattachment previews
Mail and directory
  • mail-inemail into tickets
  • mail-outnotifications and replies
  • idp-syncusers and groups from your directory
Data services

Run the defaults yourself, or point Castra at managed equivalents.

  • Postgresrecords, row-level tenancy
  • EventsPostgres outbox; NATS optional
  • Valkeycache and sessions
  • Object storageattachments, S3 API
  • Browsers reach the web service, which routes requests to the api, collab and realtime roles.
  • Every role reads and writes Postgres, with Valkey for cache and sessions; events go through a Postgres outbox, with NATS optional.
  • The idp-sync role pulls users and groups from your identity provider; the api role signs people in through it.
  • The mail-in and mail-out roles talk to your mail server by SMTP.
  • Roles store attachments in object storage, index into OpenSearch and send telemetry to your OpenTelemetry collector.
How a self-hosted Castra install fits together. Runs as Docker Compose services on one host, on Kubernetes or on a cloud container platform. Moving dots show the direction of traffic. Hover or tab to a box to see what it connects to.

Quick start

One command installs Castra on a Linux host. It checks the host, asks a few questions (or reads an answers file), generates every secret, pulls the signed images and starts the stack.

  • HTTPS your way: behind your own proxy, self-signed, your own certificate, or automatic over ACME from a public or internal certificate authority
  • A built-in sign-in server if you have no identity provider, and works with standard OpenID Connect providers if you do
  • Diagram editing bundled, nothing extra to install
  • An offline bundle for hosts with no internet access
  • A Helm chart for Kubernetes
  • Backup scripts and an upgrade guide

The install files will be published with the first release.

On-prem default, or a cloud swap

Castra is cloud agnostic: one container image, open protocols and no cloud vendor SDKs. Every service Castra uses has a managed equivalent on each cloud, so moving one across is a configuration change.

Where Castra's services run and what they connect to: the self-hosted default and the managed equivalent on each cloud
ComponentSelf-hosted defaultAWSGoogle CloudAzure
Where Castra runs
Application servicesDocker Compose on a Linux hostAmazon ECS on FargateCloud RunAzure Container Apps
KubernetesAny cluster, with the Helm chartAmazon EKSGKEAKS
What Castra connects to
DatabasePostgresAmazon RDS or Aurora for PostgreSQLCloud SQL or AlloyDB for PostgreSQLAzure Database for PostgreSQL
CacheValkey (Redis protocol)Amazon ElastiCacheMemorystoreAzure Managed Redis
Sign-inKeycloak or Authentik (OIDC)Amazon CognitoGoogle Workspace or Cloud IdentityMicrosoft Entra ID
EmailPostfix (SMTP)Amazon SESAny SMTP relayAzure Communication Services Email
EventsPostgres outbox, or NATSAmazon SQSPub/SubService Bus
Object storageSeaweedFS or Garage (S3 API)Amazon S3Cloud Storage (S3-compatible API)Blob Storage (native adapter)
SearchOpenSearch, or Postgres full-textAmazon OpenSearch ServiceSelf-managed OpenSearchSelf-managed OpenSearch
TelemetryOpenTelemetry collectorCloudWatch and X-RayCloud Monitoring and Cloud TraceAzure Monitor

On Cloud Run and Container Apps the workers need always-on CPU and at least one running instance, collaborative editing must stay at exactly one instance, and editors reconnect when a connection reaches the platform's time limit. Managed Postgres must support row-level security; RDS, Cloud SQL and Azure Database for PostgreSQL do. Group sync needs your identity provider to include a groups claim in the token; Cognito and Entra ID need that switched on, and Google Workspace does not send one by default.