How can I activate HTTPS for my on-premise n8n deployment?

I’m testing a local n8n instance and require HTTPS. I configured secure settings:

export SECURE_FLAG="enabled"
export PRIV_KEY="/config/priv.key"
export PUB_CERT="/config/pub.cert"

but the application still runs on HTTP. Advice is appreciated.

In my experience, the key to successfully enabling HTTPS in an on-premise n8n deployment was ensuring that your environment variables are not only set correctly but also correctly loaded in the runtime context. I had issues where the configuration files had insufficient permissions, resulting in n8n silently falling back to HTTP. Reviewing your container logs helped pinpoint problems related to file mounting inconsistencies. Additionally, verifying that the certificates are in the appropriate format and verifying that there are no conflicting settings in your deployment settings can resolve many of these challenges.

In my deployment, I found that carefully verifying the file paths and permissions for the certificate files was essential. I faced a similar issue where a misconfiguration in my docker-compose file led to the certificate files not being correctly mapped into the container. I eventually corrected the mount points and ensured that the files were accessible to the n8n process. It is also worthwhile to check that no reverse proxy or additional settings are inadvertently interfering with the secure configuration.