{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d09e3232-a5bf-4b4c-8b1e-3264bd8bd895",
    "slug": "typebot-chatbot-builder",
    "name": "Typebot | Open-Source Typeform Alternative on Railway",
    "description": "Self-host Typebot. Open-source advanced chatbot builder on Railway",
    "url": "https://railway.com/deploy/typebot-chatbot-builder",
    "upstream": {
      "image": "baptistearno/typebot-viewer:3"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Typebot Viewer",
      "source": {
        "image": "baptistearno/typebot-viewer:3"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Typebot Builder",
      "source": {
        "image": "baptistearno/typebot-builder:3"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Postgres data storage directory",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Internal Postgres host address",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Postgres server listening port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Default Postgres username",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for Postgres user",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Initial database created on startup",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Internal Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Default database superuser name",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Self-signed SSL certificate validity",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Postgres database user password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Graceful shutdown draining duration",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Internal Redis service hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Redis server listening port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis default authentication user",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Internal Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Redis password environment reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Password for Redis authentication",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public Redis connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "Typebot Viewer",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "HOSTNAME",
      "service": "Typebot Viewer",
      "description": "Bind address for service",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "REDIS_URL",
      "service": "Typebot Viewer",
      "description": "Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Typebot Viewer",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXTAUTH_URL",
      "service": "Typebot Viewer",
      "description": "NextAuth base URL reference",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXTAUTH_SECRET",
      "service": "Typebot Viewer",
      "description": "Shared NextAuth secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENCRYPTION_SECRET",
      "service": "Typebot Viewer",
      "description": "Shared encryption secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_PUBLIC_VIEWER_URL",
      "service": "Typebot Viewer",
      "description": "Public viewer application URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "Typebot Builder",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "HOSTNAME",
      "service": "Typebot Builder",
      "description": "Bind address for service",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "REDIS_URL",
      "service": "Typebot Builder",
      "description": "Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Typebot Builder",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXTAUTH_URL",
      "service": "Typebot Builder",
      "description": "NextAuth base URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXTAUTH_SECRET",
      "service": "Typebot Builder",
      "description": "NextAuth authentication secret key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENCRYPTION_SECRET",
      "service": "Typebot Builder",
      "description": "Encryption key for sensitive data",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "NEXT_PUBLIC_VIEWER_URL",
      "service": "Typebot Builder",
      "description": "Viewer service public URL reference",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "typebot-chatbot-builder"
      }
    },
    "cli": "railway deploy --template typebot-chatbot-builder",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d09e3232-a5bf-4b4c-8b1e-3264bd8bd895",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "0983f76b-fefc-4b37-b76c-bcd00eca1b5b": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Postgres data storage directory",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Internal Postgres host address",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres server listening port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Default Postgres username",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database name",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for Postgres user",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Initial database created on startup",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Internal Postgres connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Default database superuser name",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Self-signed SSL certificate validity",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres database user password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public Postgres connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown draining duration",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "0983f76b-fefc-4b37-b76c-bcd00eca1b5b": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "4e0c0ed5-a46e-4327-8d58-9750683a784b": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Internal Redis service hostname",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis server listening port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis default authentication user",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Internal Redis connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis password environment reference",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for Redis authentication",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public Redis connection URL",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "4e0c0ed5-a46e-4327-8d58-9750683a784b": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "62ea3562-52d8-4201-99ef-f90b01d5510b": {
                  "icon": "https://raw.githubusercontent.com/baptisteArno/typebot.io/892870ff862463d204ecbd9699f68b420bda7d4e/apps/viewer/public/favicon.svg",
                  "name": "Typebot Viewer",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "baptistearno/typebot-viewer:3"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "3000"
                    },
                    "HOSTNAME": {
                      "isOptional": false,
                      "description": "Bind address for service",
                      "defaultValue": "0.0.0.0"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection string",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "NEXTAUTH_URL": {
                      "isOptional": false,
                      "description": "NextAuth base URL reference",
                      "defaultValue": "https://${{\"Typebot Builder\".RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXTAUTH_SECRET": {
                      "isOptional": false,
                      "description": "Shared NextAuth secret key",
                      "defaultValue": "${{\"Typebot Builder\".NEXTAUTH_SECRET}}"
                    },
                    "ENCRYPTION_SECRET": {
                      "isOptional": false,
                      "description": "Shared encryption secret key",
                      "defaultValue": "${{\"Typebot Builder\".ENCRYPTION_SECRET}}"
                    },
                    "NEXT_PUBLIC_VIEWER_URL": {
                      "isOptional": false,
                      "description": "Public viewer application URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "df6bacf1-f0f7-4ddd-89d9-7d68d9f8ab18": {
                  "icon": "https://raw.githubusercontent.com/baptisteArno/typebot.io/892870ff862463d204ecbd9699f68b420bda7d4e/apps/builder/public/favicon.svg",
                  "name": "Typebot Builder",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "baptistearno/typebot-builder:3"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "3000"
                    },
                    "HOSTNAME": {
                      "isOptional": false,
                      "description": "Bind address for service",
                      "defaultValue": "0.0.0.0"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection string",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "NEXTAUTH_URL": {
                      "isOptional": false,
                      "description": "NextAuth base URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXTAUTH_SECRET": {
                      "isOptional": false,
                      "description": "NextAuth authentication secret key",
                      "defaultValue": "{{NEXTAUTH_SECRET}}"
                    },
                    "ENCRYPTION_SECRET": {
                      "isOptional": false,
                      "description": "Encryption key for sensitive data",
                      "defaultValue": "{{ENCRYPTION_SECRET}}"
                    },
                    "NEXT_PUBLIC_VIEWER_URL": {
                      "isOptional": false,
                      "description": "Viewer service public URL reference",
                      "defaultValue": "https://${{\"Typebot Viewer\".RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T14:30:37.820Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_806c1907af54473d8355",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 112,
    "typical_build_seconds": 0,
    "typical_start_seconds": 41,
    "slowest_service": "Typebot Viewer"
  }
}
