SSL/HTTPS Without Docker

I’ve configured past installs of n8n quite easily using docker and enabled SSL via LetsEncrypt, but this time I’ve decided to install n8n globally via npm on a Vultr VPS. Can someone please provide some guidance on getting SSL setup with LetsEnrypt without using docker? I am aware of this guide on Vultr but don’t know if n8n uses Apache or Nginx.

Thank you.
:sunglasses:

Disregard, I’ve got this working. I will try to compile the steps so someone else can benefit.

1 Like

Here are the steps I followed to get SSL setup on n8n without Docker. I linked each step to the resource I used.

  1. Created an A record (n8n.mydomain.com) with domain registrar pointed to my VPS IP
  2. Installed nginx
  3. Installed certbot
  4. Requested certificate using certbot for URL: n8n.mydomain.com using sudo certbot --nginx -d n8n.mydomain.com
  5. Scheduled cron job for certbot auto renewal (instructions linked in Step 3 above)
  6. Created UFW firewall rule for port 8443: sudo ufw allow 8443/tcp
  7. Updated N8N environment variables in /root/.bashrc for new config:
export N8N_HOST="n8n.mydomain.com"
export N8N_PROTOCOL="https"
export N8N_PORT=8443
export VUE_APP_URL_BASE_API="https://n8n.mydomain.com/"
export WEBHOOK_TUNNEL_URL="https://n8n.mydomain.com:8443/"
export N8N_SSL_KEY=/etc/letsencrypt/live/n8n.mydomain.com/privkey.pem
export N8N_SSL_CERT=/etc/letsencrypt/live/n8n.mydomain.com/cert.pem
1 Like

Great stuff, thanks so much for sharing!

1 Like