{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c42fec74-427e-48aa-a9cf-6d74cfc368ad",
    "slug": "n8n-queue-mode-workers",
    "name": "n8n Queue Mode with Workers — Self-Hosted Scaling",
    "description": "Self-hosted n8n in queue mode — workers, webhooks & Redis. Scales fast.",
    "url": "https://railway.com/deploy/n8n-queue-mode-workers",
    "upstream": {
      "image": "n8nio/n8n:2.20.9"
    }
  },
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "tcp_ports": [
        6379
      ],
      "http": false
    },
    {
      "name": "main",
      "source": {
        "image": "n8nio/n8n:2.20.9"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "worker",
      "source": {
        "image": "n8nio/n8n:2.20.9"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Provide a value for REDISHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Provide a value for REDISPORT.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Provide a value for REDISUSER.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis using the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Provide a value for REDISPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Provide a value for REDIS_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis externally",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "main",
      "description": "Port on which the n8n service listens (typically 5678).",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "DB_TYPE",
      "service": "main",
      "description": "Provide a value for DB_TYPE.",
      "secret": false,
      "strategy": "default",
      "default": "postgresdb"
    },
    {
      "key": "N8N_PORT",
      "service": "main",
      "description": "Provide a value for N8N_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "WEBHOOK_URL",
      "service": "main",
      "description": "Provide a value for WEBHOOK_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "main",
      "description": "Provide a value for NODE_OPTIONS.",
      "secret": false,
      "strategy": "default",
      "default": "--max_old_space_size=8192"
    },
    {
      "key": "EXECUTIONS_MODE",
      "service": "main",
      "description": "Provide a value for EXECUTIONS_MODE.",
      "secret": false,
      "strategy": "default",
      "default": "queue"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "main",
      "description": "Provide a value for DB_POSTGRESDB_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PORT",
      "service": "main",
      "description": "Provide a value for DB_POSTGRESDB_PORT.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_USER",
      "service": "main",
      "description": "Provide a value for DB_POSTGRESDB_USER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "main",
      "description": "Provide a value for N8N_ENCRYPTION_KEY.",
      "secret": true,
      "strategy": "default",
      "default": "{{ secret(32, \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") }}"
    },
    {
      "key": "N8N_LISTEN_ADDRESS",
      "service": "main",
      "description": "Provide a value for N8N_LISTEN_ADDRESS.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "N8N_EDITOR_BASE_URL",
      "service": "main",
      "description": "Provide a value for N8N_EDITOR_BASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "N8N_RUNNERS_ENABLED",
      "service": "main",
      "description": "Provide a value for N8N_RUNNERS_ENABLED.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "EXECUTIONS_DATA_PRUNE",
      "service": "main",
      "description": "Provide a value for EXECUTIONS_DATA_PRUNE.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "QUEUE_BULL_REDIS_HOST",
      "service": "main",
      "description": "Provide a value for QUEUE_BULL_REDIS_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PORT",
      "service": "main",
      "description": "Provide a value for QUEUE_BULL_REDIS_PORT.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_DATABASE",
      "service": "main",
      "description": "Provide a value for DB_POSTGRESDB_DATABASE.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "main",
      "description": "Provide a value for DB_POSTGRESDB_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PASSWORD",
      "service": "main",
      "description": "Provide a value for QUEUE_BULL_REDIS_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_USERNAME",
      "service": "main",
      "description": "Provide a value for QUEUE_BULL_REDIS_USERNAME.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_DUALSTACK",
      "service": "main",
      "description": "Provide a value for QUEUE_BULL_REDIS_DUALSTACK.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "N8N_DEFAULT_BINARY_DATA_MODE",
      "service": "main",
      "description": "Provide a value for N8N_DEFAULT_BINARY_DATA_MODE.",
      "secret": false,
      "strategy": "default",
      "default": "filesystem"
    },
    {
      "key": "EXECUTIONS_DATA_PRUNE_MAX_COUNT",
      "service": "main",
      "description": "Provide a value for EXECUTIONS_DATA_PRUNE_MAX_COUNT.",
      "secret": false,
      "strategy": "default",
      "default": "100"
    },
    {
      "key": "ENABLE_ALPINE_PRIVATE_NETWORKING",
      "service": "main",
      "description": "Provide a value for ENABLE_ALPINE_PRIVATE_NETWORKING.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS",
      "service": "main",
      "description": "Provide a value for OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS",
      "service": "main",
      "description": "Provide a value for N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "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": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "worker",
      "description": "Port on which the n8n service listens (typically 5678).",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "DB_TYPE",
      "service": "worker",
      "description": "Specifies the type of database used by n8n — here it’s postgresdb.",
      "secret": false,
      "strategy": "default",
      "default": "postgresdb"
    },
    {
      "key": "WEBHOOK_URL",
      "service": "worker",
      "description": "Public URL endpoint for receiving external webhook triggers through Railway’s public domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "worker",
      "description": "Configures Node.js memory usage.",
      "secret": false,
      "strategy": "default",
      "default": "--max_old_space_size=8192"
    },
    {
      "key": "EXECUTIONS_MODE",
      "service": "worker",
      "description": "Determines how workflows are processed. queue enables distributed execution using Redis.",
      "secret": false,
      "strategy": "default",
      "default": "queue"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "worker",
      "description": "Host address of the PostgreSQL database connected to n8n.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PORT",
      "service": "worker",
      "description": "Port number where PostgreSQL is running — usually 5432.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_USER",
      "service": "worker",
      "description": "Username used by n8n to authenticate with PostgreSQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "worker",
      "description": "Secret key used to encrypt sensitive credentials stored in the n8n database.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "N8N_LISTEN_ADDRESS",
      "service": "worker",
      "description": "Defines which network interfaces n8n binds to — :: allows both IPv4 and IPv6.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "N8N_RUNNERS_ENABLED",
      "service": "worker",
      "description": "Enables “Runners,” allowing distributed workflow execution across multiple worker nodes.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "QUEUE_BULL_REDIS_HOST",
      "service": "worker",
      "description": "Redis host address used by n8n for managing job queues in queue mode.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PORT",
      "service": "worker",
      "description": "Redis port number — typically 6379.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_DATABASE",
      "service": "worker",
      "description": "The name of the PostgreSQL database that stores n8n’s workflow and execution data.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "worker",
      "description": "Password for authenticating the PostgreSQL connection.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PASSWORD",
      "service": "worker",
      "description": "Password used to connect securely to Redis.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_USERNAME",
      "service": "worker",
      "description": "Username used for authenticating Redis connections (if required).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_DUALSTACK",
      "service": "worker",
      "description": "Enables dual IPv4 and IPv6 support for Redis connections.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENABLE_ALPINE_PRIVATE_NETWORKING",
      "service": "worker",
      "description": "Enables private networking between services on Railway’s infrastructure for secure internal communication.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS",
      "service": "worker",
      "description": "Runs manual (UI-triggered) executions on worker nodes instead of the main instance to improve performance.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS",
      "service": "worker",
      "description": "Ensures configuration files have strict permissions for improved security in production environments.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "n8n-queue-mode-workers"
      }
    },
    "cli": "railway deploy --template n8n-queue-mode-workers",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c42fec74-427e-48aa-a9cf-6d74cfc368ad",
            "serializedConfig": {
              "services": {
                "633de2c9-d66b-4000-8b67-b20242c3ca97": {
                  "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\""
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Connection string for connecting to redis using the private network",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "description": "Connection string for connecting to redis externally",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_TCP_PROXY_DOMAIN }}:${{ RAILWAY_TCP_PROXY_PORT }}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6379": {}
                    }
                  },
                  "volumeMounts": {
                    "633de2c9-d66b-4000-8b67-b20242c3ca97": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "73902cbd-b5de-421d-9602-c4b930b07485": {
                  "name": "main",
                  "source": {
                    "image": "n8nio/n8n:2.20.9"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port on which the n8n service listens (typically 5678).",
                      "defaultValue": "5678"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgresdb"
                    },
                    "N8N_PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "5678"
                    },
                    "WEBHOOK_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "--max_old_space_size=8192"
                    },
                    "EXECUTIONS_MODE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "queue"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_POSTGRESDB_PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DB_POSTGRESDB_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{ secret(32, \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") }}"
                    },
                    "N8N_LISTEN_ADDRESS": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "::"
                    },
                    "N8N_EDITOR_BASE_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "N8N_RUNNERS_ENABLED": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    },
                    "EXECUTIONS_DATA_PRUNE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    },
                    "QUEUE_BULL_REDIS_HOST": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "QUEUE_BULL_REDIS_PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "DB_POSTGRESDB_DATABASE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Redis.REDIS_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_USERNAME": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Redis.REDISUSER}}"
                    },
                    "QUEUE_BULL_REDIS_DUALSTACK": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    },
                    "N8N_DEFAULT_BINARY_DATA_MODE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "filesystem"
                    },
                    "EXECUTIONS_DATA_PRUNE_MAX_COUNT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "100"
                    },
                    "ENABLE_ALPINE_PRIVATE_NETWORKING": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    },
                    "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    },
                    "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:5678": {
                        "port": 5678
                      }
                    }
                  },
                  "volumeMounts": {
                    "73902cbd-b5de-421d-9602-c4b930b07485": {
                      "mountPath": "/data"
                    }
                  }
                },
                "87ac7160-5598-41c9-bf0d-026c0e66fc00": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "87ac7160-5598-41c9-bf0d-026c0e66fc00": {
                      "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."
                  }
                },
                "ff39e1ee-a23f-4b2c-987a-bcd4d455befb": {
                  "name": "worker",
                  "source": {
                    "image": "n8nio/n8n:2.20.9"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port on which the n8n service listens (typically 5678).",
                      "defaultValue": "5678"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "Specifies the type of database used by n8n — here it’s postgresdb.",
                      "defaultValue": "postgresdb"
                    },
                    "WEBHOOK_URL": {
                      "isOptional": false,
                      "description": "Public URL endpoint for receiving external webhook triggers through Railway’s public domain.",
                      "defaultValue": "https://${{main.RAILWAY_PUBLIC_DOMAIN}"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Configures Node.js memory usage.",
                      "defaultValue": "--max_old_space_size=8192"
                    },
                    "EXECUTIONS_MODE": {
                      "isOptional": false,
                      "description": "Determines how workflows are processed. queue enables distributed execution using Redis.",
                      "defaultValue": "queue"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "Host address of the PostgreSQL database connected to n8n.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_POSTGRESDB_PORT": {
                      "isOptional": false,
                      "description": "Port number where PostgreSQL is running — usually 5432.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DB_POSTGRESDB_USER": {
                      "isOptional": false,
                      "description": "Username used by n8n to authenticate with PostgreSQL.",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Secret key used to encrypt sensitive credentials stored in the n8n database.",
                      "defaultValue": "${{main.N8N_ENCRYPTION_KEY}}"
                    },
                    "N8N_LISTEN_ADDRESS": {
                      "isOptional": false,
                      "description": "Defines which network interfaces n8n binds to — :: allows both IPv4 and IPv6.",
                      "defaultValue": "::"
                    },
                    "N8N_RUNNERS_ENABLED": {
                      "isOptional": false,
                      "description": "Enables “Runners,” allowing distributed workflow execution across multiple worker nodes.",
                      "defaultValue": "true"
                    },
                    "QUEUE_BULL_REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis host address used by n8n for managing job queues in queue mode.",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "QUEUE_BULL_REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis port number — typically 6379.",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "DB_POSTGRESDB_DATABASE": {
                      "isOptional": false,
                      "description": "The name of the PostgreSQL database that stores n8n’s workflow and execution data.",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for authenticating the PostgreSQL connection.",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password used to connect securely to Redis.",
                      "defaultValue": "${{Redis.REDIS_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_USERNAME": {
                      "isOptional": false,
                      "description": "Username used for authenticating Redis connections (if required).",
                      "defaultValue": "${{Redis.REDISUSER}}"
                    },
                    "QUEUE_BULL_REDIS_DUALSTACK": {
                      "isOptional": false,
                      "description": "Enables dual IPv4 and IPv6 support for Redis connections.",
                      "defaultValue": "true"
                    },
                    "ENABLE_ALPINE_PRIVATE_NETWORKING": {
                      "isOptional": false,
                      "description": "Enables private networking between services on Railway’s infrastructure for secure internal communication.",
                      "defaultValue": "true"
                    },
                    "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS": {
                      "isOptional": false,
                      "description": "Runs manual (UI-triggered) executions on worker nodes instead of the main instance to improve performance.",
                      "defaultValue": "true"
                    },
                    "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS": {
                      "isOptional": false,
                      "description": "Ensures configuration files have strict permissions for improved security in production environments.",
                      "defaultValue": "true"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-17T04:14:44.001Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-15T18:55:46.887Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_876d722a51914272bb48",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 143,
    "typical_build_seconds": 0,
    "typical_start_seconds": 21,
    "slowest_service": "worker"
  }
}
