Getting n8n t work via HTTPS

Describe the problem/error/question

I have created a Prxmox LXC container running Ubuntu 22.04
Followed this guide: How to set up n8n via PM2 – n8n Blog to set up n8n
I have a DNS record on Cloudflare pointing to my nginx proxy and a valid cert created (just like my other 6 services which work fine)

Below is a redacted version of my environment variables file:

module.exports = {
apps : [{
name : “n8n”,
env: {
N8N_BASIC_AUTH_ACTIVE:true,
N8N_BASIC_AUTH_USER:“USERNAME (redacted)”,
N8N_BASIC_AUTH_PASSWORD:“PASSWORD (redacted)”,
N8N_PROTOCOL: “https”,
N8N_PORT=443,
WEBHOOK_TUNNEL_URL: “https://SUBDOMAIN.MYDOMAIN.COM (redacted)”,
N8N_HOST: “SUBDOMAIN.MYDOMAIN.COM (redacted)”,
}
}]
}

I then launch n8n using the command:

pm2 start ecosystem.config.js

n8n says it is running

What is the error message (if any)?

When I try browse to the URL I get the following:

If I do not enable https everthing works fine on http://IPADDRESS:5678 but I want to expose this to the internet to be accessible remotely and to allow webhooks to work. Ive scoured the internet for docs/guides/videos but cannot seem to find what I am doing wrong.

Feel free to throw shade for being a n00b, but only if it comes with helpful advice afterwards :slight_smile: TIA

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

UPDATE

I found the issue eventually!

When setting up nginx you must leave the scheme type as http and not set it to https, even though you are forcing SSL.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.