{
  "manifest_version": "1.0.0",
  "template": {
    "id": "be3979b2-8ea8-4e94-960c-191a8190a410",
    "slug": "mem0-2",
    "name": "Mem0",
    "description": "Self-hosted AI agent memory: REST API, dashboard and pgvector",
    "url": "https://railway.com/deploy/mem0-2",
    "upstream": {
      "image": "caddy:2.11.7-alpine@sha256:d8542f48d34a9cf4e4c11a478865229840e87e4c96ea3f439101f31a5d35f75f"
    }
  },
  "services": [
    {
      "name": "mem0-api",
      "source": {
        "image": "ghcr.io/onepush-dev/mem0-api:v2.2.1@sha256:b43ca243fffdbb8112992b87eb32da39a2e28de2491198a9f72827fe24f8ff91"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/history",
      "http": false
    },
    {
      "name": "mem0",
      "source": {
        "image": "caddy:2.11.7-alpine@sha256:d8542f48d34a9cf4e4c11a478865229840e87e4c96ea3f439101f31a5d35f75f"
      },
      "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
    },
    {
      "name": "mem0-dashboard",
      "source": {
        "image": "ghcr.io/onepush-dev/mem0-dashboard:v2.2.1@sha256:9e654f2351b8177296146aab1ba28aa27159b2f54f012762a57c8d59d0c58e82"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "mem0-api",
      "description": "API listen port (8000).",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "MEM0_DIR",
      "service": "mem0-api",
      "description": "Mem0 working directory on the volume.",
      "secret": false,
      "strategy": "default",
      "default": "/app/history/.mem0"
    },
    {
      "key": "JWT_SECRET",
      "service": "mem0-api",
      "description": "Signs dashboard sessions; changing it logs everyone out.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "APP_DB_NAME",
      "service": "mem0-api",
      "description": "Database for users, keys, settings, logs; created on boot.",
      "secret": false,
      "strategy": "default",
      "default": "mem0_app"
    },
    {
      "key": "POSTGRES_DB",
      "service": "mem0-api",
      "description": "Database holding the pgvector memories collection.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_API_KEY",
      "service": "mem0-api",
      "description": "Server-wide admin key, sent as the X-API-Key header.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "AUTH_DISABLED",
      "service": "mem0-api",
      "description": "Turn off authentication; keep false.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DASHBOARD_URL",
      "service": "mem0-api",
      "description": "Public dashboard URL, used as the CORS origin.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "mem0-api",
      "description": "Postgres private hostname.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "mem0-api",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "mem0-api",
      "description": "Postgres user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEM0_TELEMETRY",
      "service": "mem0-api",
      "description": "Send anonymous telemetry; false.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "HISTORY_DB_PATH",
      "service": "mem0-api",
      "description": "SQLite memory-history file on the /app/history volume.",
      "secret": false,
      "strategy": "default",
      "default": "/app/history/history.db"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "mem0-api",
      "description": "Postgres password from the Postgres service.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEM0_DEFAULT_LLM_MODEL",
      "service": "mem0-api",
      "description": "Default LLM for fact extraction (gpt-5-mini).",
      "secret": false,
      "strategy": "default",
      "default": "gpt-5-mini"
    },
    {
      "key": "POSTGRES_COLLECTION_NAME",
      "service": "mem0-api",
      "description": "pgvector table for memories; change when switching embedders.",
      "secret": false,
      "strategy": "default",
      "default": "memories"
    },
    {
      "key": "MEM0_DEFAULT_EMBEDDER_MODEL",
      "service": "mem0-api",
      "description": "Default embedding model (text-embedding-3-small).",
      "secret": false,
      "strategy": "default",
      "default": "text-embedding-3-small"
    },
    {
      "key": "PORT",
      "service": "mem0",
      "description": "Caddy listen port and public target port (8080).",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "CADDYFILE",
      "service": "mem0",
      "description": "Caddy config written to disk at start; path routing.",
      "secret": false,
      "strategy": "default",
      "default": "{\n\tadmin off\n\tservers {\n\t\ttrusted_proxies static private_ranges 100.64.0.0/10\n\t}\n}\n\n:{$PORT:8080} {\n\thandle /healthz {\n\t\trespond \"ok\" 200\n\t}\n\n\t@api path /auth /auth/* /api-keys /api-keys/* /entities /entities/* /requests /requests/* /memories /memories/* /search /configure /configure/* /generate-instructions /reset /docs /docs/* /redoc /openapi.json\n\thandle @api {\n\t\treverse_proxy {$MEM0_API_UPSTREAM}\n\t}\n\n\thandle {\n\t\treverse_proxy {$MEM0_DASHBOARD_UPSTREAM}\n\t}\n}"
    },
    {
      "key": "MEM0_API_UPSTREAM",
      "service": "mem0",
      "description": "Private host:port of mem0-api for API paths.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MEM0_DASHBOARD_UPSTREAM",
      "service": "mem0",
      "description": "Private host:port of mem0-dashboard for other paths.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory on the volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname of the Postgres service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Postgres port (5432).",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Alias of the Postgres user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Alias of the default database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Alias of the Postgres password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database (railway).",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Postgres superuser (postgres).",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity in days of the self-signed SSL certificate.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password, generated per deploy; keep alphanumeric.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds Railway lets the old deployment drain before stopping it.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "mem0-dashboard",
      "description": "Dashboard listen port (3000).",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "HOSTNAME",
      "service": "mem0-dashboard",
      "description": "Bind address; :: for Railway IPv6.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "DASHBOARD_URL",
      "service": "mem0-dashboard",
      "description": "Public dashboard URL; makes the refresh cookie Secure.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "API_INTERNAL_URL",
      "service": "mem0-dashboard",
      "description": "Private mem0-api URL for server-side calls.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "NEXT_PUBLIC_API_URL",
      "service": "mem0-dashboard",
      "description": "Public API base URL, same origin through the proxy.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_INSTANCE_NAME",
      "service": "mem0-dashboard",
      "description": "Instance name shown in the dashboard.",
      "secret": false,
      "strategy": "default",
      "default": "Mem0"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mem0-2"
      }
    },
    "cli": "railway deploy --template mem0-2",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "be3979b2-8ea8-4e94-960c-191a8190a410",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "015e94e0-750d-4130-890c-767ad2918b6e": {
                  "icon": null,
                  "name": "mem0-api",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/docs",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/onepush-dev/mem0-api:v2.2.1@sha256:b43ca243fffdbb8112992b87eb32da39a2e28de2491198a9f72827fe24f8ff91"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "API listen port (8000).",
                      "defaultValue": "8000"
                    },
                    "MEM0_DIR": {
                      "isOptional": false,
                      "description": "Mem0 working directory on the volume.",
                      "defaultValue": "/app/history/.mem0"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "Signs dashboard sessions; changing it logs everyone out.",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "APP_DB_NAME": {
                      "isOptional": false,
                      "description": "Database for users, keys, settings, logs; created on boot.",
                      "defaultValue": "mem0_app"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database holding the pgvector memories collection.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "ADMIN_API_KEY": {
                      "isOptional": false,
                      "description": "Server-wide admin key, sent as the X-API-Key header.",
                      "defaultValue": "{{ADMIN_API_KEY}}"
                    },
                    "AUTH_DISABLED": {
                      "isOptional": false,
                      "description": "Turn off authentication; keep false.",
                      "defaultValue": "false"
                    },
                    "DASHBOARD_URL": {
                      "isOptional": false,
                      "description": "Public dashboard URL, used as the CORS origin.",
                      "defaultValue": "https://${{mem0.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": false,
                      "description": "Postgres private hostname.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "Postgres port.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres user.",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "MEM0_TELEMETRY": {
                      "isOptional": false,
                      "description": "Send anonymous telemetry; false.",
                      "defaultValue": "false"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional OpenAI key; memory calls need a provider.",
                      "defaultValue": ""
                    },
                    "HISTORY_DB_PATH": {
                      "isOptional": false,
                      "description": "SQLite memory-history file on the /app/history volume.",
                      "defaultValue": "/app/history/history.db"
                    },
                    "OPENAI_BASE_URL": {
                      "isOptional": true,
                      "description": "Optional OpenAI-compatible endpoint, such as OpenRouter.",
                      "defaultValue": ""
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password from the Postgres service.",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "MEM0_DEFAULT_LLM_MODEL": {
                      "isOptional": false,
                      "description": "Default LLM for fact extraction (gpt-5-mini).",
                      "defaultValue": "gpt-5-mini"
                    },
                    "POSTGRES_COLLECTION_NAME": {
                      "isOptional": false,
                      "description": "pgvector table for memories; change when switching embedders.",
                      "defaultValue": "memories"
                    },
                    "MEM0_DEFAULT_EMBEDDER_MODEL": {
                      "isOptional": false,
                      "description": "Default embedding model (text-embedding-3-small).",
                      "defaultValue": "text-embedding-3-small"
                    }
                  },
                  "volumeMounts": {
                    "015e94e0-750d-4130-890c-767ad2918b6e": {
                      "mountPath": "/app/history"
                    }
                  }
                },
                "80dd7aaf-7c61-4cf4-af4e-68d1535c4e76": {
                  "icon": null,
                  "name": "mem0",
                  "deploy": {
                    "startCommand": "sh -c 'printf \"%s\\n\" \"$CADDYFILE\" > /etc/caddy/Caddyfile && exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.11.7-alpine@sha256:d8542f48d34a9cf4e4c11a478865229840e87e4c96ea3f439101f31a5d35f75f"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Caddy listen port and public target port (8080).",
                      "defaultValue": "8080"
                    },
                    "CADDYFILE": {
                      "isOptional": false,
                      "description": "Caddy config written to disk at start; path routing.",
                      "defaultValue": "{\n\tadmin off\n\tservers {\n\t\ttrusted_proxies static private_ranges 100.64.0.0/10\n\t}\n}\n\n:{$PORT:8080} {\n\thandle /healthz {\n\t\trespond \"ok\" 200\n\t}\n\n\t@api path /auth /auth/* /api-keys /api-keys/* /entities /entities/* /requests /requests/* /memories /memories/* /search /configure /configure/* /generate-instructions /reset /docs /docs/* /redoc /openapi.json\n\thandle @api {\n\t\treverse_proxy {$MEM0_API_UPSTREAM}\n\t}\n\n\thandle {\n\t\treverse_proxy {$MEM0_DASHBOARD_UPSTREAM}\n\t}\n}"
                    },
                    "MEM0_API_UPSTREAM": {
                      "isOptional": false,
                      "description": "Private host:port of mem0-api for API paths.",
                      "defaultValue": "${{mem0-api.RAILWAY_PRIVATE_DOMAIN}}:${{mem0-api.PORT}}"
                    },
                    "MEM0_DASHBOARD_UPSTREAM": {
                      "isOptional": false,
                      "description": "Private host:port of mem0-dashboard for other paths.",
                      "defaultValue": "${{mem0-dashboard.RAILWAY_PRIVATE_DOMAIN}}:${{mem0-dashboard.PORT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "bd6c8c1a-5cd9-41c4-9ce9-866eb4abf4d3": {
                  "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 on the volume.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname of the Postgres service.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres port (5432).",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Alias of the Postgres user.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Alias of the default database.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Alias of the Postgres password.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database (railway).",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection URL.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres superuser (postgres).",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity in days of the self-signed SSL certificate.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, generated per deploy; keep alphanumeric.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds Railway lets the old deployment drain before stopping it.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "bd6c8c1a-5cd9-41c4-9ce9-866eb4abf4d3": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "c548efeb-7cb1-42bd-a7fc-a6e3f3683a0d": {
                  "icon": null,
                  "name": "mem0-dashboard",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/onepush-dev/mem0-dashboard:v2.2.1@sha256:9e654f2351b8177296146aab1ba28aa27159b2f54f012762a57c8d59d0c58e82"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Dashboard listen port (3000).",
                      "defaultValue": "3000"
                    },
                    "HOSTNAME": {
                      "isOptional": false,
                      "description": "Bind address; :: for Railway IPv6.",
                      "defaultValue": "::"
                    },
                    "DASHBOARD_URL": {
                      "isOptional": false,
                      "description": "Public dashboard URL; makes the refresh cookie Secure.",
                      "defaultValue": "https://${{mem0.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "API_INTERNAL_URL": {
                      "isOptional": false,
                      "description": "Private mem0-api URL for server-side calls.",
                      "defaultValue": "http://${{mem0-api.RAILWAY_PRIVATE_DOMAIN}}:${{mem0-api.PORT}}"
                    },
                    "NEXT_PUBLIC_API_URL": {
                      "isOptional": false,
                      "description": "Public API base URL, same origin through the proxy.",
                      "defaultValue": "https://${{mem0.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_INSTANCE_NAME": {
                      "isOptional": false,
                      "description": "Instance name shown in the dashboard.",
                      "defaultValue": "Mem0"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "mem0",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-10-16T10:14:44.004Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-16T05:57:13.168Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_d91f661d4f83433a84db",
    "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": "mem0-api"
  }
}
