{
  "manifest_version": "1.0.0",
  "template": {
    "id": "09f711da-b3cd-4d76-8ab6-dd74c1227b6c",
    "slug": "convex-and-postgres-official",
    "name": "Convex & Postgres - Official",
    "description": "Convex is the open-source reactive database for app developers + Postgres.",
    "url": "https://railway.com/deploy/convex-and-postgres-official",
    "upstream": {
      "image": "ghcr.io/get-convex/convex-backend:latest"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "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
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGSSLMODE",
      "service": "Postgres",
      "description": "PostgreSQL client TLS mode. Keep disable for the included private-network PostgreSQL service, which has no TLS certificate configured. Use the mode required by your database if replacing it.",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "convex_self_hosted"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CONVEX_DATABASE_URL",
      "service": "Postgres",
      "description": "PostgreSQL connection URL for Convex, generated from this service's username, password and private hostname. Keep the references as supplied; do not paste a public database URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "convex-backend",
      "description": "Convex API listener port. Keep 3210 and target the backend's Railway public domain at this port.",
      "secret": false,
      "strategy": "default",
      "default": "3210"
    },
    {
      "key": "POSTGRES_URL",
      "service": "convex-backend",
      "description": "Database connection used by the Convex backend. Keep the reference to Postgres.CONVEX_DATABASE_URL to use the included private PostgreSQL service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "INSTANCE_NAME",
      "service": "convex-backend",
      "description": "Instance name",
      "secret": false,
      "strategy": "default",
      "default": "convex_self_hosted"
    },
    {
      "key": "DISABLE_BEACON",
      "service": "convex-backend",
      "description": "Optional tracking beacon to convex.dev",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "INSTANCE_SECRET",
      "service": "convex-backend",
      "description": "Instance secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CONVEX_SITE_ORIGIN",
      "service": "convex-backend",
      "description": "Public http url",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DO_NOT_REQUIRE_SSL",
      "service": "convex-backend",
      "description": "Allows the backend to connect to the included PostgreSQL service without requiring TLS. The image treats any nonempty value, including false, as enabling this option. Clear or remove it when using a database that requires TLS.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CONVEX_CLOUD_ORIGIN",
      "service": "convex-backend",
      "description": "Public instance url",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CONVEX_SELF_HOSTED_URL",
      "service": "convex-backend",
      "description": "Public instance url",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "convex-dashboard",
      "description": "Dashboard HTTP listener port. Keep 6791 and target the dashboard's Railway public domain at this port.",
      "secret": false,
      "strategy": "default",
      "default": "6791"
    },
    {
      "key": "NEXT_PUBLIC_DEPLOYMENT_URL",
      "service": "convex-dashboard",
      "description": "convex-backen url to connect to",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "convex-and-postgres-official"
      }
    },
    "cli": "railway deploy --template convex-and-postgres-official",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "09f711da-b3cd-4d76-8ab6-dd74c1227b6c",
            "serializedConfig": {
              "services": {
                "22705e64-b0a1-42fa-b8cc-a46d5f13f39a": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "postgres:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGSSLMODE": {
                      "description": "PostgreSQL client TLS mode. Keep disable for the included private-network PostgreSQL service, which has no TLS certificate configured. Use the mode required by your database if replacing it.",
                      "defaultValue": "disable"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "convex_self_hosted"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "CONVEX_DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection URL for Convex, generated from this service's username, password and private hostname. Keep the references as supplied; do not paste a public database URL.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "22705e64-b0a1-42fa-b8cc-a46d5f13f39a": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "a4f1eb24-609a-4d19-9d9a-979c36c47b93": {
                  "name": "convex-backend",
                  "source": {
                    "image": "ghcr.io/get-convex/convex-backend:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Convex API listener port. Keep 3210 and target the backend's Railway public domain at this port.",
                      "defaultValue": "3210"
                    },
                    "POSTGRES_URL": {
                      "isOptional": false,
                      "description": "Database connection used by the Convex backend. Keep the reference to Postgres.CONVEX_DATABASE_URL to use the included private PostgreSQL service.",
                      "defaultValue": "${{Postgres.CONVEX_DATABASE_URL}}"
                    },
                    "INSTANCE_NAME": {
                      "description": "Instance name",
                      "defaultValue": "convex_self_hosted"
                    },
                    "DISABLE_BEACON": {
                      "description": "Optional tracking beacon to convex.dev",
                      "defaultValue": "true"
                    },
                    "INSTANCE_SECRET": {
                      "description": "Instance secret",
                      "defaultValue": "{{INSTANCE_SECRET}}"
                    },
                    "CONVEX_SITE_ORIGIN": {
                      "description": "Public http url",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/http"
                    },
                    "DO_NOT_REQUIRE_SSL": {
                      "description": "Allows the backend to connect to the included PostgreSQL service without requiring TLS. The image treats any nonempty value, including false, as enabling this option. Clear or remove it when using a database that requires TLS.",
                      "defaultValue": "false"
                    },
                    "CONVEX_CLOUD_ORIGIN": {
                      "description": "Public instance url",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CONVEX_SELF_HOSTED_URL": {
                      "description": "Public instance url",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "a4f1eb24-609a-4d19-9d9a-979c36c47b93": {
                      "mountPath": "/convex/data"
                    }
                  }
                },
                "b95c09fe-a35a-4279-9398-491f990f0595": {
                  "name": "convex-dashboard",
                  "source": {
                    "image": "ghcr.io/get-convex/convex-dashboard:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Dashboard HTTP listener port. Keep 6791 and target the dashboard's Railway public domain at this port.",
                      "defaultValue": "6791"
                    },
                    "NEXT_PUBLIC_DEPLOYMENT_URL": {
                      "description": "convex-backen url to connect to",
                      "defaultValue": "https://${{convex-backend.RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-24T04:14:44.625Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-23T18:01:33.549Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_89f0bc305b2d4aae956b",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "DEPLOYING,CRASHED,SUCCESS"
      }
    ]
  }
}
