{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1e98c0bb-eb1f-44f7-acd5-4da8f1b64765",
    "slug": "supertokens-auth",
    "name": "SuperTokens",
    "description": "Authentication server for user accounts, logins and sessions",
    "url": "https://railway.com/deploy/supertokens-auth",
    "upstream": {
      "image": "supertokens/supertokens-postgresql:latest"
    }
  },
  "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": "supertokens",
      "source": {
        "image": "supertokens/supertokens-postgresql:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "dashboard",
      "source": {
        "repo": "https://github.com/gridalpha/supertokens-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "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": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "supertokens",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "3567"
    },
    {
      "key": "API_KEYS",
      "service": "supertokens",
      "description": "Required on every core route but /hello",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LOG_LEVEL",
      "service": "supertokens",
      "description": "DEBUG floods the log stream",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "SUPERTOKENS_PORT",
      "service": "supertokens",
      "description": "Core HTTP listening port",
      "secret": true,
      "strategy": "default",
      "default": "3567"
    },
    {
      "key": "DISABLE_TELEMETRY",
      "service": "supertokens",
      "description": "No anonymous usage reporting",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "MAX_SERVER_POOL_SIZE",
      "service": "supertokens",
      "description": "HTTP worker threads",
      "secret": false,
      "strategy": "default",
      "default": "20"
    },
    {
      "key": "POSTGRESQL_CONNECTION_URI",
      "service": "supertokens",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BULK_MIGRATION_PARALLELISM",
      "service": "supertokens",
      "description": "Default reads the host core count",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "POSTGRESQL_CONNECTION_POOL_SIZE",
      "service": "supertokens",
      "description": "Max database connections",
      "secret": false,
      "strategy": "default",
      "default": "15"
    },
    {
      "key": "POSTGRESQL_IDLE_CONNECTION_TIMEOUT",
      "service": "supertokens",
      "description": "Idle connection timeout, ms",
      "secret": false,
      "strategy": "default",
      "default": "60000"
    },
    {
      "key": "POSTGRESQL_MINIMUM_IDLE_CONNECTIONS",
      "service": "supertokens",
      "description": "Warm pool floor",
      "secret": false,
      "strategy": "default",
      "default": "3"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "supertokens",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "15"
    },
    {
      "key": "PORT",
      "service": "dashboard",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "APP_NAME",
      "service": "dashboard",
      "description": "Shown in the dashboard",
      "secret": false,
      "strategy": "default",
      "default": "SuperTokens on Railway"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "dashboard",
      "description": "Node sizes its heap from host RAM",
      "secret": false,
      "strategy": "default",
      "default": "--max-old-space-size=512"
    },
    {
      "key": "SUPERTOKENS_API_KEY",
      "service": "dashboard",
      "description": "Must match the core key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DASHBOARD_ADMIN_EMAIL",
      "service": "dashboard",
      "description": "First dashboard user, seeded at boot",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "SUPERTOKENS_PUBLIC_URI",
      "service": "dashboard",
      "description": "Fallback when private fails",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DASHBOARD_ADMIN_PASSWORD",
      "service": "dashboard",
      "description": "Password for that user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SUPERTOKENS_CONNECTION_URI",
      "service": "dashboard",
      "description": "Core over private network",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "dashboard",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "15"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "supertokens-auth"
      }
    },
    "cli": "railway deploy --template supertokens-auth",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1e98c0bb-eb1f-44f7-acd5-4da8f1b64765",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2ebd4e3a-4c56-4ccd-8d50-8ccdf316484b": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/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": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "2ebd4e3a-4c56-4ccd-8d50-8ccdf316484b": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "583fe80a-0411-456e-8af6-a957bb7e7ccc": {
                  "icon": "https://raw.githubusercontent.com/gridalpha/supertokens-railway/main/assets/supertokens.png",
                  "name": "supertokens",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/hello",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "supertokens/supertokens-postgresql:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "3567"
                    },
                    "API_KEYS": {
                      "isOptional": false,
                      "description": "Required on every core route but /hello",
                      "defaultValue": "{{API_KEYS}}"
                    },
                    "LOG_LEVEL": {
                      "isOptional": true,
                      "description": "DEBUG floods the log stream",
                      "defaultValue": "INFO"
                    },
                    "SUPERTOKENS_PORT": {
                      "isOptional": false,
                      "description": "Core HTTP listening port",
                      "defaultValue": "3567"
                    },
                    "DISABLE_TELEMETRY": {
                      "isOptional": true,
                      "description": "No anonymous usage reporting",
                      "defaultValue": "true"
                    },
                    "MAX_SERVER_POOL_SIZE": {
                      "isOptional": true,
                      "description": "HTTP worker threads",
                      "defaultValue": "20"
                    },
                    "POSTGRESQL_CONNECTION_URI": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "BULK_MIGRATION_PARALLELISM": {
                      "isOptional": true,
                      "description": "Default reads the host core count",
                      "defaultValue": "4"
                    },
                    "POSTGRESQL_CONNECTION_POOL_SIZE": {
                      "isOptional": true,
                      "description": "Max database connections",
                      "defaultValue": "15"
                    },
                    "POSTGRESQL_IDLE_CONNECTION_TIMEOUT": {
                      "isOptional": true,
                      "description": "Idle connection timeout, ms",
                      "defaultValue": "60000"
                    },
                    "POSTGRESQL_MINIMUM_IDLE_CONNECTIONS": {
                      "isOptional": true,
                      "description": "Warm pool floor",
                      "defaultValue": "3"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3567": {
                        "port": 3567
                      }
                    }
                  }
                },
                "c18e5b98-a052-4561-a6c6-f11e51fb3fcc": {
                  "icon": "https://raw.githubusercontent.com/gridalpha/supertokens-railway/main/assets/supertokens.png",
                  "name": "dashboard",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/supertokens-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "3000"
                    },
                    "APP_NAME": {
                      "isOptional": true,
                      "description": "Shown in the dashboard",
                      "defaultValue": "SuperTokens on Railway"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Node sizes its heap from host RAM",
                      "defaultValue": "--max-old-space-size=512"
                    },
                    "SUPERTOKENS_API_KEY": {
                      "isOptional": false,
                      "description": "Must match the core key",
                      "defaultValue": "${{supertokens.API_KEYS}}"
                    },
                    "DASHBOARD_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "First dashboard user, seeded at boot",
                      "defaultValue": "admin@example.com"
                    },
                    "SUPERTOKENS_PUBLIC_URI": {
                      "isOptional": false,
                      "description": "Fallback when private fails",
                      "defaultValue": "https://${{supertokens.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DASHBOARD_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for that user",
                      "defaultValue": "{{DASHBOARD_ADMIN_PASSWORD}}"
                    },
                    "SUPERTOKENS_CONNECTION_URI": {
                      "isOptional": false,
                      "description": "Core over private network",
                      "defaultValue": "http://${{supertokens.RAILWAY_PRIVATE_DOMAIN}}:3567"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "supertokens",
      "method": "GET",
      "path": "/hello",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-04T05:44:27.711Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-04T05:32:12.241Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c420ce8f29074035a863",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 82,
    "typical_build_seconds": 20,
    "typical_deploy_seconds": 10,
    "typical_healthcheck_lag_seconds": 0,
    "slowest_service": "dashboard"
  }
}
