n8n Self-Hosted Automation: Webhooks, Code Nodes, and Production Workflow Patterns
n8n is the automation platform that developers actually want to use. Self-hostable, open-source, with a visual editor and full code access. Here's how to build production workflows that handle real...

Source: DEV Community
n8n is the automation platform that developers actually want to use. Self-hostable, open-source, with a visual editor and full code access. Here's how to build production workflows that handle real business logic. Why n8n Over Zapier Self-hosted: Your data never leaves your infrastructure Code nodes: Write real JavaScript/Python when visual nodes aren't enough Free tier: No per-task pricing — unlimited executions on self-hosted API-first: Every workflow is a REST endpoint Version control: Export workflows as JSON, commit to git Self-Hosting with Docker # docker-compose.yml version: '3.8' services: n8n: image: docker.n8n.io/n8nio/n8n restart: always ports: - '5678:5678' environment: - N8N_BASIC_AUTH_ACTIVE=true - N8N_BASIC_AUTH_USER=admin - N8N_BASIC_AUTH_PASSWORD=${N8N_PASSWORD} - N8N_HOST=${DOMAIN} - N8N_PROTOCOL=https - WEBHOOK_URL=https://${DOMAIN}/ - DB_TYPE=postgresdb - DB_POSTGRESDB_HOST=db - DB_POSTGRESDB_DATABASE=n8n - DB_POSTGRESDB_USER=n8n - DB_POSTGRESDB_PASSWORD=${DB_PASSWO