NodeRED on SSL https://

Hey.. I have my Node-Red setup on a VPS by Digital Ocean.

I can access it via http:// IP:1880
I am logging in via admin and password, that i have already generated.

I bought a domain a few days back. (Eg. example. com)

I now want to link a subdomain to the NodeRed installation. So i created a subdomain nodered. example. com and linked it to http:// IP:1880 via Reverse Proxy using Apache. I installed SSL certificates by Lets encrypt.

I now can successfully access the NodeRed dashboard securely using https:// nodered. example. com

Trouble is that after logging in, I get a error saying Lost connection to Server, reconnecting.

I can still access Nodered without any issues via http:// IP:1880, but not via the Domain name.

Is there some other setup for https to be done for NodeRed?
Any help would be highly appreciated!

The "Lost connection" message is due to the editor being unable to establish its websockets connection back to the run time.

You must make sure your reverse proxy is configured to pass through websockets - they don't by default.

Thanks Nick.. I will check it out.. If by chance you have any links for the same, do send it..

While using NodeRed at https:// nodered.example. com URL using Apache Reverse proxy, on Inspecting the page, the following websocket error is obtained.

WebSocket connection to 'wss://nodered.example. com/comms' failed: Error during WebSocket handshake: Unexpected response code: 404

Does using https always defaults to using wss i.e. secure websockets. Is there any way in which i can still use ws:// ?

Have been cracking my head over this for quite a few days now.. Not getting any significant help on enabling websockets over Apache reverse proxy..

Btw, i have not done any changes in the settings.js file to use https, i am still using http itself.

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