N8N SSL on main domain port:5678

Hey mates, I have been struggling with getting this n8n port secure with an SSL (https://). My n8n sits on the main root at mydomain.com:5678. I have forced https sitewide but has not worked. I have read many different docs but none seemed to help me with my particular VPS setup. I am semi-new to the VPS space, so keeping it simple to implement would be great.

I do use let’s encrypt for the SSL for my domain and docker to do the installation of n8n. My application does run with no issues on HTTP, but not HTTPS.

My VPS Build:

  • CyberPanel Version: 2.3
  • CentOS 7 64bit with CyberPanel
  • Docker version 23.0.1, build a5ee5b1
  • Zend Engine v3.4.0
  • PHP 7.4.33
  • Apache/2.4.6 (CentOS)

Hey @arronrobles,

Welcome to the community :cake:

A bit more info is needed, Are you using a reverse proxy for n8n or is it direct? It could just be that you need to set the HTTPS env option and add your certs, This is normally a lot easier if you are using a reverse proxy though as you can integrate Lets Encrypt there and not have to worry about manually updating the certs as needed.

@Jon thanks for your response. Port:5678 will not encrypt on the ssl. it always goes to http and not https. I have done a rewrite engine to envoke https but it still will not enforce it. Is this a reverse proxy issue or a cyber panel issue? Everything i have read on it is only an issue with Cyber Panel. I have struggled and have tried most fixes but they don’t work.

How do I use a reverse proxy for cyber panel?

Hey @arronrobles,

I have no idea on the Cyber Panel side, It should encrypt assuming you are enabling https in n8n and have the certs set. Just doing a rewrite though won’t do the job at that won’t handle the SSL side of things it just gives you a pretty URL.

The solution was to use a reverse proxy for cyberpanel is called OpenLiteSpeed. Super simple solution and easier that using command line in SSH. If anyone has more questions on this topic, I am happy to assist.

1 Like

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