This script will install n8n and proxy it with nginx. It supports SSL via certbot and via cloudflare. If you're are using cloudflare, please follow the checklist below to setup the SSL/TLS settings.
A blog post about this can be found here
- A server running Ubuntu 22.04 or above
This will install n8n and proxy it with nginx. It supports SSL via certbot and via cloudflare. If you're are using cloudflare, please follow the checklist below to setup the SSL/TLS settings.
- Go to SSL/TLS tab
- Set SSL/TLS encryption mode to "Full (Strict)"
- Set Minimum TLS Version to 1.2
- Enable TLS 1.3
- Navigate to SSL/TLS > Origin Server
- Click "Create Certificate"
- Select RSA as private key type
- Set certificate validity to 15 years
- Save both Origin Certificate and Private Key
- Verify A record points to your server IP
- Ensure orange cloud is enabled (proxied)
- Enable Automatic HTTPS Rewrites
- Enable Opportunistic Encryption
When the script prompts for certificate files:
- Paste the Origin Certificate when requested
- Paste the Private Key when requested
Copy the script to your server and make it executable.
chmod +x install-n8n.shRun the script.
./install-n8n.sh