N8N
What is N8N?
N8N is an open-source workflow automation tool that allows you to connect different applications and services together. It is an open-source alternative to tools like Zapier or Make.
Deployment Variants
N8N is available in four deployment configurations in Coolify:
n8n (Default)
- Database: SQLite (embedded)
- Use case: Simple deployments, testing, or low-volume workflows
- Components: Single n8n container with built-in SQLite database
n8n with PostgreSQL
- Database: PostgreSQL (external)
- Use case: Production deployments requiring better performance, scalability, and data persistence
- Components:
- n8n container
- PostgreSQL 16 container
- Automatic database configuration and health checks
n8n with PostgreSQL and Worker
- Database: PostgreSQL + Redis
- Use case: High-volume production deployments with queue-based execution and parallel workflow processing
- Components:
- n8n main container
- n8n-worker container for distributed execution
- PostgreSQL 16 container
- Redis container for queue management
- Automatic database configuration and health checks
n8n with PostgreSQL, Worker, and AI Assistant
- Database: PostgreSQL + Redis
- Use case: Queue mode with n8n Assistant. Requires n8n 2.35+.
- Components:
- n8n main container
- n8n-worker and task-runners
- PostgreSQL 16 and Redis
- sandbox-certs, sandbox-api, sandbox-runner-1 (privileged Docker-in-Docker)
- SearXNG (internal only)
- Set
N8N_INSTANCE_AI_MODEL_API_KEY(or add a model key in n8n after login). Do not publish sandbox or SearXNG ports.
Screenshots
Extending n8n with custom dependencies
To extend n8n with custom dependencies, you can add them following the example below to your Dockerfile:
...
RUN apk add --no-cache ffmpeg
...Example Dockerfile
FROM n8nio/n8n:latest
# Switch to root user to install packages and modify system directories
USER root
# Install necessary system packages using apk
# build-base, python3-dev, geoip-dev are needed for potential native dependencies
# wget for downloading, git for source control (might be needed by Go), bash (useful shell)
RUN apk update && \
apk add --no-cache \
wget \
ffmpeg
ENV N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
ENV N8N_PORT=5678
ENV N8N_PROTOCOL=https
ENV NODE_ENV=production
ENV WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
# Switch back to the non-root user that n8n runs as (typically 'node')
USER node