{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d8fba6de-7f9f-4631-9cae-35c126eb3d5e",
    "slug": "engram-cloud",
    "name": "Engram",
    "description": "Persistent, searchable memory that AI coding agents read and write",
    "url": "https://railway.com/deploy/engram-cloud",
    "upstream": {
      "image": "ghcr.io/gentleman-programming/engram:1.20"
    }
  },
  "services": [
    {
      "name": "engram",
      "source": {
        "image": "ghcr.io/gentleman-programming/engram:1.20"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "engram",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "18080"
    },
    {
      "key": "ENGRAM_PORT",
      "service": "engram",
      "description": "Port the cloud runtime listens on",
      "secret": false,
      "strategy": "default",
      "default": "18080"
    },
    {
      "key": "ENGRAM_CLOUD_HOST",
      "service": "engram",
      "description": "Bind address, image default is loopback",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "ENGRAM_JWT_SECRET",
      "service": "engram",
      "description": "Signs dashboard session cookies",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENGRAM_CLOUD_ADMIN",
      "service": "engram",
      "description": "Admin token for dashboard and /admin",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENGRAM_CLOUD_TOKEN",
      "service": "engram",
      "description": "Bearer token for CLI sync clients",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENGRAM_DATABASE_URL",
      "service": "engram",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENGRAM_CLOUD_TOKEN_PEPPER",
      "service": "engram",
      "description": "Hashes managed per-user tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENGRAM_CLOUD_MAX_PUSH_BYTES",
      "service": "engram",
      "description": "Max chunk push size in bytes",
      "secret": false,
      "strategy": "default",
      "default": "8388608"
    },
    {
      "key": "ENGRAM_CLOUD_ALLOWED_PROJECTS",
      "service": "engram",
      "description": "Server-side project allow-list",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "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"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "engram-cloud"
      }
    },
    "cli": "railway deploy --template engram-cloud",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d8fba6de-7f9f-4631-9cae-35c126eb3d5e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3dff25e0-2b67-47c3-9381-37c01921fc53": {
                  "icon": "https://raw.githubusercontent.com/Gentleman-Programming/engram/v1.20.0/assets/branding/engram-logo-only.png",
                  "name": "engram",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/gentleman-programming/engram:1.20"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "18080"
                    },
                    "ENGRAM_PORT": {
                      "isOptional": false,
                      "description": "Port the cloud runtime listens on",
                      "defaultValue": "18080"
                    },
                    "ENGRAM_CLOUD_HOST": {
                      "isOptional": false,
                      "description": "Bind address, image default is loopback",
                      "defaultValue": "0.0.0.0"
                    },
                    "ENGRAM_JWT_SECRET": {
                      "isOptional": false,
                      "description": "Signs dashboard session cookies",
                      "defaultValue": "{{ENGRAM_JWT_SECRET}}"
                    },
                    "ENGRAM_CLOUD_ADMIN": {
                      "isOptional": true,
                      "description": "Admin token for dashboard and /admin",
                      "defaultValue": "{{ENGRAM_CLOUD_ADMIN}}"
                    },
                    "ENGRAM_CLOUD_TOKEN": {
                      "isOptional": false,
                      "description": "Bearer token for CLI sync clients",
                      "defaultValue": "{{ENGRAM_CLOUD_TOKEN}}"
                    },
                    "ENGRAM_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "ENGRAM_CLOUD_TOKEN_PEPPER": {
                      "isOptional": true,
                      "description": "Hashes managed per-user tokens",
                      "defaultValue": "{{ENGRAM_CLOUD_TOKEN_PEPPER}}"
                    },
                    "ENGRAM_CLOUD_MAX_PUSH_BYTES": {
                      "isOptional": true,
                      "description": "Max chunk push size in bytes",
                      "defaultValue": "8388608"
                    },
                    "ENGRAM_CLOUD_ALLOWED_PROJECTS": {
                      "isOptional": false,
                      "description": "Server-side project allow-list",
                      "defaultValue": "*"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:18080": {
                        "port": 18080
                      }
                    }
                  }
                },
                "945f11b4-8522-443e-a168-9dfcdaa62dd4": {
                  "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": {
                    "945f11b4-8522-443e-a168-9dfcdaa62dd4": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "engram",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-15T10:14:39.124Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-15T07:13:21.908Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_db89b11b8a0343f2ad7f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 28,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "engram"
  }
}
