{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e728f990-0110-4125-97f8-b122b84a3336",
    "slug": "unleash-railway",
    "name": "Unleash",
    "description": "Open-source feature flag platform — a LaunchDarkly alternative",
    "url": "https://railway.com/deploy/unleash-railway",
    "upstream": {
      "image": "unleashorg/unleash-edge:latest"
    }
  },
  "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": "unleash-edge",
      "source": {
        "image": "unleashorg/unleash-edge:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "unleash",
      "source": {
        "image": "unleashorg/unleash-server:latest"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory, a subdirectory of the volume mount",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname, reachable only inside the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Standard PostgreSQL port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "libpq alias of the superuser name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "libpq alias of the default database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "libpq alias of the superuser password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "rRAILWAY_PRIVATE_DOMAINailway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string, use this from other services",
      "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": "Validity window of the generated self-signed TLS certificate",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public connection string over the TCP proxy, for external tools",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Grace period for in-flight connections on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "unleash-edge",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "3063"
    },
    {
      "key": "TOKENS",
      "service": "unleash-edge",
      "description": "Token used to fetch flag data",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_URL",
      "service": "unleash-edge",
      "description": "Redis backing the Edge cache",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TRUST_PROXY",
      "service": "unleash-edge",
      "description": "Read client IP from forwarded headers",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "UPSTREAM_URL",
      "service": "unleash-edge",
      "description": "Private address of the server",
      "secret": false,
      "strategy": "default",
      "default": "http://unleash.railway.internal:4242"
    },
    {
      "key": "DISABLE_TOKENS_ENDPOINT",
      "service": "unleash-edge",
      "description": "Hide unauthenticated token listing",
      "secret": true,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DISABLE_FEATURES_ENDPOINT",
      "service": "unleash-edge",
      "description": "Hide unauthenticated cached-flag dump",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DISABLE_INSTANCE_DATA_ENDPOINT",
      "service": "unleash-edge",
      "description": "Hide unauthenticated instance details",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DISABLE_METRICS_BATCH_ENDPOINT",
      "service": "unleash-edge",
      "description": "Hide unauthenticated buffered metrics",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Private hostname, reachable only inside the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Standard Redis port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Default ACL user created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string, use this from other services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Convenience alias of the generated password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Generated password for the default user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "unleash",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "4242"
    },
    {
      "key": "EDGE_URL",
      "service": "unleash",
      "description": "Edge URL shown in SDK setup",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LOG_LEVEL",
      "service": "unleash",
      "description": "Application log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "UNLEASH_URL",
      "service": "unleash",
      "description": "Public base URL for links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_SSL",
      "service": "unleash",
      "description": "Private network connection, no TLS",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DATABASE_URL",
      "service": "unleash",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "unleash",
      "description": "Node heap ceiling for the container",
      "secret": false,
      "strategy": "default",
      "default": "--max-old-space-size=2048"
    },
    {
      "key": "SECURE_HEADERS",
      "service": "unleash",
      "description": "Enable HSTS and content security policy",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "UNLEASH_SECRET",
      "service": "unleash",
      "description": "Session and cookie signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_POOL_MAX",
      "service": "unleash",
      "description": "Maximum pooled database connections",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "INIT_BACKEND_API_TOKENS",
      "service": "unleash",
      "description": "Seeded server-side SDK token",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "INIT_FRONTEND_API_TOKENS",
      "service": "unleash",
      "description": "Seeded frontend SDK token",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "UNLEASH_DEFAULT_ADMIN_PASSWORD",
      "service": "unleash",
      "description": "First administrator password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "UNLEASH_DEFAULT_ADMIN_USERNAME",
      "service": "unleash",
      "description": "First administrator username",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "unleash-railway"
      }
    },
    "cli": "railway deploy --template unleash-railway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e728f990-0110-4125-97f8-b122b84a3336",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "06089108-b274-4a0e-9f14-92fca0b8b3d5": {
                  "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, a subdirectory of the volume mount",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname, reachable only inside the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Standard PostgreSQL port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser name",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "libpq alias of the default database",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser password",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created on first boot",
                      "defaultValue": "rRAILWAY_PRIVATE_DOMAINailway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string, use this from other services",
                      "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": "Validity window of the generated self-signed TLS certificate",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public connection string over the TCP proxy, for external tools",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Grace period for in-flight connections on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "06089108-b274-4a0e-9f14-92fca0b8b3d5": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "184f6af9-c20b-4b3c-8237-f4a5bd66d318": {
                  "icon": "https://raw.githubusercontent.com/Unleash/unleash/main/frontend/src/assets/img/logo.svg",
                  "name": "unleash-edge",
                  "deploy": {
                    "startCommand": "/app/unleash-edge edge",
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "unleashorg/unleash-edge:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "3063"
                    },
                    "TOKENS": {
                      "isOptional": false,
                      "description": "Token used to fetch flag data",
                      "defaultValue": "${{unleash.INIT_BACKEND_API_TOKENS}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis backing the Edge cache",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "TRUST_PROXY": {
                      "isOptional": false,
                      "description": "Read client IP from forwarded headers",
                      "defaultValue": "true"
                    },
                    "UPSTREAM_URL": {
                      "isOptional": false,
                      "description": "Private address of the server",
                      "defaultValue": "http://unleash.railway.internal:4242"
                    },
                    "DISABLE_TOKENS_ENDPOINT": {
                      "isOptional": false,
                      "description": "Hide unauthenticated token listing",
                      "defaultValue": "true"
                    },
                    "DISABLE_FEATURES_ENDPOINT": {
                      "isOptional": false,
                      "description": "Hide unauthenticated cached-flag dump",
                      "defaultValue": "true"
                    },
                    "DISABLE_INSTANCE_DATA_ENDPOINT": {
                      "isOptional": false,
                      "description": "Hide unauthenticated instance details",
                      "defaultValue": "true"
                    },
                    "DISABLE_METRICS_BATCH_ENDPOINT": {
                      "isOptional": false,
                      "description": "Hide unauthenticated buffered metrics",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3063": {
                        "port": 3063
                      }
                    }
                  }
                },
                "76fca389-401b-49d0-a7b2-1518932645df": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Private hostname, reachable only inside the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Standard Redis port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Default ACL user created on first boot",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string, use this from other services",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Convenience alias of the generated password",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the default user",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "76fca389-401b-49d0-a7b2-1518932645df": {
                      "mountPath": "/data"
                    }
                  }
                },
                "ced28d15-4f22-466f-a473-f4fa2cbdcfa0": {
                  "icon": "https://raw.githubusercontent.com/Unleash/unleash/main/frontend/src/assets/img/logo.svg",
                  "name": "unleash",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "unleashorg/unleash-server:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "4242"
                    },
                    "EDGE_URL": {
                      "isOptional": false,
                      "description": "Edge URL shown in SDK setup",
                      "defaultValue": "https://${{unleash-edge.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Application log verbosity",
                      "defaultValue": "info"
                    },
                    "UNLEASH_URL": {
                      "isOptional": false,
                      "description": "Public base URL for links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_SSL": {
                      "isOptional": false,
                      "description": "Private network connection, no TLS",
                      "defaultValue": "false"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Node heap ceiling for the container",
                      "defaultValue": "--max-old-space-size=2048"
                    },
                    "SECURE_HEADERS": {
                      "isOptional": false,
                      "description": "Enable HSTS and content security policy",
                      "defaultValue": "true"
                    },
                    "UNLEASH_SECRET": {
                      "isOptional": false,
                      "description": "Session and cookie signing key",
                      "defaultValue": "{{UNLEASH_SECRET}}"
                    },
                    "DATABASE_POOL_MAX": {
                      "isOptional": false,
                      "description": "Maximum pooled database connections",
                      "defaultValue": "10"
                    },
                    "INIT_BACKEND_API_TOKENS": {
                      "isOptional": false,
                      "description": "Seeded server-side SDK token",
                      "defaultValue": "{{INIT_BACKEND_API_TOKENS}}"
                    },
                    "INIT_FRONTEND_API_TOKENS": {
                      "isOptional": false,
                      "description": "Seeded frontend SDK token",
                      "defaultValue": "{{INIT_FRONTEND_API_TOKENS}}"
                    },
                    "UNLEASH_DEFAULT_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator password",
                      "defaultValue": "{{UNLEASH_DEFAULT_ADMIN_PASSWORD}}"
                    },
                    "UNLEASH_DEFAULT_ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "First administrator username",
                      "defaultValue": "admin"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:4242": {
                        "port": 4242
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "unleash",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-10T17:41:53.861Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_78caae49aff24bc79ace",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "SUCCESS,SUCCESS,FAILED,SUCCESS"
      }
    ]
  }
}
