{
  "manifest_version": "1.0.0",
  "template": {
    "id": "548329f2-ae42-488b-94ab-c3df8b0db019",
    "slug": "convex",
    "name": "Convex",
    "description": "Deploy and Host Convex with Railway",
    "url": "https://railway.com/deploy/convex",
    "upstream": {
      "image": "ghcr.io/get-convex/convex-backend:latest"
    }
  },
  "services": [
    {
      "name": "Convex Backend",
      "source": {
        "image": "ghcr.io/get-convex/convex-backend:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/convex/data",
      "http": true
    },
    {
      "name": "Convex Dashboard",
      "source": {
        "image": "ghcr.io/get-convex/convex-dashboard:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Convex Backend",
      "description": "Port of the Cloud API. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "3210"
    },
    {
      "key": "RUST_LOG",
      "service": "Convex Backend",
      "description": "Logging level for the Convex backend service (e.g., info, debug, warn).",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "POSTGRES_URL",
      "service": "Convex Backend",
      "description": "Connection URL for accessing PostgreSQL, sourced from the Postgres service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "INSTANCE_NAME",
      "service": "Convex Backend",
      "description": "Name of the current database instance.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DISABLE_BEACON",
      "service": "Convex Backend",
      "description": "If true, disables beacon or telemetry reporting.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "INSTANCE_SECRET",
      "service": "Convex Backend",
      "description": "Secret key for the instance, used for security/authentication. If you want to make changes, please check the template guide: https://railway.com/deploy/convex",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CONVEX_SITE_ORIGIN",
      "service": "Convex Backend",
      "description": "Origin URL for Convex HTTP API as accessed by the frontend.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DO_NOT_REQUIRE_SSL",
      "service": "Convex Backend",
      "description": "If true, disables SSL requirement for backend communication.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "CONVEX_CLOUD_ORIGIN",
      "service": "Convex Backend",
      "description": "Origin URL for Convex Cloud API as accessed by the client/frontend.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CONVEX_SELF_HOSTED_URL",
      "service": "Convex Backend",
      "description": "URL for self-hosted Convex backend.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PUBLIC_CONVEX_SITE_ORIGIN",
      "service": "Convex Backend",
      "description": "Public URL for Convex HTTP API, routed through Railway TCP proxy.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PRIVATE_CONVEX_SITE_ORIGIN",
      "service": "Convex Backend",
      "description": "Private/internal URL for Convex HTTP API, accessible only inside the Railway network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PUBLIC_CONVEX_CLOUD_ORIGIN",
      "service": "Convex Backend",
      "description": "Publicly accessible URL for Convex Cloud API.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PRIVATE_CONVEX_CLOUD_ORIGIN",
      "service": "Convex Backend",
      "description": "Private/internal URL for Convex Cloud API, only within Railway network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CONVEX_SELF_HOSTED_ADMIN_KEY",
      "service": "Convex Backend",
      "description": "Admin key for self-hosted Convex backend; CHANGE THIS, CHECK TEMPLATE GUIDE: https://railway.com/deploy/convex",
      "secret": true,
      "strategy": "default",
      "default": "invalid"
    },
    {
      "key": "PORT",
      "service": "Convex Dashboard",
      "description": "Port of the dashboard.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "NEXT_PUBLIC_DEPLOYMENT_URL",
      "service": "Convex Dashboard",
      "description": "URL of the Convex Cloud API.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location of the PostgreSQL data directory.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Hostname or domain for accessing the PostgreSQL server (usually internal/private domain).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port on which PostgreSQL is running (default is 5432).",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Username to authenticate with the PostgreSQL server.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGSSLMODE",
      "service": "Postgres",
      "description": "SSL connection mode for PostgreSQL.",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database name to connect to.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password to authenticate with the PostgreSQL server.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Name of the default PostgreSQL database to be created and used.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Full connection string to access the PostgreSQL database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Default PostgreSQL user.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Number of days before the generated SSL certificate expires.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password for the default PostgreSQL user.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CONVEX_DATABASE_URL",
      "service": "Postgres",
      "description": "Database URL for Convex to connect to the PostgreSQL instance.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public connection string to access the PostgreSQL database, typically via a proxy.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time in seconds allocated for draining a deployment before shutdown.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "convex"
      }
    },
    "cli": "railway deploy --template convex",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "548329f2-ae42-488b-94ab-c3df8b0db019",
            "serializedConfig": {
              "services": {
                "5fc980fe-6248-48a9-9f16-58ddb36cb3b2": {
                  "icon": "https://dashboard.convex.dev/convex-logo-only.svg",
                  "name": "Convex Backend",
                  "deploy": {
                    "startCommand": "sh -c 'mkdir -p \"/convex/data/credentials\" && echo \"$INSTANCE_SECRET\" > \"/convex/data/credentials/instance_secret\" && echo \"$INSTANCE_NAME\" > \"/convex/data/credentials/instance_name\" && ([ -z \"$CONVEX_SELF_HOSTED_ADMIN_KEY\" ] || [ \"$CONVEX_SELF_HOSTED_ADMIN_KEY\" = \"invalid\" ]) && ./generate_admin_key.sh || echo \"Admin key: $CONVEX_SELF_HOSTED_ADMIN_KEY\" && exec ./run_backend.sh'",
                    "healthcheckPath": "/version",
                    "preDeployCommand": ""
                  },
                  "source": {
                    "image": "ghcr.io/get-convex/convex-backend:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port of the Cloud API. Do not change.",
                      "defaultValue": "3210"
                    },
                    "RUST_LOG": {
                      "isOptional": false,
                      "description": "Logging level for the Convex backend service (e.g., info, debug, warn).",
                      "defaultValue": "info"
                    },
                    "POSTGRES_URL": {
                      "isOptional": false,
                      "description": "Connection URL for accessing PostgreSQL, sourced from the Postgres service.",
                      "defaultValue": "${{Postgres.CONVEX_DATABASE_URL}}"
                    },
                    "INSTANCE_NAME": {
                      "isOptional": false,
                      "description": "Name of the current database instance.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "DISABLE_BEACON": {
                      "isOptional": false,
                      "description": "If true, disables beacon or telemetry reporting.",
                      "defaultValue": "true"
                    },
                    "INSTANCE_SECRET": {
                      "isOptional": false,
                      "description": "Secret key for the instance, used for security/authentication. If you want to make changes, please check the template guide: https://railway.com/deploy/convex",
                      "defaultValue": "{{INSTANCE_SECRET}}"
                    },
                    "CONVEX_SITE_ORIGIN": {
                      "isOptional": false,
                      "description": "Origin URL for Convex HTTP API as accessed by the frontend.",
                      "defaultValue": "${{PUBLIC_CONVEX_SITE_ORIGIN}}"
                    },
                    "DO_NOT_REQUIRE_SSL": {
                      "isOptional": false,
                      "description": "If true, disables SSL requirement for backend communication.",
                      "defaultValue": "true"
                    },
                    "CONVEX_CLOUD_ORIGIN": {
                      "isOptional": false,
                      "description": "Origin URL for Convex Cloud API as accessed by the client/frontend.",
                      "defaultValue": "${{PUBLIC_CONVEX_CLOUD_ORIGIN}}"
                    },
                    "CONVEX_SELF_HOSTED_URL": {
                      "isOptional": false,
                      "description": "URL for self-hosted Convex backend.",
                      "defaultValue": "${{CONVEX_CLOUD_ORIGIN}}"
                    },
                    "PUBLIC_CONVEX_SITE_ORIGIN": {
                      "isOptional": false,
                      "description": "Public URL for Convex HTTP API, routed through Railway TCP proxy.",
                      "defaultValue": "http://${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "PRIVATE_CONVEX_SITE_ORIGIN": {
                      "isOptional": false,
                      "description": "Private/internal URL for Convex HTTP API, accessible only inside the Railway network.",
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:3211"
                    },
                    "PUBLIC_CONVEX_CLOUD_ORIGIN": {
                      "isOptional": false,
                      "description": "Publicly accessible URL for Convex Cloud API.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "PRIVATE_CONVEX_CLOUD_ORIGIN": {
                      "isOptional": false,
                      "description": "Private/internal URL for Convex Cloud API, only within Railway network.",
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:3210"
                    },
                    "CONVEX_SELF_HOSTED_ADMIN_KEY": {
                      "isOptional": false,
                      "description": "Admin key for self-hosted Convex backend; CHANGE THIS, CHECK TEMPLATE GUIDE: https://railway.com/deploy/convex",
                      "defaultValue": "invalid"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "5fc980fe-6248-48a9-9f16-58ddb36cb3b2": {
                      "mountPath": "/convex/data"
                    }
                  }
                },
                "7211d84a-fb0f-47f8-b413-498dbc328041": {
                  "icon": "https://dashboard.convex.dev/convex-logo-only.svg",
                  "name": "Convex Dashboard",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/"
                  },
                  "source": {
                    "image": "ghcr.io/get-convex/convex-dashboard:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port of the dashboard.",
                      "defaultValue": "8080"
                    },
                    "NEXT_PUBLIC_DEPLOYMENT_URL": {
                      "isOptional": false,
                      "description": "URL of the Convex Cloud API.",
                      "defaultValue": "${{Convex Backend.CONVEX_CLOUD_ORIGIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "fddbe204-fd8b-4cb2-b7d6-bf30c3b199f6": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "postgres:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location of the PostgreSQL data directory.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Hostname or domain for accessing the PostgreSQL server (usually internal/private domain).",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port on which PostgreSQL is running (default is 5432).",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Username to authenticate with the PostgreSQL server.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGSSLMODE": {
                      "isOptional": false,
                      "description": "SSL connection mode for PostgreSQL.",
                      "defaultValue": "disable"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database name to connect to.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password to authenticate with the PostgreSQL server.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Name of the default PostgreSQL database to be created and used.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Full connection string to access the PostgreSQL database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Default PostgreSQL user.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Number of days before the generated SSL certificate expires.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the default PostgreSQL user.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "CONVEX_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Database URL for Convex to connect to the PostgreSQL instance.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:${{PGPORT}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public connection string to access the PostgreSQL database, typically via a proxy.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time in seconds allocated for draining a deployment before shutdown.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "fddbe204-fd8b-4cb2-b7d6-bf30c3b199f6": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Convex Backend",
      "method": "GET",
      "path": "/version",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-10T00:48:10.966Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_63c05fdcd7ff4f45b153",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "SUCCESS,FAILED,DEPLOYING"
      }
    ]
  }
}
