# n8n docker queue production

> Deploy and scale production n8n Queue Mode with PostgreSQL 17, Redis, and optimized reverse proxy configs.

n8n docker queue production is a paid AI agent skill on Agensi by Percio Andrade Castelo Branco, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $15 (one-time purchase)
- Creator: [Percio Andrade Castelo Branco](https://www.agensi.io/creators/sr00t3d)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.0
- Last updated: 2026-11-22
- Security: scan passed (2026-11-22); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/n8n-docker-queue-production
- Tags: n8n, docker-compose, queue-mode, postgresql, devops

## About this skill

Deploying n8n at scale often leads to SQLite locking, "Connection lost" proxy errors, and complex worker synchronization. This skill provides a production-hardened, panel-agnostic deployment strategy for n8n in Queue Mode on any Linux host.

### What it does
- **Multi-container orchestration** manages PostgreSQL 17, Redis 7, n8n coordinator, and scalable workers.
- **Security hardening** binds n8n to loopback only, uses non-root database roles, and isolates stateful services on internal bridge networks.
- **Horizontal scaling** handles concurrent workloads by deploying multiple `n8n-worker` replicas with proper health probes.
- **Automated maintenance** performs gzipped database backups, verified restores, and systemd service integration for boot persistence.
- **Reverse proxy optimization** provides tested Nginx and Caddy configurations specifically tuned for WebSocket and SSE streaming.

### How it works
1. **Preflight Audit** runs diagnostics on host RAM, disk, and port availability before any files are touched.
2. **Secrets Initialization** generates cryptographically random keys and passwords for the database, cache, and n8n encryption.
3. **Stack Deployment** executes the Docker Compose or Podman Compose lifecycle to spin up the hardened architecture.
4. **Proxy Configuration** adapts provided Nginx or Caddy templates to your FQDN and handles SSL termination.
5. **Health Verification** validates the Node.js /healthz probes and database extensions to ensure the stack is ready for traffic.

### Frameworks & tools
Docker Compose, Podman Compose, PostgreSQL 17, Redis 7, Nginx, Caddy, Node.js, and Bash.

### Why this beats prompting it yourself
Prompting often ignores the specific WebSocket timeout requirements for n8n or misses the critical `pgcrypto` extensions required for n8n credentials. This skill uses a specialized lifecycle script that prevents accidental encryption key rotation, which would otherwise permanently break access to your stored credentials.

### Use cases
- Migrating a growing n8n instance from SQLite to a scalable PostgreSQL 17 Queue Mode stack.
- Fixing persistent "Connection lost" UI errors by applying optimized reverse proxy headers.
- Implementing a reliable backup and update pipeline for self-hosted automation infrastructure.
- Deploying a multi-worker environment to handle high-volume webhook traffic without stalling the UI.

### Known limitations
Requires a Linux host with a minimum of 2 GB RAM. It does not provide built-in SSL issuance, as it assumes an external reverse proxy or tunnel terminates HTTPS.

## Requires

- Runs on Linux only
- Docker Compose V2 or Podman Compose
- Bash
- openssl
- ss
- curl
- gzip
- Domain pointing to server IP (for HTTPS)
- Optional: Nginx 1.25+ with Certbot or Caddy
- Optional: sudo access (for systemd auto-start)
- Optional: SMTP server credentials (for email invites/alerts)

Recommended: 2 GB+ RAM (4 GB+ for 2+ workers) and 10 GB+ free disk. Runs read-only preflight checks and --dry-run previews first; never overwrites existing .env files or deletes Docker volumes without explicit confirmation.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the n8n docker queue production skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this 'Queue Mode' deployment differ from a standard n8n Docker install?

This skill transitions your n8n setup from a single-process SQLite instance to a robust 'Queue Mode' architecture, solving database locking issues, UI 'Connection lost' errors, and allowing you to handle thousands of concurrent workflows across multiple workers.

### What specific assets are included in this skill purchase?

The skill includes a complete set of production-hardened Docker/Podman Compose files, optimized PostgreSQL 17 and Redis configurations, Nginx/Caddy proxy templates, and a specialized lifecycle script for secure deployment and automated backups.

### Can I use this on any VPS or Linux server, or is it tied to a specific provider?

Yes, the deployment is panel-agnostic and works on any Linux distribution (Ubuntu, Debian, CentOS, etc.) that supports Docker or Podman, provided the host has at least 2 GB of RAM.

### How does this skill handle n8n version updates and credential safety?

The provided lifecycle script includes a safety mechanism that protects your unique encryption keys during updates, ensuring you don't lose access to your stored credentials when upgrading n8n versions.

### Is this deployment compatible with LangChain or other AI agent frameworks?

While this skill focuses on the backend infrastructure, the resulting n8n instance is fully compatible with any AI agent or framework that connects via webhooks or the n8n REST API.

### Does this skill automatically manage my SSL/TLS certificates?

The skill handles the internal networking and proxy headers for WebSockets, but it assumes you will use an external tool like Certbot, Cloudflare, or a Load Balancer to terminate the actual HTTPS connection.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
