How to enable https protocol for n8n started on premise?

240 Views Asked by At

I am running n8n locally to test it, but I have been struggling with setting the https protocol instead of http.

I added to the config in bashrc:

export N8N_PROTOCOL="https"
export N8N_SSL_KEY=/path/to/keyfile
export N8N_SSL_CER=/path/to/certfile

When I start n8n, I get:

Editor is now accessible via:
http://localhost:5678/

Unfortunately, this does not yield to any result. Can someone explain how to do it?

1

There are 1 best solutions below

0
On

Try this:

export N8N_HOST="YOUR_HOST"
export N8N_PROTOCOL="https"
export N8N_PORT=8443
export VUE_APP_URL_BASE_API="https://YOUR_HOST/"
export WEBHOOK_TUNNEL_URL="https://YOUR_HOST:8443/"
export N8N_SSL_KEY=/PATH_TO/privkey.pem
export N8N_SSL_CERT=/PATH_TO/cert.pem

or use

n8n --tunnel