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
One image. Run it as a single all-in-one process, or start each role on its own: an environment variable picks the role.
apiHTTP API for all three toolsseveral copiescollablive editing in Caelussingle instancerealtimelive updates to browsers
worker-jobsbackground jobsseveral copiesworker-slaSLA timers in Mercuryseveral copiesindexersearch indexpreviewattachment previews
mail-inemail into ticketsmail-outnotifications and repliesidp-syncusers and groups from your directory
Run the defaults yourself, or point Castra at managed equivalents.
- Postgresrecords, row-level tenancy
- EventsPostgres outbox; NATS optional
- Valkeycache and sessions
- SearchOpenSearch, or Postgres full-text
- 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.
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.
| Component | Self-hosted default | AWS | Google Cloud | Azure |
|---|---|---|---|---|
| Where Castra runs | ||||
| Application services | Docker Compose on a Linux host | Amazon ECS on Fargate | Cloud Run | Azure Container Apps |
| Kubernetes | Any cluster, with the Helm chart | Amazon EKS | GKE | AKS |
| What Castra connects to | ||||
| Database | Postgres | Amazon RDS or Aurora for PostgreSQL | Cloud SQL or AlloyDB for PostgreSQL | Azure Database for PostgreSQL |
| Cache | Valkey (Redis protocol) | Amazon ElastiCache | Memorystore | Azure Managed Redis |
| Sign-in | Keycloak or Authentik (OIDC) | Amazon Cognito | Google Workspace or Cloud Identity | Microsoft Entra ID |
| Postfix (SMTP) | Amazon SES | Any SMTP relay | Azure Communication Services Email | |
| Events | Postgres outbox, or NATS | Amazon SQS | Pub/Sub | Service Bus |
| Object storage | SeaweedFS or Garage (S3 API) | Amazon S3 | Cloud Storage (S3-compatible API) | Blob Storage (native adapter) |
| Search | OpenSearch, or Postgres full-text | Amazon OpenSearch Service | Self-managed OpenSearch | Self-managed OpenSearch |
| Telemetry | OpenTelemetry collector | CloudWatch and X-Ray | Cloud Monitoring and Cloud Trace | Azure 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.