---
title: "Deploy Sim agent workflows"
category: "AI/ML"
url: https://railway.com/deploy/sim-agent-workflows
---

# Deploy Sim agent workflows

**[Deploy Sim agent workflows on Railway](https://railway.com/template/sim-agent-workflows)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/sim-agent-workflows/manifest.json

- **Creator:** Anton Orel's Projects
- **Category:** AI/ML
- **Total deploys:** 5

## Template content

### Sim Cron

- **Image:** ghcr.io/simstudioai/cron:v0.9.63@sha256:ba61c2b4b8e04f1a5377364741c078b5eebc11fa77c811d4080af50138fe9c7c

### Sim

- **Image:** ghcr.io/simstudioai/simstudio:v0.9.63@sha256:76059f19dc6ca67a22c71b87af928e2bf97ee9e768255eb307d8a5a66192d7c6
- **Start command:** `/bin/sh -ec 'if [ -n "$(printf "%s" "${ALLOWED_LOGIN_DOMAINS:-}" | tr -d " \t\r,")" ]; then echo "Refusing to start: this template does not support ALLOWED_LOGIN_DOMAINS; list each address in ALLOWED_LOGIN_EMAILS." >&2; exit 64; fi; n=$(printf "%s" "${ALLOWED_LOGIN_EMAILS:-}" | tr -d " \t\r" | tr "," "\n" | grep -c . || true); if [ "$n" -eq 0 ]; then echo "Refusing to start: set ALLOWED_LOGIN_EMAILS to the address that may sign in." >&2; exit 64; fi; owner=$(printf "%s" "${ALLOWED_LOGIN_EMAILS:-}" | tr -d " \t\r" | tr "," "\n" | grep -m1 . | tr "A-Z" "a-z"); if ! printf "%s" "$owner" | grep -Eq "^[a-z0-9._%+-]+@[a-z0-9.-]+[.][a-z]{2,}$"; then echo "Refusing to start: the first ALLOWED_LOGIN_EMAILS entry is not a plain email address." >&2; exit 64; fi; if ! printf "%s" "${SIM_OWNER_PASSWORD:-}" | grep -Eq "^[A-Za-z0-9]{16,}$"; then echo "Refusing to start: SIM_OWNER_PASSWORD must be at least 16 letters and digits." >&2; exit 64; fi; until curl -fsS -o /dev/null "$SIM_MIGRATIONS_URL"; do echo "Waiting for Sim migrations"; sleep 3; done; HOSTNAME=127.0.0.1 env -u SIM_OWNER_PASSWORD bun apps/sim/bootstrap.js & pid=$!; trap "kill -TERM $pid 2>/dev/null; exit 143" TERM INT; until curl -fsS -o /dev/null "http://127.0.0.1:${PORT}/api/health"; do if ! kill -0 "$pid" 2>/dev/null; then echo "Sim exited during the provisioning boot." >&2; exit 1; fi; sleep 1; done; code=$(printf "{\"email\":\"%s\",\"password\":\"%s\",\"name\":\"Owner\"}" "$owner" "$SIM_OWNER_PASSWORD" | curl -sS -o /tmp/sim-owner-bootstrap.json -w "%{http_code}" -X POST "http://127.0.0.1:${PORT}/api/auth/sign-up/email" -H "Origin: ${NEXT_PUBLIC_APP_URL}" -H "Content-Type: application/json" -H "X-Forwarded-For: 127.0.0.1" --data-binary @- || echo 000); if [ "$code" = 200 ]; then echo "Created the Sim owner account for $owner."; elif grep -qi "already exists" /tmp/sim-owner-bootstrap.json; then echo "The Sim owner account already exists."; else echo "Owner bootstrap failed with HTTP $code; stopping." >&2; kill -TERM "$pid"; wait "$pid" || true; exit 1; fi; rm -f /tmp/sim-owner-bootstrap.json; kill -TERM "$pid" 2>/dev/null || true; wait "$pid" || true; env -u SIM_OWNER_PASSWORD bun apps/sim/bootstrap.js & pid=$!; trap "kill -TERM $pid 2>/dev/null" TERM INT; status=0; wait "$pid" || status=$?; if kill -0 "$pid" 2>/dev/null; then wait "$pid" || status=$?; fi; exit "$status"'`
- **Health check:** /api/health
- **Public domain:** Yes

### Sim Realtime

- **Image:** ghcr.io/simstudioai/realtime:v0.9.63@sha256:3f578ddb8fc3b754f60b5662a4e6b40b7c7e7ea873f7a902a2db92689d3cfb2a
- **Start command:** `/bin/sh -ec 'until wget -q -O /dev/null "$SIM_MIGRATIONS_URL"; do echo "Waiting for Sim migrations"; sleep 3; done; exec bun apps/realtime/src/bootstrap.ts'`
- **Health check:** /health
- **Public domain:** Yes

### Sim PostgreSQL

- **Image:** pgvector/pgvector:0.8.7-pg17@sha256:b513c48566e4777cd3370451400000c78eda6a08131d68f4c31d4a76f27bd8fd

### Sim Redis

- **Image:** redis:8.10.3-alpine@sha256:7958cfbb9d152f87dadfbc89f1b0b15938f0b81ff8982feb327476f4911935c3
- **Start command:** `/bin/sh -ec 'exec redis-server --save "" --appendonly no --maxmemory 96mb --maxmemory-policy allkeys-lru --requirepass "$REDIS_PASSWORD"'`

### Sim Migrations

- **Image:** ghcr.io/simstudioai/migrations:v0.9.63@sha256:bc5a72a06b485fcdf7488dba260a2ef57b82034ffef73683250ffa160a72ab9f
- **Start command:** `/bin/sh -ec 'bun run db:migrate && exec bun -e "process.on(\"SIGTERM\",()=>process.exit(0));Bun.serve({port:Number(process.env.PORT),hostname:process.env.LISTEN_HOST,fetch:()=>new Response(process.env.SIM_RELEASE)})"'`
- **Health check:** /

## Documentation

# Deploy and Host Sim on Railway

Deploy Sim, the open-source visual builder for AI agent workflows, with its realtime collaboration server, automatic database migrations, a scheduler for timed workflows, pgvector PostgreSQL, and private Redis. Railway generates every secret; you enter only your email address, and Sim creates your owner account with a generated password at first boot.

## About Hosting Sim

Sim lets you design agent workflows on a canvas, connect models and integrations, and run them from the editor, a REST API, webhooks, chat or a schedule. This template runs Sim Studio's own `v0.9.63` images, pinned by digest, as six services. A migrations service applies the schema before the app and realtime server start, so a fresh deployment never races its own database.

## Why Deploy Sim on Railway

Railway provides HTTPS domains, private networking, generated secrets and a persistent volume, so the full upstream topology (app, realtime, migrations, scheduler, database and Redis) deploys in one step. Registration is limited to the addresses you enter at deploy time, Sim creates the owner account during a loopback-only first boot before it opens its public listener, and Sim refuses to start without an allowlist, so a new instance is never open to public sign-up.

## Common Use Cases

- Build and run AI agent workflows with your own model-provider keys.
- Expose deployed workflows as authenticated REST endpoints or webhooks for other applications.
- Run scheduled automations, such as reports, syncs and checks, every few minutes or on a cron expression.
- Collaborate on workflows live with teammates you add to the allowlist.

## Dependencies for Sim Hosting

The template pins Sim `v0.9.63` (app, realtime, migrations and cron images), pgvector `0.8.7` on PostgreSQL 17, and Redis 8.10 by immutable digest. It runs the Apache-2.0 feature set: separately licensed enterprise features stay off.

### Deployment Dependencies

- Sim app (public) and Sim realtime server (public)
- Sim migrations and Sim cron (private)
- PostgreSQL 17 with pgvector on a 5 GB volume
- Password-protected Redis 8 for pub/sub and caches
- Upstream: [Sim](https://sim.ai), [Sim on GitHub](https://github.com/simstudioai/sim), [pgvector](https://github.com/pgvector/pgvector)


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/sim-agent-workflows
