Deploy Sim Studio | (Just Updated) AI Agent Workflow Builder, Postgres + Redis, Data Survives Redeploys

Sim Studio: open-source AI agent workflow builder, pgvector Postgres, Redis

Deploy Sim Studio | (Just Updated) AI Agent Workflow Builder, Postgres + Redis, Data Survives Redeploys

Just deployed

/app/apps/sim/uploads

Just deployed

/var/lib/postgresql

Just deployed

/data

Deploy and Host Sim Studio on Railway

Built for an LLM agent to deploy and use. There is no setup form and nothing to fill in: every secret is generated at deploy time, and the contract below lists the addresses, variable names and one script that signs up, creates an API key and calls the API.

Sim Studio (Sim) is an open-source platform for building and running AI agent workflows. You wire models, tools, knowledge bases and logic blocks together on a visual canvas, then deploy a workflow as an API endpoint, a chat, a schedule or a webhook. It is an open-source alternative to n8n and Zapier for AI agents.

About Hosting Sim Studio

This template runs five services, all pinned by digest to Sim 1.4.4. simstudio is the Next.js app with the workflow editor, the API and the web UI, with a volume at its uploads directory. realtime is the Socket.IO server that keeps the editor in sync between browsers. migrations is a one-shot job that applies the database schema on every deploy and then exits. postgres is PostgreSQL 17 with the pgvector extension on a volume, which Sim uses for workflows, users and knowledge-base embeddings. redis is Redis 7 on a volume, used for caching and realtime fan-out.

On the first deploy simstudio and realtime start before the schema exists and restart until migrations has finished, so the first boot takes a few minutes. Sign-in uses email and password. The first account you create gets its own workspace.

Registration is open, as in upstream Sim: anyone who can reach the public URL can create an account. After you have created yours, lock the instance by setting DISABLE_REGISTRATION=true on the simstudio service, or restrict sign-ups with ALLOWED_LOGIN_EMAILS (comma separated addresses) or ALLOWED_LOGIN_DOMAINS. Railway redeploys the service when you save the variable.

Agent contract

  • Public URL: NEXT_PUBLIC_APP_URL (https:// plus the simstudio service's RAILWAY_PUBLIC_DOMAIN). The realtime server has its own public address in NEXT_PUBLIC_SOCKET_URL.
  • Private URL: http://simstudio.railway.internal:8080 (app) and http://realtime.railway.internal:8080 (realtime).
  • Credentials: ADMIN_API_KEY (admin API, generated per deploy). User accounts are created through the sign-up route below; there is no default password. Also generated and not for clients: BETTER_AUTH_SECRET, ENCRYPTION_KEY, INTERNAL_API_SECRET.
  • Auth: the admin API (/api/v1/admin/*) takes the header x-admin-key set to ADMIN_API_KEY. The public API (/api/v1/*) takes the header X-API-Key set to a key created by a signed-in user at POST /api/users/me/api-keys. Sign-up and sign-in are POST /api/auth/sign-up/email and POST /api/auth/sign-in/email with an Origin header equal to the public URL.
  • Health: GET /api/health returns 200 on the app and GET /health returns 200 on the realtime server.
# run with NEXT_PUBLIC_APP_URL and ADMIN_API_KEY set; needs curl and jq
U="$NEXT_PUBLIC_APP_URL"
PW="$(openssl rand -hex 16)"
curl -s -o /dev/null -w "health: %{http_code}\n" "$U/api/health"
curl -s -o /dev/null -w "anonymous admin: %{http_code}\n" -G -d limit=1 -d offset=0 "$U/api/v1/admin/users"
curl -s -o /dev/null -w "admin: %{http_code}\n" -H "x-admin-key: $ADMIN_API_KEY" -G -d limit=1 -d offset=0 "$U/api/v1/admin/users"
curl -s -o /dev/null -w "sign-up: %{http_code}\n" -c /tmp/sim.jar -H "Origin: $U" -H "Content-Type: application/json" \
  -d "{\"name\":\"Agent\",\"email\":\"agent-$(date +%s)@example.com\",\"password\":\"$PW\"}" "$U/api/auth/sign-up/email"
KEY="$(curl -s -b /tmp/sim.jar -H "Origin: $U" -H "Content-Type: application/json" -d '{"name":"agent"}' "$U/api/users/me/api-keys" | jq -r .key.key)"
WS="$(curl -s -b /tmp/sim.jar "$U/api/workspaces" | jq -r '.workspaces[0].id')"
curl -s -H "X-API-Key: $KEY" "$U/api/v1/workflows?workspaceId=$WS" | jq -r '.data[0].name'

A fresh deploy prints health: 200, anonymous admin: 401, admin: 200, sign-up: 200 and the name of the starter workflow, default-agent.

Why Deploy Sim Studio on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Sim Studio on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

  • Agent-ready - generated secrets, a contract block and one working script; no setup form.
  • Whole stack included - app, realtime server, migrations job, pgvector Postgres and Redis, wired together.
  • State survives redeploys - the database, Redis and uploaded files each sit on a volume, and the secrets stay the same.
  • Collaborative editor works out of the box - the realtime server has its own public address and is already connected.
  • Pinned by digest - the images are fixed to Sim 1.4.4, so a redeploy never changes the version under you.

Common Use Cases

  • AI agent workflows behind an API - build a workflow on the canvas, deploy it, and call it from your own code.
  • Self-hosted n8n or Zapier alternative for LLM tasks - chains of model calls, tools and integrations on your own infrastructure.
  • Knowledge-base agents - upload documents, embed them into pgvector and answer questions over them.
  • Team workflow editing - several people edit the same workflow at once through the realtime server.

Dependencies for Sim Studio Hosting

  • PostgreSQL 17 with pgvector and one Railway volume, created by the template.
  • Redis 7 with one Railway volume, created by the template.
  • Model provider keys (OpenAI, Anthropic and others) added in the Sim settings when a workflow calls a model.

Deployment Dependencies

Implementation Details

VariablePurpose
ADMIN_API_KEYKey for the admin API, sent as x-admin-key, generated per deploy.
BETTER_AUTH_SECRETSigning secret for sessions, generated per deploy.
ENCRYPTION_KEY64 character hex key that encrypts stored credentials, generated per deploy.
INTERNAL_API_SECRETShared secret between the app and the realtime server, generated per deploy.
NEXT_PUBLIC_APP_URLHTTPS address of the app.
NEXT_PUBLIC_SOCKET_URLHTTPS address of the realtime server, used by the browser.
DATABASE_URLConnection string to the Postgres service, built from its generated password.
REDIS_URLConnection string to the Redis service, built from its generated password.

The app and the realtime server read Railway's injected PORT. The simstudio service runs as root so it can write to its volume.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

zer0person
1
View Template
Möbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1