---
title: "Deploy Sim"
description: "Sim AI agent workflows with scheduled runs, sign-in locked to your email"
category: "AI/ML"
url: https://railway.com/deploy/sim-1
---

# Deploy Sim

Sim AI agent workflows with scheduled runs, sign-in locked to your email

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

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

- **Creator:** Dektion
- **Category:** AI/ML
- **Total deploys:** 3

## Template content

### Realtime https://raw.githubusercontent.com/simstudioai/sim/bcb348f2ebe194cf31963ef23efd8e816cc60144/apps/sim/public/favicon/apple-touch-icon.png

- **Image:** ghcr.io/simstudioai/realtime:v0.9.63
- **Health check:** /health
- **Public domain:** Yes

### Cron https://raw.githubusercontent.com/simstudioai/sim/bcb348f2ebe194cf31963ef23efd8e816cc60144/apps/sim/public/favicon/apple-touch-icon.png

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

### Sim https://raw.githubusercontent.com/simstudioai/sim/bcb348f2ebe194cf31963ef23efd8e816cc60144/apps/sim/public/favicon/apple-touch-icon.png

- **Image:** ghcr.io/simstudioai/simstudio:v0.9.63
- **Start command:** `/bin/sh -c 'chown -R 1001:1001 /app/apps/sim/uploads && exec setpriv --reuid=1001 --regid=1001 --init-groups bun apps/sim/bootstrap.js'`
- **Health check:** /api/health
- **Public domain:** Yes

### Postgres https://devicons.railway.com/i/postgresql.svg

- **Image:** pgvector/pgvector:pg17

### Redis https://devicons.railway.com/i/redis.svg

- **Image:** redis:7.4
- **Start command:** `/bin/sh -c 'exec redis-server --requirepass "$REDIS_PASSWORD" --save "" --appendonly no'`

## Documentation

# Deploy and Host Sim on Railway

[Sim](https://github.com/simstudioai/sim) (Apache-2.0) is an open-source builder for AI agent workflows: you connect agent blocks, tools and integrations on a canvas, then run the workflow from its API, a chat, a webhook or a schedule. This template runs Sim v0.9.63 on Railway with everything it needs to run workflows on its own, including scheduled ones.

## About Hosting Sim

Sim is five services here, the same split as upstream's Docker Compose file: the Sim app, the realtime server that keeps the canvas live in your browser, a Cron service, Postgres (with pgvector) and Redis. All Sim images are pinned to one release, because the app, realtime and database migrations have to move together; the migrations run as the realtime service's pre-deploy step.

The Cron service is the part that's easy to miss. Sim doesn't run schedules by itself: something has to call the app every minute, and Sim's own docs warn that scheduled workflows stay idle without it. Here upstream's cron image calls the app over Railway's private network with a generated `CRON_SECRET`.

Sign-up is limited to the addresses in `ALLOWED_LOGIN_EMAILS` (the deploy form asks for yours), so nobody else can create an account on your URL. The session, encryption and internal secrets are generated per deploy.

Before publishing I tested it on Railway. A sign-up from another address was refused, and the owner signed up and in. I created an API key, built a workflow with an agent block on `openai/gpt-4o-mini` through OpenRouter, deployed it and ran it through the API; it answered as asked. A second workflow with a one-minute schedule then ran on its own within the minute, started by the Cron service. Then I restarted all five services at once: my first version failed here, because the migrations met the old Postgres while it was shutting down, so the migration step now retries until the database is back. After the restart the owner signed in and both workflows and their runs were still there.

Idle, Sim used about 1.4 GB of RAM, Postgres 0.2 GB and the other three services 0.1 GB together, about $17 a month on Railway's usage pricing before workflows run. That's more than a trial account allows: in an earlier test at 1 GB the app was killed as soon as a workflow ran, so this needs a Hobby plan or higher.

## Common Use Cases

- AI agents on a schedule: a morning research digest, a nightly data clean-up, a weekly report
- Agent workflows behind an API or a chat that your own app calls
- Webhook-triggered automations that use an LLM in the middle, such as triaging support tickets

## Dependencies for Sim Hosting

An LLM key for agent blocks: `OPENROUTER_API_KEY` covers most models with one key; `OPENAI_API_KEY`, `ANTHROPIC_API_KEY_1` and other provider keys work too.

### Deployment Dependencies

- Sim: https://github.com/simstudioai/sim
- Self-hosting docs: https://docs.sim.ai/self-hosting
- Images: `ghcr.io/simstudioai/simstudio`, `realtime` and `cron`, all `v0.9.63`

### Implementation Details

```
SIM_URL                  # open this and sign up with your allowed email
ALLOWED_LOGIN_EMAILS     # who can sign up, comma-separated
OPENROUTER_API_KEY       # optional, for agent blocks
Cron -> Sim              # calls the app every minute over the private network
/app/apps/sim/uploads    # uploaded files, on a volume
```

If you add a custom domain, set `NEXT_PUBLIC_APP_URL` and `BETTER_AUTH_URL` to it. Keep `ENCRYPTION_KEY` and `API_ENCRYPTION_KEY`: Sim can't read the credentials and API keys it stored without them.

## Why Deploy Sim on Railway?

Your workflows keep running on schedule while your laptop is off, with the database, cache and scheduler next to the app on Railway's private network. Railway bills the RAM and CPU the workflows use, not a fixed machine.


## 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-1
