sim Documentation

Sim is the collaborative workspace to build, deploy, and monitor AI agents and workflows. Used by 100,000+ builders.

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy sim on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name sim -p 3000:3000 --restart always redis:7-alpine
Configured Services & Ports
โš™๏ธ simstudio
image: build locally
๐Ÿ”Œ Ports: 3000:3000
โš™๏ธ realtime
image: build locally
๐Ÿ”Œ Ports: 3002:3002
โš™๏ธ migrations
image: build locally
โš™๏ธ redis
image: redis:7-alpine
โš™๏ธ db
image: pgvector/pgvector:pg17
docker-compose.yml
yaml (docker-compose.yml)
services:
  simstudio:
    env_file:
      - path: .env
        required: false
    build:
      context: .
      dockerfile: docker/app.Dockerfile
    ports:
      - '3000:3000'
    deploy:
      resources:
        limits:
          memory: 8G
    environment:
      - NODE_ENV=development
      - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
      - BETTER_AUTH_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
      - NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
      - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-dev-secret-at-least-32-characters-long}
      - ENCRYPTION_KEY=${ENCRYPTION_KEY:-dev-encryption-key-at-least-32-chars}
      - API_ENCRYPTION_KEY=${API_ENCRYPTION_KEY:-}
      - INTERNAL_API_SECRET=${INTERNAL_API_SECRET:-dev-internal-api-secret-min-32-chars}
      - REDIS_URL=${REDIS_URL:-redis://redis:6379}
      - COPILOT_API_KEY=${COPILOT_API_KEY:-}
      - MSHIP_SYSPROMPT_OVERRIDE=${MSHIP_SYSPROMPT_OVERRIDE:-}
      - NEXT_PUBLIC_CHAT_DISABLED=${NEXT_PUBLIC_CHAT_DISABLED:-}
      - SIM_AGENT_API_URL=${SIM_AGENT_API_URL:-}
      - OLLAMA_URL=${OLLAMA_URL:-http://localhost:11434}
      - SOCKET_SERVER_URL=${SOCKET_SERVER_URL:-http://realtime:3002}
      - NEXT_PUBLIC_SOCKET_URL=${NEXT_PUBLIC_SOCKET_URL:-}
    # Lets a workflow reach a service on the Docker host. Reaching it also
    # requires naming it in EGRESS_ALLOWED_HOSTS; this only makes the name
    # resolve, which it does not on Linux by default.
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_healthy
      migrations:
        condition: service_completed_successfully
      realtime:
        condition: service_healthy
    healthcheck:
      test: ['CMD', 'curl', '-fsS', 'http://127.0.0.1:3000']
      interval: 90s
      timeout: 5s
      retries: 3
      start_period: 10s

  realtime:
    env_file:
      - path: .env
        required: false
    build:
      context: .
      dockerfile: docker/realtime.Dockerfile
    environment:
      - NODE_ENV=development
      - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
      - NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
      - BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
      - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-dev-secret-at-least-32-characters-long}
      - INTERNAL_API_SECRET=${INTERNAL_API_SECRET:-dev-internal-api-secret-min-32-chars}
      - REDIS_URL=${REDIS_URL:-redis://redis:6379}
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_healthy
    restart: unless-stopped
    ports:
      - '3002:3002'
    deploy:
      resources:
        limits:
          memory: 1G
    healthcheck:
      test: ['CMD', 'curl', '-fsS', 'http://127.0.0.1:3002/health']
      interval: 90s
      timeout: 5s
      retries: 3
      start_period: 10s

  migrations:
    build:
      context: .
      dockerfile: docker/db.Dockerfile
    working_dir: /app/packages/db
    environment:
      - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
    depends_on:
      db:
        condition: service_healthy
    command: ['bun', 'run', 'db:migrate']
    restart: 'no'

  # Backs pub/sub (live Chat task-status and table events) and the shared caches.
  # The app falls back to PostgreSQL for storage when REDIS_URL is unset, but the
  # pub/sub channels have no fallback โ€” without Redis, live status never streams.
  # Not published to the host: only the app and realtime containers need it, and
  # binding 6379 would collide with a Redis already running locally.
  redis:
    image: redis:7-alpine
    restart: always
    healthcheck:
      test: ['CMD', 'redis-cli', 'ping']
      interval: 5s
      timeout: 5s
      retries: 5

  # Not published to the host: the other services reach it over the Compose
  # network as db:5432. A host `ports:` mapping binds every interface, and the
  # password below defaults to a well-known value. For host access use
  # `docker compose exec db psql -U postgres simstudio`.
  db:
    image: pgvector/pgvector:pg17
    restart: always
    environment:
      - POSTGRES_USER=${POSTGRES_USER:-postgres}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
      - POSTGRES_DB=${POSTGRES_DB:-simstudio}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U postgres']
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  postgres_data:

Quickstart

Cloud-hosted: [sim.ai](https://sim.ai)

Self-hosted

bash
npx sim-setup

Open http://localhost:3000

Capabilities

  • Connect 1,000+ integrations and every major LLM
  • Add Slack, Notion, HubSpot, Salesforce, databases, and more
  • Build agents visually, conversationally, or with code
  • Ingest files, knowledge bases, and structured table data
  • Monitor runs, logs, schedules, and workflow activity

One workspace, every surface

Self-hosting

Requirements: Node.js 20+ and Docker.

npx sim-setup is an interactive wizard that creates a small sim/ deployment directory, provisions the database, generates secrets, writes .env, connects a Chat API key, and starts the published Sim images with Docker Compose. It does not clone the repository.

When it finishes, open http://localhost:3000.

Inside a cloned Sim repository, run bun run sim-setup to unlock the source-only local development and Kubernetes modes.

Reconfigure an optional capability without rerunning the full wizard:

bash
npx sim-setup config
npx sim-setup add email
npx sim-setup add storage
npx sim-setup add sandbox
npx sim-setup add jobs
npx sim-setup add cache
npx sim-setup add knowledge
npx sim-setup add llm
npx sim-setup add integration slack

npx sim-setup config detects the effective local-dev, Docker Compose, or current-context
Helm configuration and reports configured, missing, or invalid capabilities and OAuth
integrations without printing credential values. This is separate from npx sim-setup status,
which reports whether installed services are running and healthy.

Manage your install from its directory:

bash
npx sim-setup start | stop | restart   # bring your install up / down / cycle
npx sim-setup update                   # pull and apply Compose images
npx sim-setup status                   # what's installed and healthy
npx sim-setup logs                     # follow logs
npx sim-setup doctor                   # diagnose configuration problems
npx sim-setup down                     # remove containers (data kept)
npx sim-setup reset                    # archive .env and wipe managed data

The setup package detects how you're running and acts accordingly. Use --dir to create or manage a deployment somewhere other than ./sim.

Sim also supports local models via Ollama and vLLM. See the self-hosting docs for details.

Chat API Keys

Chat is a Sim-managed service. npx sim-setup connects a Chat API key for you โ€” sign in when it opens your browser and the key is stored automatically. To view, create, or revoke keys later, go to sim.ai/selfhost/settings/chat-keys.

Environment Variables

See the environment variables reference for the full list, or apps/sim/.env.example for defaults.

Tech Stack

Next.js ยท Bun ยท PostgreSQL ยท Drizzle ยท Better Auth ยท Tailwind โ€” and the rest of the stack

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.