1. Prerequisites
You'll need a server (VPS, cloud instance, or local machine) with Docker installed. A domain name is recommended for HTTPS. Minimum specs: 1 vCPU, 1GB RAM, 10GB storage.
2. Docker Deployment
The simplest deployment uses Docker Compose. Create a docker-compose.yml file with n8n and a database (SQLite for small deployments, PostgreSQL for production).
version: "3"
services:
n8n:
image: n8nio/n8n
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=secure-password
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:3. Securing Your Instance
Set up HTTPS using a reverse proxy like Nginx or Traefik. Enable basic auth or configure OAuth. Regularly backup your data volume and keep n8n updated.
Wrap-up
You now have your own private automation server. Self-hosting requires maintenance but gives you complete control over your data and unlimited executions.