{
  "manifest_version": "1.0.0",
  "template": {
    "id": "0c29a175-a984-49fc-b291-c43242eea861",
    "slug": "pocketid",
    "name": "Pocket-Id",
    "description": "Auth0 alternative. OpenID Connect provider with passkey authentication",
    "url": "https://railway.com/deploy/pocketid",
    "upstream": {
      "image": "ghcr.io/pocket-id/pocket-id:v2"
    }
  },
  "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": "pocket-id",
      "source": {
        "image": "ghcr.io/pocket-id/pocket-id:v2"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory, a subdirectory of the volume mount",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname, reachable only inside the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Standard PostgreSQL port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "libpq alias of the superuser name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "libpq alias of the default database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "libpq alias of the superuser password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string, use this from other services",
      "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": "Validity window of the generated self-signed TLS certificate",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public connection string over the TCP proxy, for external tools",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Grace period for in-flight connections on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "pocket-id",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "1411"
    },
    {
      "key": "APP_URL",
      "service": "pocket-id",
      "description": "Public URL and WebAuthn relying party",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LOG_LEVEL",
      "service": "pocket-id",
      "description": "Application log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "S3_BUCKET",
      "service": "pocket-id",
      "description": "Bucket name for uploaded images",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "pocket-id",
      "description": "Object storage region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "pocket-id",
      "description": "Object storage endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TRUST_PROXY",
      "service": "pocket-id",
      "description": "Read client IPs from proxy headers",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "FILE_BACKEND",
      "service": "pocket-id",
      "description": "Store uploads in object storage",
      "secret": false,
      "strategy": "default",
      "default": "s3"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "pocket-id",
      "description": "Master key for encrypted data",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "pocket-id",
      "description": "Object storage access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_CONNECTION_STRING",
      "service": "pocket-id",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "pocket-id",
      "description": "Object storage secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VERSION_CHECK_DISABLED",
      "service": "pocket-id",
      "description": "Check for new releases",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "AUDIT_LOG_RETENTION_DAYS",
      "service": "pocket-id",
      "description": "Days audit events are kept",
      "secret": false,
      "strategy": "default",
      "default": "90"
    },
    {
      "key": "ALLOW_INSECURE_CALLBACK_URLS",
      "service": "pocket-id",
      "description": "Reject plain-HTTP client callbacks",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "pocket-id",
      "description": "Graceful shutdown window on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "pocketid"
      }
    },
    "cli": "railway deploy --template pocketid",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "0c29a175-a984-49fc-b291-c43242eea861",
            "serializedConfig": {
              "buckets": {
                "66ff623d-b1ce-4f00-a1cb-bf93d1c25238": {
                  "name": "pocket-id-files"
                }
              },
              "services": {
                "1b71586b-b63e-49bd-be2a-775082360f06": {
                  "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": "Data directory, a subdirectory of the volume mount",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname, reachable only inside the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Standard PostgreSQL port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser name",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "libpq alias of the default database",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser password",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string, use this from other services",
                      "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": "Validity window of the generated self-signed TLS certificate",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public connection string over the TCP proxy, for external tools",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Grace period for in-flight connections on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "1b71586b-b63e-49bd-be2a-775082360f06": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "ee88543e-0243-49fa-b5a8-58c470594a4b": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/pocket-id.svg",
                  "name": "pocket-id",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/pocket-id/pocket-id:v2"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "1411"
                    },
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public URL and WebAuthn relying party",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Application log verbosity",
                      "defaultValue": "info"
                    },
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "Bucket name for uploaded images",
                      "defaultValue": "${{pocket-id-files.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "Object storage region",
                      "defaultValue": "${{pocket-id-files.REGION}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Object storage endpoint",
                      "defaultValue": "${{pocket-id-files.ENDPOINT}}"
                    },
                    "TRUST_PROXY": {
                      "isOptional": false,
                      "description": "Read client IPs from proxy headers",
                      "defaultValue": "true"
                    },
                    "FILE_BACKEND": {
                      "isOptional": false,
                      "description": "Store uploads in object storage",
                      "defaultValue": "s3"
                    },
                    "ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Master key for encrypted data",
                      "defaultValue": "{{ENCRYPTION_KEY}}"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Object storage access key",
                      "defaultValue": "${{pocket-id-files.ACCESS_KEY_ID}}"
                    },
                    "DB_CONNECTION_STRING": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Object storage secret key",
                      "defaultValue": "${{pocket-id-files.SECRET_ACCESS_KEY}}"
                    },
                    "VERSION_CHECK_DISABLED": {
                      "isOptional": false,
                      "description": "Check for new releases",
                      "defaultValue": "false"
                    },
                    "AUDIT_LOG_RETENTION_DAYS": {
                      "isOptional": false,
                      "description": "Days audit events are kept",
                      "defaultValue": "90"
                    },
                    "ALLOW_INSECURE_CALLBACK_URLS": {
                      "isOptional": false,
                      "description": "Reject plain-HTTP client callbacks",
                      "defaultValue": "false"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown window on redeploy",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:1411": {
                        "port": 1411
                      }
                    }
                  },
                  "volumeMounts": {
                    "ee88543e-0243-49fa-b5a8-58c470594a4b": {
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "pocket-id",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-05T23:54:15.610Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-04T12:50:33.649Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_707b915bc91d466aaebf",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": false,
        "detail": "got 204, expected 200"
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ]
  }
}
