{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d99449b4-2356-4676-90a7-058ab66c11f4",
    "slug": "mem0-ai",
    "name": "Mem0",
    "description": "Long-term memory for AI agents that remembers across conversations",
    "url": "https://railway.com/deploy/mem0-ai",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/mem0-railway"
    }
  },
  "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": "mem0-dashboard",
      "source": {
        "repo": "https://github.com/gridalpha/mem0-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "mem0-api",
      "source": {
        "repo": "https://github.com/gridalpha/mem0-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/history",
      "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": "mem0-dashboard",
      "description": "HTTP port the Next.js server listens on",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "MEM0_REF",
      "service": "mem0-dashboard",
      "description": "mem0ai/mem0 release tag to build",
      "secret": false,
      "strategy": "default",
      "default": "v2.0.19"
    },
    {
      "key": "DASHBOARD_URL",
      "service": "mem0-dashboard",
      "description": "Own public origin, sets cookie security",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "API_INTERNAL_URL",
      "service": "mem0-dashboard",
      "description": "API address for server-side calls",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "NEXT_PUBLIC_API_URL",
      "service": "mem0-dashboard",
      "description": "API origin the browser calls",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "mem0-dashboard",
      "description": "Dockerfile that builds this service",
      "secret": false,
      "strategy": "default",
      "default": "dashboard/Dockerfile"
    },
    {
      "key": "NEXT_PUBLIC_INSTANCE_NAME",
      "service": "mem0-dashboard",
      "description": "Name shown in the dashboard header",
      "secret": false,
      "strategy": "default",
      "default": "Mem0"
    },
    {
      "key": "PORT",
      "service": "mem0-api",
      "description": "HTTP port uvicorn listens on",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "MEM0_REF",
      "service": "mem0-api",
      "description": "mem0ai/mem0 release tag to build",
      "secret": false,
      "strategy": "default",
      "default": "v2.0.19"
    },
    {
      "key": "JWT_SECRET",
      "service": "mem0-api",
      "description": "Signs dashboard session tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "APP_DB_NAME",
      "service": "mem0-api",
      "description": "Database for users, keys, settings",
      "secret": false,
      "strategy": "default",
      "default": "mem0_app"
    },
    {
      "key": "POSTGRES_DB",
      "service": "mem0-api",
      "description": "Database holding the vector store",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DASHBOARD_URL",
      "service": "mem0-api",
      "description": "CORS allow-list origin",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "mem0-api",
      "description": "Private database hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "mem0-api",
      "description": "Database port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "mem0-api",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEM0_TELEMETRY",
      "service": "mem0-api",
      "description": "Anonymous install telemetry, off",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "OPENAI_API_KEY",
      "service": "mem0-api",
      "description": "Required: extraction and embedding credential",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "HISTORY_DB_PATH",
      "service": "mem0-api",
      "description": "Memory history file on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/app/history/history.db"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "mem0-api",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEM0_DEFAULT_LLM_MODEL",
      "service": "mem0-api",
      "description": "Default fact-extraction model",
      "secret": false,
      "strategy": "default",
      "default": "gpt-5-mini"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "mem0-api",
      "description": "Dockerfile that builds this service",
      "secret": false,
      "strategy": "default",
      "default": "api/Dockerfile"
    },
    {
      "key": "POSTGRES_COLLECTION_NAME",
      "service": "mem0-api",
      "description": "pgvector table name",
      "secret": false,
      "strategy": "default",
      "default": "memories"
    },
    {
      "key": "REQUEST_LOG_RETENTION_DAYS",
      "service": "mem0-api",
      "description": "Days of request log to keep when pruning",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "MEM0_DEFAULT_EMBEDDER_MODEL",
      "service": "mem0-api",
      "description": "Default embedding model",
      "secret": false,
      "strategy": "default",
      "default": "text-embedding-3-small"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "mem0-api",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mem0-ai"
      }
    },
    "cli": "railway deploy --template mem0-ai",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d99449b4-2356-4676-90a7-058ab66c11f4",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "eb090dcc-cd74-4bb5-b472-ef0fdfee0d98": {
                  "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": {
                    "eb090dcc-cd74-4bb5-b472-ef0fdfee0d98": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "f4fcb420-2a45-47f5-8f4c-c8f3147076dd": {
                  "icon": "https://raw.githubusercontent.com/mem0ai/mem0/v2.0.19/docs/favicon.svg",
                  "name": "mem0-dashboard",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/mem0-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port the Next.js server listens on",
                      "defaultValue": "3000"
                    },
                    "MEM0_REF": {
                      "isOptional": false,
                      "description": "mem0ai/mem0 release tag to build",
                      "defaultValue": "v2.0.19"
                    },
                    "DASHBOARD_URL": {
                      "isOptional": false,
                      "description": "Own public origin, sets cookie security",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "API_INTERNAL_URL": {
                      "isOptional": false,
                      "description": "API address for server-side calls",
                      "defaultValue": "http://${{mem0-api.RAILWAY_PRIVATE_DOMAIN}}:8000"
                    },
                    "NEXT_PUBLIC_API_URL": {
                      "isOptional": false,
                      "description": "API origin the browser calls",
                      "defaultValue": "https://${{mem0-api.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile that builds this service",
                      "defaultValue": "dashboard/Dockerfile"
                    },
                    "NEXT_PUBLIC_INSTANCE_NAME": {
                      "isOptional": false,
                      "description": "Name shown in the dashboard header",
                      "defaultValue": "Mem0"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                },
                "fcb2c042-a76c-4168-a9f0-fdf055489c13": {
                  "icon": "https://raw.githubusercontent.com/mem0ai/mem0/v2.0.19/docs/favicon.svg",
                  "name": "mem0-api",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/docs",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/mem0-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port uvicorn listens on",
                      "defaultValue": "8000"
                    },
                    "MEM0_REF": {
                      "isOptional": false,
                      "description": "mem0ai/mem0 release tag to build",
                      "defaultValue": "v2.0.19"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "Signs dashboard session tokens",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "APP_DB_NAME": {
                      "isOptional": false,
                      "description": "Database for users, keys, settings",
                      "defaultValue": "mem0_app"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database holding the vector store",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "DASHBOARD_URL": {
                      "isOptional": false,
                      "description": "CORS allow-list origin",
                      "defaultValue": "https://${{mem0-dashboard.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": false,
                      "description": "Private database hostname",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "Database port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "MEM0_TELEMETRY": {
                      "isOptional": false,
                      "description": "Anonymous install telemetry, off",
                      "defaultValue": "false"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": false,
                      "description": "Required: extraction and embedding credential",
                      "defaultValue": "{{OPENAI_API_KEY}}"
                    },
                    "HISTORY_DB_PATH": {
                      "isOptional": false,
                      "description": "Memory history file on the volume",
                      "defaultValue": "/app/history/history.db"
                    },
                    "OPENAI_BASE_URL": {
                      "isOptional": true,
                      "description": "Optional: any OpenAI-compatible endpoint",
                      "defaultValue": ""
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "MEM0_DEFAULT_LLM_MODEL": {
                      "isOptional": false,
                      "description": "Default fact-extraction model",
                      "defaultValue": "gpt-5-mini"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile that builds this service",
                      "defaultValue": "api/Dockerfile"
                    },
                    "POSTGRES_COLLECTION_NAME": {
                      "isOptional": false,
                      "description": "pgvector table name",
                      "defaultValue": "memories"
                    },
                    "REQUEST_LOG_RETENTION_DAYS": {
                      "description": "Days of request log to keep when pruning",
                      "defaultValue": "30"
                    },
                    "MEM0_DEFAULT_EMBEDDER_MODEL": {
                      "isOptional": false,
                      "description": "Default embedding model",
                      "defaultValue": "text-embedding-3-small"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8000": {
                        "port": 8000
                      }
                    }
                  },
                  "volumeMounts": {
                    "fcb2c042-a76c-4168-a9f0-fdf055489c13": {
                      "mountPath": "/app/history"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "mem0-dashboard",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T12:53:29.288Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_3d98ee2445d54f3dadda",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 179,
    "typical_build_seconds": 92,
    "typical_start_seconds": 10,
    "slowest_service": "mem0-dashboard"
  }
}
