I’m testing n8n on my computer and want to use HTTPS instead of HTTP. I’ve tried setting it up but no luck so far. Here’s what I did:
- Added these lines to my bashrc file:
export N8N_PROTOCOL="https"
export N8N_SSL_KEY=/my/key/file/path
export N8N_SSL_CER=/my/cert/file/path
- Started n8n
But it still shows:
Editor is now accessible via:
http://localhost:5678/
What am I missing? How can I get n8n to use HTTPS locally? Any tips would be great!
hey, ive had similar issues. make sure ur ssl files r in the right place and readable. also, try adding N8N_PORT=443 to ur env vars. if that doesnt work, check ur firewall settings. sometimes they block https traffic on nonstandard ports. good luck!
I encountered a similar issue when configuring n8n for HTTPS locally. One crucial step you might be missing is specifying the port for HTTPS. By default, n8n uses port 5678 for HTTP, but HTTPS typically runs on 443.
Try adding this to your environment variables:
export N8N_PORT=443
Also, ensure your SSL certificate and key are valid and in the correct format. Self-signed certificates can sometimes cause issues, so consider using a tool like mkcert for local development.
If you’re still facing problems, check the n8n logs for any specific error messages. They often provide valuable clues about what’s going wrong with the HTTPS setup.
Remember to restart n8n after making these changes for them to take effect.
I’ve been through a similar situation when setting up n8n locally with HTTPS. One thing that caught me off guard was that the environment variables need to be set before starting n8n. If you’ve added them to your bashrc file, make sure to either restart your terminal or source the file before launching n8n.
Another potential issue could be file permissions. Double-check that n8n has read access to your SSL key and certificate files. I once spent hours troubleshooting only to realize my cert files had incorrect permissions.
Lastly, if you’re still having trouble, try setting the SSL_REJECT_UNAUTHORIZED environment variable to 0. This isn’t recommended for production, but it can help diagnose issues during local development.
If none of these work, reviewing n8n’s logs might provide more insight into what’s going wrong. Good luck with your setup!