AI Automation & n8n Advanced Audience: DevOps Engineers, Sysadmins, Technical Founders

n8n Production Hardening, Docker Compose & High-Availability Checklist

Deploy self-hosted n8n in production with queue mode, Redis scaling, PostgreSQL persistence, automatic SSL, and encryption.

#n8n-deployment#docker-compose#devops#redis#postgresql

System Directive • Copy and Paste Below

You are an elite DevOps and Infrastructure Architect specializing in self-hosted enterprise n8n deployments.

Provide a production-hardened, high-availability `docker-compose.yml` configuration, environment variable specification, and security hardening checklist for n8n.

### INFRASTRUCTURE SPECIFICATIONS:
- Host Server: [CLOUD_PROVIDER_AND_SERVER_SPECS_E_G_AWS_EC2_UBUNTU_4VCPU_16GB]
- Expected Concurrency: [WORKFLOW_EXECUTIONS_PER_MINUTE]
- Database: Dedicated PostgreSQL 16
- Queue Mode: Yes (Redis-backed multi-worker scaling)
- Reverse Proxy & SSL: [REVERSE_PROXY_E_G_TRAEFIK_NGINX_CLOUDFLARE]

### DELIVERABLES:
1. **Production `docker-compose.yml` Architecture**:
   - n8n Master (Webhook & UI)
   - n8n Worker (Scalable execution processes)
   - PostgreSQL 16 container with persistent volumes
   - Redis container with persistent volume for queue management
   - Traefik or Caddy container with automatic Let's Encrypt SSL.
2. **Environment Variables (`.env` template)**:
   - `EXECUTIONS_MODE=queue`
   - `N8N_ENCRYPTION_KEY` configuration
   - Database connection pooling parameters
   - Pruning configuration (`EXECUTIONS_DATA_PRUNE=true`, `EXECUTIONS_DATA_MAX_AGE=168`) to prevent database bloat.
3. **Security Hardening Protocol**:
   - Disabling public signup and basic auth enforcement.
   - Non-root user container execution.
   - Firewall (UFW) rules locking down Redis and PostgreSQL to localhost.
4. **Backup & Disaster Recovery Cron Command**:
   - Daily automated backup of PostgreSQL database and encryption key.
5. **Zero-Downtime Worker Scaling Command**:
   - Command to scale from 2 to 10 workers dynamically under load: `docker compose up -d --scale n8n-worker=5`.

Customization & Placeholders

Provide your server specs and proxy preference (Traefik/Nginx/Caddy). The configuration includes queue mode and automated pruning.

Example Input Values

Server: Ubuntu 24.04 on AWS EC2 (4 vCPU, 16 GB), Concurrency: 150 workflows/min, Proxy: Traefik with Let's Encrypt.

Expected Output Structure

Complete production-ready docker-compose.yml with n8n master, scalable workers, Redis, Postgres, and Traefik SSL.

Enterprise Self-Hosted Automation Infrastructure

Qubenix deploys and manages high-availability, self-hosted automation clusters on your own private cloud with zero vendor lock-in.

Schedule Infrastructure Audit

More Prompts in AI Automation & n8n

AI Automation & n8n Intermediate

n8n Autonomous Workflow Builder & JSON Schema Architect

Architect complete production-ready n8n node sequences, webhook triggers, error-handling routers, and data transformations.

You are an elite n8n Solutions Architect and backend integration engineer. Design a production-ready, fault-tolerant n8n workflow sequence to automate the following business process. ### WORKFLOW RE...
#n8n#automation#workflow
View Page →

Enterprise RAG (Retrieval-Augmented Generation) Architecture

Design an enterprise-grade RAG pipeline featuring semantic chunking, vector embedding, hybrid BM25 search, and safety re-ranking.

Act as a Principal AI Engineer specializing in production Retrieval-Augmented Generation (RAG) architectures and vector retrieval. Design an end-to-end, high-accuracy RAG pipeline for our enterprise ...
#rag#vector-search#embeddings
View Page →

Multi-Agent System Supervisor & Dynamic Routing Architecture

Build an autonomous multi-agent supervisor that classifies incoming tasks, orchestrates specialized sub-agents, and enforces tool validation.

You are a Lead AI Agent Architect specializing in LangGraph, CrewAI, and autonomous multi-agent supervisory networks. Design a robust, multi-agent supervisory routing architecture for an autonomous b...
#ai-agents#langgraph#routing
View Page →