{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e1008456-7b2b-483f-a3fb-b8b8f8a10f2c",
    "slug": "sim-production",
    "name": "Sim | Open-Source AI Agent Workflow Builder (Full Stack)",
    "description": "Build and run AI agent workflows visually. App, realtime, cron, pgvector.",
    "url": "https://railway.com/deploy/sim-production",
    "upstream": {
      "image": "ghcr.io/simstudioai/realtime:v0.9.26"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Realtime",
      "source": {
        "image": "ghcr.io/simstudioai/realtime:v0.9.26"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Migrations",
      "source": {
        "image": "ghcr.io/simstudioai/migrations:v0.9.26"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Sim",
      "source": {
        "image": "ghcr.io/simstudioai/simstudio:v0.9.26"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/apps/sim/uploads",
      "http": true
    },
    {
      "name": "Cron",
      "source": {
        "image": "ghcr.io/simstudioai/cron:v0.9.26"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:7-alpine"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "pgvector/pgvector:pg17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Realtime",
      "description": "Port Realtime listens on - leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "3002"
    },
    {
      "key": "NODE_ENV",
      "service": "Realtime",
      "description": "Production mode.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "Realtime",
      "description": "Same Redis as Sim.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "Realtime",
      "description": "Same database as Sim.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BETTER_AUTH_URL",
      "service": "Realtime",
      "description": "Auth base URL, same as Sim's.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "Realtime",
      "description": "Must match Sim.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "INTERNAL_API_SECRET",
      "service": "Realtime",
      "description": "Must match Sim.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_PUBLIC_APP_URL",
      "service": "Realtime",
      "description": "Sim's public URL, allowed as a socket origin. Match Sim's NEXT_PUBLIC_APP_URL if you add a custom domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "Migrations",
      "description": "Runs Sim's database migrations, then exits. Bump its image tag together with Sim and Realtime.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "Sim",
      "description": "Port Sim listens on - leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "HOSTNAME",
      "service": "Sim",
      "description": "Listen on IPv4 and IPv6, so Cron can reach Sim privately.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "REDIS_URL",
      "service": "Sim",
      "description": "Redis for live status streaming and caches.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CRON_SECRET",
      "service": "Sim",
      "description": "Authenticates the Cron service (schedules, polling triggers).",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_URL",
      "service": "Sim",
      "description": "Postgres with pgvector (knowledge bases).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "Sim",
      "description": "Encrypts stored credentials and environment variables. Never change or lose it.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BETTER_AUTH_URL",
      "service": "Sim",
      "description": "Auth base URL, same as the public URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Sim",
      "description": "Runs as root so Sim can write to the volume (Railway mounts it root-owned).",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "SIM_ADMIN_EMAIL",
      "service": "Sim",
      "description": "Your email. Only this address can sign up and sign in until you add more (ALLOWED_LOGIN_EMAILS / ALLOWED_LOGIN_DOMAINS).",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "STORAGE_PROVIDER",
      "service": "Sim",
      "description": "Uploaded files go to the service's volume.",
      "secret": false,
      "strategy": "default",
      "default": "local"
    },
    {
      "key": "SOCKET_SERVER_URL",
      "service": "Sim",
      "description": "Realtime server over the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "API_ENCRYPTION_KEY",
      "service": "Sim",
      "description": "Encrypts Sim API keys at rest. Never change or lose it.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "Sim",
      "description": "Signs sessions. Shared with Realtime.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "INTERNAL_API_SECRET",
      "service": "Sim",
      "description": "Authenticates Sim and Realtime to each other.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "NEXT_PUBLIC_APP_URL",
      "service": "Sim",
      "description": "Public URL of Sim. Switch to your custom domain after adding one.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ALLOWED_LOGIN_EMAILS",
      "service": "Sim",
      "description": "Comma-separated emails allowed to sign up and sign in. Add teammates here.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_PUBLIC_SOCKET_URL",
      "service": "Sim",
      "description": "Realtime server as the browser reaches it (live canvas collaboration).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "TZ",
      "service": "Cron",
      "description": "Time zone for the job schedule.",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "SIM_URL",
      "service": "Cron",
      "description": "Sim over the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CRON_SECRET",
      "service": "Cron",
      "description": "Must match Sim.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auto-generated Redis password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "simstudio"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time for Postgres to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "sim-production"
      }
    },
    "cli": "railway deploy --template sim-production",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e1008456-7b2b-483f-a3fb-b8b8f8a10f2c",
            "serializedConfig": {
              "services": {
                "0f76189a-84ec-47de-9631-f935f1903c85": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/sim-railway/main/icon.png",
                  "name": "Realtime",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/simstudioai/realtime:v0.9.26"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Realtime listens on - leave as is.",
                      "defaultValue": "3002"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Production mode.",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Same Redis as Sim.",
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Same database as Sim.",
                      "defaultValue": "postgresql://postgres:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/simstudio"
                    },
                    "BETTER_AUTH_URL": {
                      "isOptional": false,
                      "description": "Auth base URL, same as Sim's.",
                      "defaultValue": "${{NEXT_PUBLIC_APP_URL}}"
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Must match Sim.",
                      "defaultValue": "${{Sim.BETTER_AUTH_SECRET}}"
                    },
                    "INTERNAL_API_SECRET": {
                      "isOptional": false,
                      "description": "Must match Sim.",
                      "defaultValue": "${{Sim.INTERNAL_API_SECRET}}"
                    },
                    "NEXT_PUBLIC_APP_URL": {
                      "isOptional": false,
                      "description": "Sim's public URL, allowed as a socket origin. Match Sim's NEXT_PUBLIC_APP_URL if you add a custom domain.",
                      "defaultValue": "https://${{Sim.RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "1b14d58c-1dcd-4340-9d42-48c5891806fb": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/sim-railway/main/icon.png",
                  "name": "Migrations",
                  "build": {},
                  "deploy": {
                    "startCommand": "bun run db:migrate",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/simstudioai/migrations:v0.9.26"
                  },
                  "variables": {
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Runs Sim's database migrations, then exits. Bump its image tag together with Sim and Realtime.",
                      "defaultValue": "postgresql://postgres:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/simstudio"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  }
                },
                "89a03b7c-3bc7-43b0-8d91-19d528876254": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/sim-railway/main/icon.png",
                  "name": "Sim",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/simstudioai/simstudio:v0.9.26"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Sim listens on - leave as is.",
                      "defaultValue": "3000"
                    },
                    "HOSTNAME": {
                      "isOptional": false,
                      "description": "Listen on IPv4 and IPv6, so Cron can reach Sim privately.",
                      "defaultValue": "::"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis for live status streaming and caches.",
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "CRON_SECRET": {
                      "isOptional": false,
                      "description": "Authenticates the Cron service (schedules, polling triggers).",
                      "defaultValue": "{{CRON_SECRET}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres with pgvector (knowledge bases).",
                      "defaultValue": "postgresql://postgres:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/simstudio"
                    },
                    "ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts stored credentials and environment variables. Never change or lose it.",
                      "defaultValue": "{{ENCRYPTION_KEY}}"
                    },
                    "BETTER_AUTH_URL": {
                      "isOptional": false,
                      "description": "Auth base URL, same as the public URL.",
                      "defaultValue": "${{NEXT_PUBLIC_APP_URL}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Runs as root so Sim can write to the volume (Railway mounts it root-owned).",
                      "defaultValue": "0"
                    },
                    "SIM_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Your email. Only this address can sign up and sign in until you add more (ALLOWED_LOGIN_EMAILS / ALLOWED_LOGIN_DOMAINS).",
                      "defaultValue": "{{SIM_ADMIN_EMAIL}}"
                    },
                    "STORAGE_PROVIDER": {
                      "isOptional": false,
                      "description": "Uploaded files go to the service's volume.",
                      "defaultValue": "local"
                    },
                    "SOCKET_SERVER_URL": {
                      "isOptional": false,
                      "description": "Realtime server over the private network.",
                      "defaultValue": "http://${{Realtime.RAILWAY_PRIVATE_DOMAIN}}:3002"
                    },
                    "API_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts Sim API keys at rest. Never change or lose it.",
                      "defaultValue": "{{API_ENCRYPTION_KEY}}"
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Signs sessions. Shared with Realtime.",
                      "defaultValue": "{{BETTER_AUTH_SECRET}}"
                    },
                    "INTERNAL_API_SECRET": {
                      "isOptional": false,
                      "description": "Authenticates Sim and Realtime to each other.",
                      "defaultValue": "{{INTERNAL_API_SECRET}}"
                    },
                    "NEXT_PUBLIC_APP_URL": {
                      "isOptional": false,
                      "description": "Public URL of Sim. Switch to your custom domain after adding one.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ALLOWED_LOGIN_EMAILS": {
                      "isOptional": false,
                      "description": "Comma-separated emails allowed to sign up and sign in. Add teammates here.",
                      "defaultValue": "${{SIM_ADMIN_EMAIL}}"
                    },
                    "NEXT_PUBLIC_SOCKET_URL": {
                      "isOptional": false,
                      "description": "Realtime server as the browser reaches it (live canvas collaboration).",
                      "defaultValue": "https://${{Realtime.RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "d5c3dc20-228f-4eb0-9d79-8aa9c7d7f97b": {
                      "mountPath": "/app/apps/sim/uploads"
                    }
                  }
                },
                "aa373380-64b8-42a9-bd0b-88b0d75d6221": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/sim-railway/main/icon.png",
                  "name": "Cron",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/simstudioai/cron:v0.9.26"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Time zone for the job schedule.",
                      "defaultValue": "UTC"
                    },
                    "SIM_URL": {
                      "isOptional": false,
                      "description": "Sim over the private network.",
                      "defaultValue": "http://${{Sim.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "CRON_SECRET": {
                      "isOptional": false,
                      "description": "Must match Sim.",
                      "defaultValue": "${{Sim.CRON_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  }
                },
                "d2f48342-eec4-4075-9101-82587479852d": {
                  "icon": "https://devicons.railway.app/i/redis.svg",
                  "name": "Redis",
                  "build": {},
                  "deploy": {
                    "startCommand": "/bin/sh -c \"exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save '' --appendonly no\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:7-alpine"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated Redis password",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  }
                },
                "f873c009-271b-43fd-b4f7-58b90a720b81": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "pgvector/pgvector:pg17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "simstudio"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for Postgres to shut down cleanly on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "5968cf5e-ffb2-41b1-bbf1-372075c677e4": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Realtime",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 6,
    "needs_volume": true
  },
  "generated_at": "2026-10-18T04:14:41.301Z",
  "generator_version": "0.1.0"
}
