{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b4922792-e848-458d-bc03-69b2afe4ef87",
    "slug": "mempalace",
    "name": "MemPalace",
    "description": "Self-hosted AI memory server (MCP) with a private Qdrant, for agents.",
    "url": "https://railway.com/deploy/mempalace",
    "upstream": {
      "image": "ghcr.io/youssefsiam38/mempalace-railway:1.0.0"
    }
  },
  "services": [
    {
      "name": "mempalace",
      "source": {
        "image": "ghcr.io/youssefsiam38/mempalace-railway:1.0.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "qdrant",
      "source": {
        "image": "qdrant/qdrant:v1.19.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/qdrant/storage",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "mempalace",
      "description": "Port Railway routes traffic and health checks to; keep it equal to the server's listen port (8765).",
      "secret": false,
      "strategy": "default",
      "default": "8765"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "mempalace",
      "description": "Run as root so the non-root image can write the root-owned volume.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "MEMPALACE_QDRANT_URL",
      "service": "mempalace",
      "description": "Internal URL of the bundled Qdrant vector store.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MEMPALACE_MCP_HTTP_TOKEN",
      "service": "mempalace",
      "description": "Bearer token for the MCP endpoint, generated. Copy it to connect your clients.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEMPALACE_MCP_IDLE_HOURS",
      "service": "mempalace",
      "description": "0 disables the idle-exit watchdog so the server stays up on Railway.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "mempalace",
      "description": "Give the first start room to download the embedding model.",
      "secret": false,
      "strategy": "default",
      "default": "300"
    },
    {
      "key": "QDRANT__SERVICE__HOST",
      "service": "qdrant",
      "description": "Bind address; :: makes Qdrant reachable over Railway's IPv6 private network.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mempalace"
      }
    },
    "cli": "railway deploy --template mempalace",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b4922792-e848-458d-bc03-69b2afe4ef87",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "925ff966-a76c-4106-85f0-c3f77f2b8fcb": {
                  "icon": null,
                  "name": "mempalace",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/youssefsiam38/mempalace-railway:1.0.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes traffic and health checks to; keep it equal to the server's listen port (8765).",
                      "defaultValue": "8765"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so the non-root image can write the root-owned volume.",
                      "defaultValue": "0"
                    },
                    "MEMPALACE_QDRANT_URL": {
                      "isOptional": false,
                      "description": "Internal URL of the bundled Qdrant vector store.",
                      "defaultValue": "http://${{qdrant.RAILWAY_PRIVATE_DOMAIN}}:6333"
                    },
                    "MEMPALACE_MCP_HTTP_TOKEN": {
                      "isOptional": false,
                      "description": "Bearer token for the MCP endpoint, generated. Copy it to connect your clients.",
                      "defaultValue": "{{MEMPALACE_MCP_HTTP_TOKEN}}"
                    },
                    "MEMPALACE_MCP_IDLE_HOURS": {
                      "isOptional": false,
                      "description": "0 disables the idle-exit watchdog so the server stays up on Railway.",
                      "defaultValue": "0"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "Give the first start room to download the embedding model.",
                      "defaultValue": "300"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8765": {
                        "port": 8765
                      }
                    }
                  },
                  "volumeMounts": {
                    "925ff966-a76c-4106-85f0-c3f77f2b8fcb": {
                      "mountPath": "/data"
                    }
                  }
                },
                "ae05c2c8-d318-42e0-aa17-d8fd689a20f3": {
                  "icon": null,
                  "name": "qdrant",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "qdrant/qdrant:v1.19.1"
                  },
                  "variables": {
                    "QDRANT__SERVICE__HOST": {
                      "isOptional": false,
                      "description": "Bind address; :: makes Qdrant reachable over Railway's IPv6 private network.",
                      "defaultValue": "::"
                    }
                  },
                  "volumeMounts": {
                    "ae05c2c8-d318-42e0-aa17-d8fd689a20f3": {
                      "mountPath": "/qdrant/storage"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "mempalace",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-18T10:14:39.389Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-17T09:25:07.392Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_776b3ef9466146f89746",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 37,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "mempalace"
  }
}
