{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c7690d2d-f8c6-4154-a4ca-9a791ba4d7d1",
    "slug": "deer-flow",
    "name": "DeerFlow",
    "description": "AI assistant that researches topics and writes reports for you",
    "url": "https://railway.com/deploy/deer-flow",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/deerflow-railway"
    }
  },
  "services": [
    {
      "name": "gateway",
      "source": {
        "repo": "https://github.com/gridalpha/deerflow-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/backend/.deer-flow",
      "http": false
    },
    {
      "name": "deerflow",
      "source": {
        "repo": "https://github.com/gridalpha/deerflow-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "frontend",
      "source": {
        "image": "ghcr.io/bytedance/deer-flow-frontend:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "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": "gateway",
      "description": "FastAPI listening port",
      "secret": false,
      "strategy": "default",
      "default": "8001"
    },
    {
      "key": "LLM_MODEL",
      "service": "gateway",
      "description": "Model id for the OpenAI-compatible entry",
      "secret": false,
      "strategy": "default",
      "default": "gpt-5"
    },
    {
      "key": "LLM_API_KEY",
      "service": "gateway",
      "description": "Set to use the OpenAI-compatible entry",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_URL",
      "service": "gateway",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GEMINI_MODEL",
      "service": "gateway",
      "description": "Model id for the Gemini entry",
      "secret": false,
      "strategy": "default",
      "default": "gemini-2.5-flash"
    },
    {
      "key": "LLM_BASE_URL",
      "service": "gateway",
      "description": "Any OpenAI-compatible endpoint",
      "secret": false,
      "strategy": "default",
      "default": "https://api.openai.com/v1"
    },
    {
      "key": "DEER_FLOW_ENV",
      "service": "gateway",
      "description": "Blocks the auth-bypass switch",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "GEMINI_API_KEY",
      "service": "gateway",
      "description": "Set to use the Gemini entry",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ANTHROPIC_MODEL",
      "service": "gateway",
      "description": "Model id for the Anthropic entry",
      "secret": false,
      "strategy": "default",
      "default": "claude-sonnet-4-6"
    },
    {
      "key": "AUTH_JWT_SECRET",
      "service": "gateway",
      "description": "Session token signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "GATEWAY_WORKERS",
      "service": "gateway",
      "description": "Run state is worker-local, keep at 1",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "ANTHROPIC_API_KEY",
      "service": "gateway",
      "description": "Set to use the Anthropic entry",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "GATEWAY_ENABLE_DOCS",
      "service": "gateway",
      "description": "Swagger UI, ReDoc, OpenAPI schema",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DEERFLOW_ADMIN_EMAIL",
      "service": "gateway",
      "description": "First admin account, seeded at boot",
      "secret": false,
      "strategy": "default",
      "default": "admin@deerflow.app"
    },
    {
      "key": "DEERFLOW_ADMIN_PASSWORD",
      "service": "gateway",
      "description": "First admin password, 8+ characters",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "gateway",
      "description": "Dockerfile for this service",
      "secret": false,
      "strategy": "default",
      "default": "gateway/Dockerfile"
    },
    {
      "key": "PORT",
      "service": "deerflow",
      "description": "nginx listening port",
      "secret": false,
      "strategy": "default",
      "default": "2026"
    },
    {
      "key": "GATEWAY_UPSTREAM",
      "service": "deerflow",
      "description": "Gateway host and port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "FRONTEND_UPSTREAM",
      "service": "deerflow",
      "description": "Frontend host and port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "deerflow",
      "description": "Dockerfile for this service",
      "secret": false,
      "strategy": "default",
      "default": "proxy/Dockerfile"
    },
    {
      "key": "DEERFLOW_ALLOW_REGISTRATION",
      "service": "deerflow",
      "description": "Public sign-up, off by default",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "PORT",
      "service": "frontend",
      "description": "Next.js listening port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "frontend",
      "description": "Frontend session signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DEER_FLOW_TRUSTED_ORIGINS",
      "service": "frontend",
      "description": "Allowed browser origin",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DEER_FLOW_INTERNAL_GATEWAY_BASE_URL",
      "service": "frontend",
      "description": "Gateway base URL for SSR",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "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": "deer-flow"
      }
    },
    "cli": "railway deploy --template deer-flow",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c7690d2d-f8c6-4154-a4ca-9a791ba4d7d1",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "579a7ff5-3ad4-406f-92c9-f88ac6f74c87": {
                  "icon": "https://raw.githubusercontent.com/gridalpha/deerflow-railway/main/assets/deerflow-light.svg",
                  "name": "gateway",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/deerflow-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "FastAPI listening port",
                      "defaultValue": "8001"
                    },
                    "LLM_MODEL": {
                      "isOptional": false,
                      "description": "Model id for the OpenAI-compatible entry",
                      "defaultValue": "gpt-5"
                    },
                    "LLM_API_KEY": {
                      "isOptional": false,
                      "description": "Set to use the OpenAI-compatible entry",
                      "defaultValue": "{{LLM_API_KEY}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "GEMINI_MODEL": {
                      "isOptional": false,
                      "description": "Model id for the Gemini entry",
                      "defaultValue": "gemini-2.5-flash"
                    },
                    "LLM_BASE_URL": {
                      "isOptional": false,
                      "description": "Any OpenAI-compatible endpoint",
                      "defaultValue": "https://api.openai.com/v1"
                    },
                    "DEER_FLOW_ENV": {
                      "isOptional": false,
                      "description": "Blocks the auth-bypass switch",
                      "defaultValue": "production"
                    },
                    "GEMINI_API_KEY": {
                      "isOptional": false,
                      "description": "Set to use the Gemini entry",
                      "defaultValue": "{{GEMINI_API_KEY}}"
                    },
                    "ANTHROPIC_MODEL": {
                      "isOptional": false,
                      "description": "Model id for the Anthropic entry",
                      "defaultValue": "claude-sonnet-4-6"
                    },
                    "AUTH_JWT_SECRET": {
                      "isOptional": false,
                      "description": "Session token signing key",
                      "defaultValue": "{{AUTH_JWT_SECRET}}"
                    },
                    "GATEWAY_WORKERS": {
                      "isOptional": false,
                      "description": "Run state is worker-local, keep at 1",
                      "defaultValue": "1"
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": false,
                      "description": "Set to use the Anthropic entry",
                      "defaultValue": "{{ANTHROPIC_API_KEY}}"
                    },
                    "GATEWAY_ENABLE_DOCS": {
                      "isOptional": false,
                      "description": "Swagger UI, ReDoc, OpenAPI schema",
                      "defaultValue": "false"
                    },
                    "DEERFLOW_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "First admin account, seeded at boot",
                      "defaultValue": "admin@deerflow.app"
                    },
                    "DEERFLOW_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First admin password, 8+ characters",
                      "defaultValue": "{{DEERFLOW_ADMIN_PASSWORD}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile for this service",
                      "defaultValue": "gateway/Dockerfile"
                    }
                  },
                  "volumeMounts": {
                    "579a7ff5-3ad4-406f-92c9-f88ac6f74c87": {
                      "mountPath": "/app/backend/.deer-flow"
                    }
                  }
                },
                "7def2326-441e-441a-986f-e12176ed3686": {
                  "icon": "https://raw.githubusercontent.com/gridalpha/deerflow-railway/main/assets/deerflow-light.svg",
                  "name": "deerflow",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/deerflow-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "nginx listening port",
                      "defaultValue": "2026"
                    },
                    "GATEWAY_UPSTREAM": {
                      "isOptional": false,
                      "description": "Gateway host and port",
                      "defaultValue": "${{gateway.RAILWAY_PRIVATE_DOMAIN}}:8001"
                    },
                    "FRONTEND_UPSTREAM": {
                      "isOptional": false,
                      "description": "Frontend host and port",
                      "defaultValue": "${{frontend.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile for this service",
                      "defaultValue": "proxy/Dockerfile"
                    },
                    "DEERFLOW_ALLOW_REGISTRATION": {
                      "isOptional": false,
                      "description": "Public sign-up, off by default",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:2026": {
                        "port": 2026
                      }
                    }
                  }
                },
                "86b2d8f1-60f6-4247-ab3d-619e5f292747": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/nextjs-light.svg",
                  "name": "frontend",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/bytedance/deer-flow-frontend:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Next.js listening port",
                      "defaultValue": "3000"
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Frontend session signing key",
                      "defaultValue": "{{BETTER_AUTH_SECRET}}"
                    },
                    "DEER_FLOW_TRUSTED_ORIGINS": {
                      "isOptional": false,
                      "description": "Allowed browser origin",
                      "defaultValue": "https://${{deerflow.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DEER_FLOW_INTERNAL_GATEWAY_BASE_URL": {
                      "isOptional": false,
                      "description": "Gateway base URL for SSR",
                      "defaultValue": "http://${{gateway.RAILWAY_PRIVATE_DOMAIN}}:8001"
                    }
                  }
                },
                "c92c91c2-5ad8-49e0-ab47-71bdae907cdb": {
                  "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": {
                    "c92c91c2-5ad8-49e0-ab47-71bdae907cdb": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "deerflow",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-13T16:14:48.926Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-12T17:53:43.465Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_008fbb6bc5b142c68df0",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 145,
    "typical_build_seconds": 0,
    "typical_start_seconds": 25,
    "slowest_service": "frontend"
  }
}
