{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b59e25f4-85bb-4dac-be1f-4283823e1c84",
    "slug": "n8n-workers-queue-mode",
    "name": "n8n with Workers (Queue Mode + Redis + Postgres)",
    "description": "Self-hosted n8n queue mode: workers, Redis, Postgres. Zapier alternative.",
    "url": "https://railway.com/deploy/n8n-workers-queue-mode",
    "upstream": {
      "image": "n8nio/n8n"
    }
  },
  "services": [
    {
      "name": "Primary",
      "source": {
        "image": "n8nio/n8n"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "railwayapp/redis"
      },
      "needs_volume": true,
      "volume_mount_path": "/bitnami",
      "tcp_ports": [
        6379
      ],
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "Worker",
      "source": {
        "image": "n8nio/n8n"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Primary",
      "description": "The HTTP port the application responds to",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "DB_TYPE",
      "service": "Primary",
      "description": "Database type",
      "secret": false,
      "strategy": "default",
      "default": "postgresdb"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "Primary",
      "description": "The memory limit for the task runner Node.js process",
      "secret": false,
      "strategy": "default",
      "default": "--max_old_space_size=8192"
    },
    {
      "key": "EXECUTIONS_MODE",
      "service": "Primary",
      "description": "Whether executions should run directly or using queue",
      "secret": false,
      "strategy": "default",
      "default": "queue"
    },
    {
      "key": "N8N_TRUST_PROXY",
      "service": "Primary",
      "description": "Trust X-Forwarded headers from Railway's proxy so n8n sees HTTPS and the real client IP.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "N8N_WEBHOOK_URL",
      "service": "Primary",
      "description": "Used to manually provide the Webhook URL when running n8n behind a reverse proxy",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "Primary",
      "description": "Database host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PORT",
      "service": "Primary",
      "description": "Database port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_USER",
      "service": "Primary",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "Primary",
      "description": "Generates a secure random 32-character string",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "N8N_LISTEN_ADDRESS",
      "service": "Primary",
      "description": "The IP address n8n should listen on",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "N8N_EDITOR_BASE_URL",
      "service": "Primary",
      "description": "Public URL where users can access the editor",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "QUEUE_BULL_REDIS_HOST",
      "service": "Primary",
      "description": "Redis host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PORT",
      "service": "Primary",
      "description": "Redis port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_DATABASE",
      "service": "Primary",
      "description": "Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "Primary",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PASSWORD",
      "service": "Primary",
      "description": "Redis password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_USERNAME",
      "service": "Primary",
      "description": "Redis user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_DUALSTACK",
      "service": "Primary",
      "description": "Enable dual-stack support (IPv4 and IPv6) on Redis connections",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENABLE_ALPINE_PRIVATE_NETWORKING",
      "service": "Primary",
      "description": "Enable alpine private networking",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS",
      "service": "Primary",
      "description": "Run manual executions from the editor on workers instead of the main instance.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS",
      "service": "Primary",
      "description": "Require strict file permissions (0600) on n8n's settings file.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Private hostname of Redis on Railway's internal network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Port Redis listens on.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis ACL username.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private Redis connection URL for other services in this project.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Alias of REDIS_PASSWORD for clients that expect this name.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Redis password, generated at deploy time.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Redis",
      "description": "Run the container as root (UID 0) so Redis can write to its volume.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public Redis connection URL through Railway's TCP proxy, for access from outside Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Directory inside the volume where Postgres stores its data.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname of Postgres on Railway's internal network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port Postgres listens on.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Postgres user (mirrors POSTGRES_USER) for psql and client libraries.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database name (mirrors POSTGRES_DB).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Postgres password (mirrors POSTGRES_PASSWORD).",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Name of the database created on first start.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private Postgres connection URL for other services in this project.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first start.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity in days of the self-signed SSL certificate Postgres generates.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password, generated at deploy time.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public Postgres connection URL through Railway's TCP proxy, for access from outside Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds Railway waits for Postgres to shut down cleanly during a redeploy.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Worker",
      "description": "The HTTP port the application responds to",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "DB_TYPE",
      "service": "Worker",
      "description": "Database type",
      "secret": false,
      "strategy": "default",
      "default": "postgresdb"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "Worker",
      "description": "The memory limit for the task runner Node.js process",
      "secret": false,
      "strategy": "default",
      "default": "--max_old_space_size=8192"
    },
    {
      "key": "EXECUTIONS_MODE",
      "service": "Worker",
      "description": "Whether executions should run directly or using queue",
      "secret": false,
      "strategy": "default",
      "default": "queue"
    },
    {
      "key": "N8N_WEBHOOK_URL",
      "service": "Worker",
      "description": "Used to manually provide the Webhook URL when running n8n behind a reverse proxy",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "Worker",
      "description": "Database host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PORT",
      "service": "Worker",
      "description": "Database port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_USER",
      "service": "Worker",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "Worker",
      "description": "Generates a secure random 32-character string",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "N8N_LISTEN_ADDRESS",
      "service": "Worker",
      "description": "The IP address n8n should listen on",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "QUEUE_BULL_REDIS_HOST",
      "service": "Worker",
      "description": "Redis host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PORT",
      "service": "Worker",
      "description": "Redis port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_DATABASE",
      "service": "Worker",
      "description": "Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "Worker",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PASSWORD",
      "service": "Worker",
      "description": "Redis password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_USERNAME",
      "service": "Worker",
      "description": "Redis user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_DUALSTACK",
      "service": "Worker",
      "description": "Enable dual-stack support (IPv4 and IPv6) on Redis connections",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENABLE_ALPINE_PRIVATE_NETWORKING",
      "service": "Worker",
      "description": "Enable alpine private networking",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS",
      "service": "Worker",
      "description": "Run manual executions from the editor on workers instead of the main instance.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS",
      "service": "Worker",
      "description": "Require strict file permissions (0600) on n8n's settings file.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "n8n-workers-queue-mode"
      }
    },
    "cli": "railway deploy --template n8n-workers-queue-mode",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b59e25f4-85bb-4dac-be1f-4283823e1c84",
            "serializedConfig": {
              "services": {
                "4cde4343-f1d8-4de1-bee8-7f47c60f9425": {
                  "icon": "https://devicons.railway.app/i/n8n.svg",
                  "name": "Primary",
                  "build": {},
                  "deploy": {
                    "startCommand": "n8n start",
                    "healthcheckPath": "/healthz"
                  },
                  "source": {
                    "image": "n8nio/n8n",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "The HTTP port the application responds to",
                      "defaultValue": "5678"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "Database type",
                      "defaultValue": "postgresdb"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "The memory limit for the task runner Node.js process",
                      "defaultValue": "--max_old_space_size=8192"
                    },
                    "EXECUTIONS_MODE": {
                      "isOptional": false,
                      "description": "Whether executions should run directly or using queue",
                      "defaultValue": "queue"
                    },
                    "N8N_TRUST_PROXY": {
                      "description": "Trust X-Forwarded headers from Railway's proxy so n8n sees HTTPS and the real client IP.",
                      "defaultValue": "true"
                    },
                    "N8N_WEBHOOK_URL": {
                      "description": "Used to manually provide the Webhook URL when running n8n behind a reverse proxy",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "Database host",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_POSTGRESDB_PORT": {
                      "isOptional": false,
                      "description": "Database port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DB_POSTGRESDB_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Generates a secure random 32-character string",
                      "defaultValue": "{{N8N_ENCRYPTION_KEY}}"
                    },
                    "N8N_LISTEN_ADDRESS": {
                      "isOptional": false,
                      "description": "The IP address n8n should listen on",
                      "defaultValue": "::"
                    },
                    "N8N_EDITOR_BASE_URL": {
                      "isOptional": false,
                      "description": "Public URL where users can access the editor",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "QUEUE_BULL_REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis host",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "QUEUE_BULL_REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis port",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "DB_POSTGRESDB_DATABASE": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password",
                      "defaultValue": "${{Redis.REDIS_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_USERNAME": {
                      "isOptional": false,
                      "description": "Redis user",
                      "defaultValue": "${{Redis.REDISUSER}}"
                    },
                    "QUEUE_BULL_REDIS_DUALSTACK": {
                      "description": "Enable dual-stack support (IPv4 and IPv6) on Redis connections",
                      "defaultValue": "true"
                    },
                    "ENABLE_ALPINE_PRIVATE_NETWORKING": {
                      "isOptional": false,
                      "description": "Enable alpine private networking",
                      "defaultValue": "true"
                    },
                    "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS": {
                      "description": "Run manual executions from the editor on workers instead of the main instance.",
                      "defaultValue": "true"
                    },
                    "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS": {
                      "isOptional": false,
                      "description": "Require strict file permissions (0600) on n8n's settings file.",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                },
                "5b15d58e-c09b-4db0-a95b-44e67b593e93": {
                  "icon": "https://img.icons8.com/color/48/redis--v1.png",
                  "name": "Redis",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/bitnami"
                  },
                  "source": {
                    "image": "railwayapp/redis"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Private hostname of Redis on Railway's internal network.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Port Redis listens on.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis ACL username.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private Redis connection URL for other services in this project.",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "description": "Alias of REDIS_PASSWORD for clients that expect this name.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password, generated at deploy time.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "description": "Run the container as root (UID 0) so Redis can write to its volume.",
                      "defaultValue": "0"
                    },
                    "REDIS_PUBLIC_URL": {
                      "description": "Public Redis connection URL through Railway's TCP proxy, for access from outside Railway.",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6379": {}
                    }
                  },
                  "volumeMounts": {
                    "5b15d58e-c09b-4db0-a95b-44e67b593e93": {
                      "mountPath": "/bitnami"
                    }
                  }
                },
                "7526e5df-2e1e-4b4c-9d05-adc3e0f48850": {
                  "icon": "https://img.icons8.com/color/48/postgreesql.png",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": "/bin/sh -c \"unset PGPORT; docker-entrypoint.sh postgres --port=5432\"",
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Directory inside the volume where Postgres stores its data.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname of Postgres on Railway's internal network.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port Postgres listens on.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "description": "Postgres user (mirrors POSTGRES_USER) for psql and client libraries.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database name (mirrors POSTGRES_DB).",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "description": "Postgres password (mirrors POSTGRES_PASSWORD).",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Name of the database created on first start.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private Postgres connection URL for other services in this project.",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{PGHOST}}:${{PGPORT}}/${{{PSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first start.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity in days of the self-signed SSL certificate Postgres generates.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, generated at deploy time.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public Postgres connection URL through Railway's TCP proxy, for access from outside Railway.",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{POSTGRES_DB}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "description": "Seconds Railway waits for Postgres to shut down cleanly during a redeploy.",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    }
                  },
                  "volumeMounts": {
                    "7526e5df-2e1e-4b4c-9d05-adc3e0f48850": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "f494414c-6a03-4992-bf67-f2a1f2974984": {
                  "icon": "https://devicons.railway.app/i/n8n.svg",
                  "name": "Worker",
                  "build": {},
                  "deploy": {
                    "startCommand": "n8n worker",
                    "healthcheckPath": ""
                  },
                  "source": {
                    "image": "n8nio/n8n"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "The HTTP port the application responds to",
                      "defaultValue": "5678"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "Database type",
                      "defaultValue": "postgresdb"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "The memory limit for the task runner Node.js process",
                      "defaultValue": "--max_old_space_size=8192"
                    },
                    "EXECUTIONS_MODE": {
                      "isOptional": false,
                      "description": "Whether executions should run directly or using queue",
                      "defaultValue": "queue"
                    },
                    "N8N_WEBHOOK_URL": {
                      "description": "Used to manually provide the Webhook URL when running n8n behind a reverse proxy",
                      "defaultValue": "https://${{Primary.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "Database host",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_POSTGRESDB_PORT": {
                      "isOptional": false,
                      "description": "Database port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DB_POSTGRESDB_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Generates a secure random 32-character string",
                      "defaultValue": "${{Primary.N8N_ENCRYPTION_KEY}}"
                    },
                    "N8N_LISTEN_ADDRESS": {
                      "isOptional": false,
                      "description": "The IP address n8n should listen on",
                      "defaultValue": "::"
                    },
                    "QUEUE_BULL_REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis host",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "QUEUE_BULL_REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis port",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "DB_POSTGRESDB_DATABASE": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password",
                      "defaultValue": "${{Redis.REDIS_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_USERNAME": {
                      "isOptional": false,
                      "description": "Redis user",
                      "defaultValue": "${{Redis.REDISUSER}}"
                    },
                    "QUEUE_BULL_REDIS_DUALSTACK": {
                      "description": "Enable dual-stack support (IPv4 and IPv6) on Redis connections",
                      "defaultValue": "true"
                    },
                    "ENABLE_ALPINE_PRIVATE_NETWORKING": {
                      "isOptional": false,
                      "description": "Enable alpine private networking",
                      "defaultValue": "true"
                    },
                    "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS": {
                      "description": "Run manual executions from the editor on workers instead of the main instance.",
                      "defaultValue": "true"
                    },
                    "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS": {
                      "description": "Require strict file permissions (0600) on n8n's settings file.",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Primary",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-10-23T16:14:49.125Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-19T12:26:13.071Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_3b9a6a1349e5440cb979",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 170,
    "typical_build_seconds": 0,
    "typical_start_seconds": 30,
    "slowest_service": "Worker"
  }
}
