{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e36cc2f4-dd1e-4aae-aa9f-a9bccda7d1ac",
    "slug": "n8n-queue",
    "name": "n8n-queue",
    "description": "n8n in production queue mode: scaled workers, webhook processor, pgvector",
    "url": "https://railway.com/deploy/n8n-queue",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/n8n-queue-railway"
    }
  },
  "services": [
    {
      "name": "main",
      "source": {
        "repo": "https://github.com/nomideusz/n8n-queue-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/node/.n8n",
      "http": true
    },
    {
      "name": "redis",
      "source": {
        "repo": "https://github.com/nomideusz/n8n-queue-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "postgres",
      "source": {
        "repo": "https://github.com/nomideusz/n8n-queue-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "worker",
      "source": {
        "repo": "https://github.com/nomideusz/n8n-queue-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "webhook",
      "source": {
        "repo": "https://github.com/nomideusz/n8n-queue-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "main",
      "description": "n8n's listen port. Must stay 5678 — Railway would otherwise inject 8080 and break routing.",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "N8N_HOST",
      "service": "main",
      "description": "Public hostname of this n8n instance. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "WEBHOOK_URL",
      "service": "main",
      "description": "Public URL used for production webhooks — points at the dedicated webhook service so webhooks survive editor redeploys.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "main",
      "description": "Runs the container as root so n8n can write its volume. Required — without it n8n crash-loops on EACCES.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "main",
      "description": "Postgres private hostname. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "main",
      "description": "Encrypts credentials stored by n8n. Must be identical on every n8n service; losing it orphans saved credentials.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "N8N_EDITOR_BASE_URL",
      "service": "main",
      "description": "Public URL of the n8n editor. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "QUEUE_BULL_REDIS_HOST",
      "service": "main",
      "description": "Redis private hostname for the Bull queue. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "main",
      "description": "Postgres password, shared from the postgres service. Wired automatically — don't change.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PASSWORD",
      "service": "main",
      "description": "Redis password for the Bull queue. Wired automatically — don't change.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis",
      "description": "Auto-generated Redis password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Auto-generated database password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "worker",
      "description": "Health-endpoint port for Railway's healthcheck. Must stay 5678.",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "worker",
      "description": "Postgres private hostname. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "worker",
      "description": "Encrypts credentials stored by n8n. Must be identical on every n8n service; losing it orphans saved credentials.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_HOST",
      "service": "worker",
      "description": "Redis private hostname for the Bull queue. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "worker",
      "description": "Postgres password, shared from the postgres service. Wired automatically — don't change.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PASSWORD",
      "service": "worker",
      "description": "Redis password for the Bull queue. Wired automatically — don't change.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "webhook",
      "description": "n8n's listen port. Must stay 5678.",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "WEBHOOK_URL",
      "service": "webhook",
      "description": "This service's own public URL. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "webhook",
      "description": "Postgres private hostname. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "webhook",
      "description": "Encrypts credentials stored by n8n. Must be identical on every n8n service; losing it orphans saved credentials.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_HOST",
      "service": "webhook",
      "description": "Redis private hostname for the Bull queue. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "webhook",
      "description": "Postgres password, shared from the postgres service. Wired automatically — don't change.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PASSWORD",
      "service": "webhook",
      "description": "Redis password for the Bull queue. Wired automatically — don't change.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "n8n-queue"
      }
    },
    "cli": "railway deploy --template n8n-queue",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e36cc2f4-dd1e-4aae-aa9f-a9bccda7d1ac",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3400f851-bd11-4499-a73a-20a3a951a265": {
                  "icon": "https://devicons.railway.app/i/n8n.svg",
                  "name": "main",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/n8n-queue-railway",
                    "rootDirectory": "/main"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "n8n's listen port. Must stay 5678 — Railway would otherwise inject 8080 and break routing.",
                      "defaultValue": "5678"
                    },
                    "N8N_HOST": {
                      "isOptional": false,
                      "description": "Public hostname of this n8n instance. Wired automatically — don't change.",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "WEBHOOK_URL": {
                      "isOptional": false,
                      "description": "Public URL used for production webhooks — points at the dedicated webhook service so webhooks survive editor redeploys.",
                      "defaultValue": "https://${{webhook.RAILWAY_PUBLIC_DOMAIN}}/"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Runs the container as root so n8n can write its volume. Required — without it n8n crash-loops on EACCES.",
                      "defaultValue": "0"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "Postgres private hostname. Wired automatically — don't change.",
                      "defaultValue": "${{postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts credentials stored by n8n. Must be identical on every n8n service; losing it orphans saved credentials.",
                      "defaultValue": "{{N8N_ENCRYPTION_KEY}}"
                    },
                    "N8N_EDITOR_BASE_URL": {
                      "isOptional": false,
                      "description": "Public URL of the n8n editor. Wired automatically — don't change.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "QUEUE_BULL_REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis private hostname for the Bull queue. Wired automatically — don't change.",
                      "defaultValue": "${{redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password, shared from the postgres service. Wired automatically — don't change.",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password for the Bull queue. Wired automatically — don't change.",
                      "defaultValue": "${{redis.REDIS_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "3400f851-bd11-4499-a73a-20a3a951a265": {
                      "mountPath": "/home/node/.n8n"
                    }
                  }
                },
                "82b68d29-a6d5-4ba3-ad3f-7475a739d0d2": {
                  "icon": "https://devicons.railway.app/i/redis.svg",
                  "name": "redis",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/n8n-queue-railway",
                    "rootDirectory": "/redis"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated Redis password.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "82b68d29-a6d5-4ba3-ad3f-7475a739d0d2": {
                      "mountPath": "/data"
                    }
                  }
                },
                "ae47848c-0000-4c9c-ba9a-fb017a20b9f6": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/n8n-queue-railway",
                    "rootDirectory": "/postgres"
                  },
                  "variables": {
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "ae47848c-0000-4c9c-ba9a-fb017a20b9f6": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "b778828d-9107-4c89-b6f5-ef9acd4bf5c4": {
                  "icon": "https://devicons.railway.app/i/n8n.svg",
                  "name": "worker",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/n8n-queue-railway",
                    "rootDirectory": "/worker"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Health-endpoint port for Railway's healthcheck. Must stay 5678.",
                      "defaultValue": "5678"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "Postgres private hostname. Wired automatically — don't change.",
                      "defaultValue": "${{postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts credentials stored by n8n. Must be identical on every n8n service; losing it orphans saved credentials.",
                      "defaultValue": "${{main.N8N_ENCRYPTION_KEY}}"
                    },
                    "QUEUE_BULL_REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis private hostname for the Bull queue. Wired automatically — don't change.",
                      "defaultValue": "${{redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password, shared from the postgres service. Wired automatically — don't change.",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password for the Bull queue. Wired automatically — don't change.",
                      "defaultValue": "${{redis.REDIS_PASSWORD}}"
                    }
                  }
                },
                "f7f8b2eb-0da4-48c7-ad3d-9b947d01b1e7": {
                  "icon": "https://devicons.railway.app/i/n8n.svg",
                  "name": "webhook",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/n8n-queue-railway",
                    "rootDirectory": "/webhook"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "n8n's listen port. Must stay 5678.",
                      "defaultValue": "5678"
                    },
                    "WEBHOOK_URL": {
                      "isOptional": false,
                      "description": "This service's own public URL. Wired automatically — don't change.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "Postgres private hostname. Wired automatically — don't change.",
                      "defaultValue": "${{postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts credentials stored by n8n. Must be identical on every n8n service; losing it orphans saved credentials.",
                      "defaultValue": "${{main.N8N_ENCRYPTION_KEY}}"
                    },
                    "QUEUE_BULL_REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis private hostname for the Bull queue. Wired automatically — don't change.",
                      "defaultValue": "${{redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password, shared from the postgres service. Wired automatically — don't change.",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password for the Bull queue. Wired automatically — don't change.",
                      "defaultValue": "${{redis.REDIS_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "main",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T10:14:47.278Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T07:26:37.374Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_91f05d69f659436eb517",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 176,
    "typical_build_seconds": 31,
    "typical_start_seconds": 32,
    "slowest_service": "worker"
  }
}
