A production-ready n8n workflow automation platform configured for deployment on Convox.
n8n is a powerful workflow automation tool that allows you to connect various services and automate tasks without writing code. This example demonstrates how to deploy n8n on Convox with PostgreSQL database, email configuration, and secure webhook handling.
Deploy to Convox Cloud for a fully-managed platform experience, or to your own Convox Rack for complete control over your infrastructure. Either way, you'll get automatic SSL, load balancing, and zero-downtime deployments out of the box.
- Workflow Automation - Create powerful automation workflows with 400+ integrations
- Visual Editor - Design workflows with an intuitive drag-and-drop interface
- Webhook Support - Trigger workflows via webhooks with automatic SSL
- User Management - Built-in authentication and user management
- PostgreSQL Storage - Reliable data persistence with automatic backups
- Email Integration - SMTP configuration for notifications and user invites
- Health Monitoring - Built-in health checks for reliability
-
Create a Cloud Machine at console.convox.com
-
Create the app:
convox cloud apps create n8n -i your-machine-name- Set required configuration:
convox cloud env set N8N_HOST=n8n.yourdomain.com N8N_ENCRYPTION_KEY=$(openssl rand -hex 32) -a n8n -i your-machine-name- Deploy the app:
convox cloud deploy -a n8n -i your-machine-name- View your app:
convox cloud services -a n8n -i your-machine-name- (Recommended) Enable authentication:
convox cloud env set \
N8N_BASIC_AUTH_ACTIVE=true \
N8N_BASIC_AUTH_USER=admin \
N8N_BASIC_AUTH_PASSWORD=$(openssl rand -base64 12) \
-a n8n -i your-machine-nameVisit your URL to access the n8n editor!
- Create the app:
convox apps create n8n- Set required configuration:
convox env set N8N_HOST=n8n.yourdomain.com N8N_ENCRYPTION_KEY=$(openssl rand -hex 32) -a n8n- Deploy the app:
convox deploy -a n8n- View your app:
convox services -a n8n- (Recommended) Enable authentication:
convox env set \
N8N_BASIC_AUTH_ACTIVE=true \
N8N_BASIC_AUTH_USER=admin \
N8N_BASIC_AUTH_PASSWORD=$(openssl rand -base64 12) \
-a n8nVisit your URL to access the n8n editor!
These environment variables must be set before deployment:
| Variable | Description | Example |
|---|---|---|
N8N_HOST |
Your n8n instance domain | n8n.yourdomain.com |
N8N_ENCRYPTION_KEY |
32-character hex key for encrypting credentials | Generate with: openssl rand -hex 32 |
Secure your instance with authentication:
| Variable | Description | Default |
|---|---|---|
N8N_BASIC_AUTH_ACTIVE |
Enable basic authentication | false |
N8N_BASIC_AUTH_USER |
Username for basic auth | - |
N8N_BASIC_AUTH_PASSWORD |
Password for basic auth | - |
N8N_USER_MANAGEMENT_DISABLED |
Disable built-in user management | false |
To enable email features (user invites, password resets, notifications), set these after deployment:
convox env set \
N8N_SMTP_HOST=smtp.gmail.com \
N8N_SMTP_PORT=465 \
N8N_SMTP_SSL=true \
N8N_SMTP_USER=your-email@gmail.com \
N8N_SMTP_PASS=your-app-password \
N8N_SMTP_SENDER=your-email@gmail.com \
-a n8nIf you don't need email features, these can be left empty (default).
These settings are only needed for specific use cases:
| Variable | Description | Default |
|---|---|---|
N8N_WEBHOOK_TUNNEL_URL |
Webhook tunnel URL for development | - |
QUEUE_BULL_REDIS_HOST |
Redis host for queue mode | - |
QUEUE_BULL_REDIS_PORT |
Redis port for queue mode | - |
N8N_VERSION_CONTROL_ENABLED |
Enable version control features | false |
The default configuration uses a containerized PostgreSQL database that runs alongside n8n:
resources:
database:
type: postgres
options:
storage: 20
version: 14For production workloads, you can use AWS RDS for better durability:
resources:
database:
type: rds-postgres
options:
class: db.t3.micro
storage: 20
version: 14
encrypted: true
deletionProtection: trueTo use an existing database, set the DATABASE_URL:
convox env set DATABASE_URL=postgres://user:pass@host:5432/dbname -a n8nconvox cloud scale web --count 1 --cpu 500 --memory 1024 -a n8n -i your-machine-nameconvox scale web --count 1 --cpu 500 --memory 1024 -a n8nNote: n8n should typically run as a single instance unless you configure queue mode with Redis.
Cloud:
convox cloud logs -a n8n -i your-machine-nameRack:
convox logs -a n8ncurl https://your-n8n-url/healthz- Access n8n UI
- Go to Settings → Download
- Select workflows to export
- Save the JSON file
- Access n8n UI
- Go to Settings → Import
- Upload your JSON file
- Review and confirm import
Cloud:
convox cloud resources export database -a n8n -i your-machine-name -f n8n-backup.sqlRack:
convox resources export database -a n8n -f n8n-backup.sql- Always set N8N_ENCRYPTION_KEY - Required for encrypting stored credentials
- Enable authentication - Use basic auth or configure OAuth
- Use HTTPS - Convox automatically provides SSL certificates
- Secure webhooks - Use webhook authentication when possible
- Regular backups - Export workflows and database regularly
- Update regularly - Keep n8n updated for security patches
Check that all required environment variables are set:
convox env -a n8nVerify the database connection:
convox logs -a n8n --filter="database"Ensure the domain is configured:
convox services -a n8nCheck SSL certificate status:
convox certs -a n8nCheck execution logs in the n8n UI under "Executions"
For detailed logs:
convox logs -a n8n --since=1h- n8n Documentation
- n8n Environment Variables
- n8n Community
- Available Integrations
- Workflow Templates
- Convox Documentation
- n8n Community: community.n8n.io
- Convox Support: support@convox.com
- GitHub Issues: n8n GitHub