{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2ac5c6eb-2521-4d19-a124-4cb18a509995",
    "slug": "botpress",
    "name": "Botpress | Open-Source Chatbot Builder on Railway",
    "description": "Self Host Botpress. Visual chatbot builder with NLU, multi-channel & more",
    "url": "https://railway.com/deploy/botpress",
    "upstream": {
      "image": "botpress/server:v12_31_10"
    }
  },
  "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": "Botpress",
      "source": {
        "image": "botpress/server:v12_31_10"
      },
      "needs_volume": true,
      "volume_mount_path": "/botpress/data",
      "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": "PORT",
      "service": "Botpress",
      "description": "Internal HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "BP_HOST",
      "service": "Botpress",
      "description": "HTTP bind address",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "BPFS_STORAGE",
      "service": "Botpress",
      "description": "Store bot files in PostgreSQL",
      "secret": false,
      "strategy": "default",
      "default": "database"
    },
    {
      "key": "DATABASE_URL",
      "service": "Botpress",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "EXTERNAL_URL",
      "service": "Botpress",
      "description": "Public-facing app URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BP_PRODUCTION",
      "service": "Botpress",
      "description": "Enable production mode",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Botpress",
      "description": "Run as root for volume permissions",
      "secret": false,
      "strategy": "default",
      "default": "0"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "botpress"
      }
    },
    "cli": "railway deploy --template botpress",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2ac5c6eb-2521-4d19-a124-4cb18a509995",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "5056fd54-16c7-4bb2-83e0-953b65710ae8": {
                  "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": {
                    "5056fd54-16c7-4bb2-83e0-953b65710ae8": {
                      "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."
                  }
                },
                "d229f0e8-25ff-4910-9fd7-818236916aa8": {
                  "icon": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/3b5c73eb-8761-4a95-a4df-1ed7674fb161.png",
                  "name": "Botpress",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "botpress/server:v12_31_10"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal HTTP listening port",
                      "defaultValue": "3000"
                    },
                    "BP_HOST": {
                      "isOptional": false,
                      "description": "HTTP bind address",
                      "defaultValue": "0.0.0.0"
                    },
                    "BPFS_STORAGE": {
                      "isOptional": false,
                      "description": "Store bot files in PostgreSQL",
                      "defaultValue": "database"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "EXTERNAL_URL": {
                      "isOptional": false,
                      "description": "Public-facing app URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "BP_PRODUCTION": {
                      "isOptional": false,
                      "description": "Enable production mode",
                      "defaultValue": "true"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root for volume permissions",
                      "defaultValue": "0"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:4000": {
                        "port": 4000
                      }
                    }
                  },
                  "volumeMounts": {
                    "d229f0e8-25ff-4910-9fd7-818236916aa8": {
                      "mountPath": "/botpress/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T13:39:40.389Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_6503e63e2bbc4da2b298",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 67,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "Botpress"
  }
}
