I’m trying to configure my local n8n instance to use SSL instead of the default HTTP connection. I want to secure the connection but I’m having trouble getting it to work properly.
I’ve tried setting these environment variables in my shell configuration:
However, when I launch n8n, the startup message still shows:
Workflow editor available at:
http://localhost:5678/
The HTTPS configuration doesn’t seem to take effect. What am I missing in the setup process? Has anyone successfully configured SSL for their on-premises n8n deployment?
I encountered a similar issue while setting up SSL for n8n. It often comes down to how and where your environment variables are set. Instead of relying on your shell configuration, try exporting those variables directly in the terminal session where n8n is started. Additionally, ensure that the user running the n8n application has the appropriate permissions to access your key and certificate files; often, incorrect file permissions can cause configuration failures. If the problem persists, testing with a self-signed certificate can help determine if the issue lies within your certificate or the setup itself.
had the same headache. first, check your n8n version - older ones handle ssl differently. try completely restarting n8n after setting those variables. it caches old configs sometimes. mine only worked after i killed all n8n processes and started fresh.
Environment variables should work, but check a few things first. Run openssl x509 -in /home/user/certs/certificate.crt -text -noout to make sure your cert files are valid and readable. Also check you’re not using command-line flags that override the environment variables - especially --tunnel which messes with SSL config. I had this same issue and found n8n was ignoring my SSL settings because I’d left a --tunnel parameter in my startup script. Worth checking if you’re using Docker vs direct install too since the config methods are different.