Deploy Sim
Sim AI agent workflows with scheduled runs, sign-in locked to your email
Realtime
Just deployed
Just deployed
Just deployed
Postgres
Just deployed
Redis
Just deployed
Deploy and Host Sim on Railway
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,realtimeandcron, allv0.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.
Template Content
ALLOWED_LOGIN_EMAILS
Your email. Only this address can sign up and sign in; add teammates' addresses here, comma-separated
Postgres
pgvector/pgvector:pg17Redis
redis:7.4
