# Self-Hosting

Deploy SteelEngine on your own infrastructure

Deploy SteelEngine on your own infrastructure with Docker or Kubernetes.

For internal APIs and MCP servers, configure the app and Temporal Worker's deployment policies together. The production Compose file passes `EGRESS_ALLOWLIST` and `ALLOWED_MCP_DOMAINS` to both services. See [Private Network Configuration](/self-hosting/docker#private-network-configuration) for policy setup, separate API hosts, and verification.

Self-hosting SteelEngine requires an Enterprise subscription. The images live in the private `ghcr.io/steelengineai` registry, and anonymous pulls are rejected. You need registry credentials as well as the license. Contact [sales@steelengine.com](mailto:sales@steelengine.com) for pricing, deployment options, and pull access.

<a href="https://cursor.com/link/prompt?text=Help%20me%20set%20up%20SteelEngine%20on%20this%20machine%20with%20Docker%20Compose.%20Follow%20these%20steps%3A%0A%0A1.%20First%2C%20verify%20Docker%20is%20installed%20and%20running%3A%0A%20%20%20docker%20--version%0A%20%20%20docker%20info%0A%0A2.%20Clone%20the%20repository%3A%0A%20%20%20git%20clone%20https%3A%2F%2Fgithub.com%2Fsteelengineai%2Fsteelengine.git%0A%20%20%20cd%20steelengine%0A%0A3.%20SteelEngine%20needs%20a%20running%20Temporal%20server%20before%20the%20stack%20will%20start.%20Read%20the%20SteelEngine%20docs%20page%20%2Fself-hosting%2Ftemporal%2C%20then%20collect%20its%20gRPC%20address%20%28host%3Aport%2C%20no%20scheme%29%2C%20namespace%2C%20and%20TLS%20server%20name.%0A%0A4.%20Create%20a%20.env%20file%20in%20the%20repository%20root%20with%20these%20variables%20%28generate%20each%20secret%20separately%20with%20openssl%20rand%20-hex%2032%29%3A%0A%20%20%20BETTER_AUTH_SECRET%2C%20ENCRYPTION_KEY%2C%20INTERNAL_API_SECRET%2C%20TEMPORAL_WORKER_BROKER_SECRET%0A%20%20%20NEXT_PUBLIC_APP_URL%2C%20BETTER_AUTH_URL%2C%20NEXT_PUBLIC_SOCKET_URL%2C%20TEMPORAL_WORKER_APP_URL%20%28all%20the%20public%20HTTPS%20URL%20of%20the%20app%29%0A%20%20%20TEMPORAL_ADDRESS%2C%20TEMPORAL_NAMESPACE%2C%20TEMPORAL_SERVER_NAME%2C%20TEMPORAL_AUTH_ISSUER%2C%20TEMPORAL_AUTH_JWKS_URL%2C%20TEMPORAL_BUILD_ID%0A%0A5.%20Start%20the%20services%3A%0A%20%20%20docker%20compose%20-f%20docker%2Fselfhost%2Fcompose.yml%20up%20-d%0A%0A6.%20Wait%20for%20all%20containers%20to%20be%20healthy%20%28this%20may%20take%201-2%20minutes%29%3A%0A%20%20%20docker%20compose%20-f%20docker%2Fselfhost%2Fcompose.yml%20ps%0A%0A7.%20Verify%20the%20app%20is%20accessible%20at%20http%3A%2F%2Flocalhost%3A3000%20and%20that%20the%20Temporal%20Worker%20is%20ready%3A%0A%20%20%20docker%20compose%20-f%20docker%2Fselfhost%2Fcompose.yml%20exec%20steelengine-worker%20curl%20-fsS%20http%3A%2F%2F127.0.0.1%3A3003%2Fhealth%2Fready%0A%0AIf%20there%20are%20any%20errors%2C%20help%20me%20troubleshoot%20them.%20Common%20issues%3A%0A-%20Port%203000%2C%203002%2C%20or%205432%20already%20in%20use%0A-%20Docker%20not%20running%0A-%20Insufficient%20memory%20%28the%20containers%20reserve%2013%20GB%20of%20limits%20before%20PostgreSQL%3B%20plan%20for%2016%20GB%29%0A-%20TEMPORAL_WORKER_BROKER_SECRET%20or%20TEMPORAL_WORKER_APP_URL%20missing%20%28compose%20refuses%20to%20start%29%0A-%20steelengine-worker%20restarting%20because%20TEMPORAL_ADDRESS%2C%20TEMPORAL_NAMESPACE%2C%20TEMPORAL_AUTH_ISSUER%2C%20TEMPORAL_AUTH_JWKS_URL%2C%20or%20TEMPORAL_BUILD_ID%20is%20empty">
![Set Up with Cursor](https://img.shields.io/badge/Set%20Up%20with-Cursor-000000?logo=cursor&logoColor=white)
</a>

## Requirements

| Resource | Small     | Standard  | Production  |
| -------- | --------- | --------- | ----------- |
| CPU      | 2 cores   | 4 cores   | 8+ cores    |
| RAM      | 16 GB     | 16 GB     | 32+ GB      |
| Storage  | 20 GB SSD | 50 GB SSD | 100+ GB SSD |
| Docker   | 20.10+    | 20.10+    | Latest      |

**Small**: Development, testing, single user (1-5 users)
**Standard**: Teams (5-50 users), moderate workloads
**Production**: Large teams (50+ users), high availability, heavy workflow execution

Every tier starts at 16 GB. The Compose file reserves 13 GB of container memory before PostgreSQL. That is 8 GB for the app, 4 GB for the Temporal Worker, and 1 GB for realtime. The Helm chart adds 3 GB for PostgreSQL and migrations by default. Memory is the constraining factor rather than CPU. Workflow execution (isolated-vm sandboxing), file processing, and vector operations (pgvector) all live in RAM. Larger tiers add CPU and storage headroom. The optional [Laya Decision](/self-hosting/docker#laya-decision) server adds a 6 GB limit (about 1 vCPU and 4 GB in use), so add that much when you run it.

These figures cover the SteelEngine containers only. The Temporal server runs outside the Compose stack and needs its own capacity. See [Temporal](/self-hosting/temporal).

## Quick Start

SteelEngine needs a running Temporal server before the stack will start. Set one up first with the [Temporal](/self-hosting/temporal) guide. Then write the `.env` described in [Docker → 1. Configure Environment](/self-hosting/docker#1-configure-environment). Compose refuses to start without `TEMPORAL_WORKER_BROKER_SECRET` and `TEMPORAL_WORKER_APP_URL`.

```bash
git clone https://github.com/steelengineai/steelengine.git && cd steelengine
# Sign in with the registry credentials from your subscription
docker login ghcr.io
# Write .env first (secrets, public URLs, TEMPORAL_* settings)
docker compose -f docker/selfhost/compose.yml up -d
```

Open [http://localhost:3000/signup](http://localhost:3000/signup) and create the first account. Only an empty database accepts a sign-up without an invitation, so that account is the first admin, and everyone else joins by invitation.

## Deployment Options

[Docker](/self-hosting/docker)

Deploy with Docker Compose on any server

[Kubernetes](/self-hosting/kubernetes)

Deploy with Helm on Kubernetes clusters

[Entra Workload Identities](/self-hosting/entra-workload-identities)

Authenticate Azure DevOps deployment pipelines and grant organization-scoped workspace access

[Organization Releases](/self-hosting/releases)

Follow a Git branch and deploy managed workspaces together, with independent Source Control for teams on their own cadence.

[Temporal](/self-hosting/temporal)

Run the Temporal server every deployment depends on

[Cloud Platforms](/self-hosting/platforms)

VPS guides for DigitalOcean, AWS, and Azure, plus managed databases

## Workflow Checkpoint Upgrades

Releases with checkpoint state V4 support require a manual, once-per-database activation to enable payload deduplication. Normal schema migrations leave the existing write version unchanged. Upgrade every application reader and worker before activation, including older draining workers. See [Workflow checkpoint upgrades](/self-hosting/docker#workflow-checkpoint-upgrades) for the dedicated-installation runbook and rollback limits.

## Architecture

| Component          | Port            | Description                                                                                                                                          |
| ------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| steelengine        | 3000            | Main application                                                                                                                                     |
| steelengine-worker | 3003 (internal) | Temporal Worker that runs workflows, schedules, and background jobs. The port serves health checks and Task Queue backlog stats and is not published |
| realtime           | 3002            | WebSocket server                                                                                                                                     |
| db                 | 5432            | PostgreSQL with pgvector                                                                                                                             |
| migrations         | -               | Database migrations (runs once)                                                                                                                      |
| Temporal server    | 7233            | Not part of the Compose file. You run `ghcr.io/steelengineai/temporal-server` yourself. See [Temporal](/self-hosting/temporal)                       |

The Compose file pulls `steelengine`, `worker`, `realtime`, and `migrations` from `ghcr.io/steelengineai`. PostgreSQL comes from `pgvector/pgvector:pg17` on Docker Hub. The app and the Temporal Worker share `ENCRYPTION_KEY`, `INTERNAL_API_SECRET`, and `TEMPORAL_WORKER_BROKER_SECRET`. Realtime receives `BETTER_AUTH_SECRET` and `INTERNAL_API_SECRET` but never the broker secret.

## Common Questions

**What are the minimum requirements to self-host SteelEngine?**

At minimum you need 2 CPU cores, 16 GB RAM, 20 GB SSD storage, and Docker 20.10 or later. You also need a Temporal server that the containers can reach. The Compose file alone reserves 13 GB of container memory (8 GB app, 4 GB Temporal Worker, 1 GB realtime) before PostgreSQL. Memory is typically the constraining factor due to workflow execution (isolated-vm sandboxing), file processing, and vector operations (pgvector).

**Which database does SteelEngine use?**

SteelEngine uses PostgreSQL 17 with the pgvector extension for vector similarity search. The Docker setup uses the pgvector/pgvector:pg17 image, which comes with the vector extension pre-installed.

**What are the required environment variables for production?**

Four secrets are required for the standard Temporal deployment: BETTER_AUTH_SECRET (authentication), ENCRYPTION_KEY (data encryption), INTERNAL_API_SECRET (general service-to-service auth), and a separate TEMPORAL_WORKER_BROKER_SECRET used only by web and the Temporal Worker. Generate each independently with openssl rand -hex 32. Set NEXT_PUBLIC_APP_URL, BETTER_AUTH_URL, NEXT_PUBLIC_SOCKET_URL, and TEMPORAL_WORKER_APP_URL to your domain. Add the Temporal connection settings: TEMPORAL_ADDRESS, TEMPORAL_NAMESPACE, TEMPORAL_SERVER_NAME, TEMPORAL_AUTH_ISSUER, TEMPORAL_AUTH_JWKS_URL, and TEMPORAL_BUILD_ID.

**What does the realtime service do?**

The realtime service is a dedicated WebSocket server that runs on port 3002. It handles real-time communication for features like live workflow execution updates. It has a 1 GB memory limit. At startup it checks for DATABASE_URL, a BETTER_AUTH_SECRET that matches the web app, INTERNAL_API_SECRET (both at least 32 characters), and APP_URL or NEXT_PUBLIC_APP_URL. The Compose file passes all of these.

**How does the migrations service work?**

The migrations container runs once at startup (restart: no) and executes bun run db:migrate to apply database schema changes. It depends on the database being healthy before running and must complete successfully before the main application starts.

**Does the Compose file include a Temporal server?**

No. docker/selfhost/compose.yml runs the app, the Temporal Worker, realtime, PostgreSQL, and migrations. The Temporal server is a separate deployment that you operate. SteelEngine publishes ghcr.io/steelengineai/temporal-server, which is Temporal 1.31.2 with SteelEngine token verification built in. The Temporal page covers its configuration and the schema and namespace bootstrap.

**Can I use SteelEngine with local AI models?**

Yes. SteelEngine supports Ollama for local model inference. Point OLLAMA_URL at an Ollama server the containers can reach. Use http://host.docker.internal:11434 on macOS and Windows, or your host IP on Linux. Start the stack with the same docker/selfhost/compose.yml.
