Deploy Sim Agent Workflows + pgvector + Realtime

Sim AI agent workflow builder with pgvector, Redis, realtime and cron

Deploy Sim Agent Workflows + pgvector + Realtime

Just deployed

Just deployed

Just deployed

Just deployed

Just deployed

Deploy and Host Sim on Railway

Sim is an open source workspace for building, deploying and monitoring AI agents and workflows on a visual canvas. This template runs the complete upstream production stack, pinned to one release, with signup closed to everyone except the addresses you allow.

About Hosting Sim

Hosting Sim means running six services that share one database schema: the app, a realtime server, a migration runner, a scheduler, Postgres with pgvector and Redis. This template wires them together with private networking and generated secrets, and orders startup so the app waits for migrations.

What's Included

  • Sim: the Next.js app, API and workflow executor, with a volume for uploaded files
  • Realtime: the Socket.IO server behind collaborative editing, on its own domain
  • Migrations: applies the database schema, then signals the app that it is safe to start
  • Cron: the scheduler for scheduled workflows, polling triggers and connector syncs
  • Postgres: PostgreSQL 17 with pgvector for knowledge bases, on a volume
  • Redis: live chat and table events plus shared caches

Every secret is generated for you and shared between the services that need it.

Why this template

  • All three Sim images are pinned to the same release. They share one schema, and a floating tag breaks the stack on the next restart.
  • The app and Realtime wait for migrations to finish, so the first deploy does not race.
  • Redis and the scheduler are included. Without them live updates and scheduled workflows do not run.
  • Signup is restricted from the first minute.

First steps after deploy

  1. Enter your email address in ALLOWED_LOGIN_EMAILS when you deploy. Only listed addresses can sign up or sign in.
  2. Wait for all six services to turn green. The first boot runs every migration and can take several minutes.
  3. Open the Sim domain and sign up with the address you allowed.
  4. Add a model provider key in the workspace settings, or set OPENAI_API_KEY on the Sim service.
  5. Build a workflow and run it.

Key environment variables

VariableServiceNotes
ALLOWED_LOGIN_EMAILSSimRequired. Comma separated addresses allowed to register and log in.
DISABLE_REGISTRATIONSimOptional. Set to true once your accounts exist.
ENCRYPTION_KEY, API_ENCRYPTION_KEYSimGenerated. Back them up and never change them.
NEXT_PUBLIC_APP_URL, BETTER_AUTH_URLSim, RealtimeUpdate both services when you add a custom domain.
NEXT_PUBLIC_SOCKET_URLSimPublic address of Realtime.
OPENAI_API_KEY, ANTHROPIC_API_KEY_1SimOptional provider keys for every workspace.

Common Use Cases

  • Build AI agents and multi step workflows on a visual canvas
  • Run scheduled or webhook triggered automations that call LLMs and tools
  • Give a team a shared, self-hosted workspace with knowledge bases on pgvector

Requirements

Use the Hobby plan or higher. Sim is a large application: upstream suggests 12 GiB of RAM in total for an evaluation install, and the app alone can use several gigabytes.

Upgrading

Back up Postgres, change the image tag on Migrations and wait for it to become healthy, then set the same tag on Sim and Realtime.

Dependencies for Sim Hosting

  • PostgreSQL with pgvector (included)
  • Redis (included)
  • An LLM provider key such as OpenAI or Anthropic (optional at boot, needed to run agents)
  • A mail provider such as Resend (optional, for invitations and password resets)

Deployment Dependencies

Why Deploy Sim on Railway?

Railway runs the whole stack in one project with private networking between services, generated secrets, volumes for the database and uploads, and one place to change image tags when you upgrade.


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

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

bento
1