Please Help! SSL , Let's Encrypt , digitalOcean , Https , 443

Hi All I am newbie
I'm trying to configure my node-red server.

I follow tutorial in this : Node-red server with nginx reverse proxy howto guide - FAQs - Node-RED Forum
and some websites on internet/

this is what I config settings.js now :
uiPort: process.env.PORT || 443
https: {
key: require("fs").readFileSync('/path/fullchain.pem'),
cert: require("fs").readFileSync('/path/cert.pem')
},
https: function() {
return {
key: require("fs").readFileSync('/path/privkey.pem'),
cert: require("fs").readFileSync('/path/cert.pem')
}
},

my dns setting in digitalocean

now :
https://www.mydomain.com ---> node-red admin (I dont want it)

I want :
https ://node-red.mydomain.com ---> node-red admin
node-red .mydomain.com ---> node-red admin

https ://www.mydomain.com ---> my single page website
mydomain .com ---> my single page website

https ://dashboard.mydomain.com ---> my nodered dash board
dashboard .mydomain.com ---> my nodered dash board

Could you please help me? and How to setup the nginx ?
PS sorry for my english

Can't help directly as I don't use that configuration. However, have you tried breaking up the problem so that you can work through it bit-by-bit?

Starting with NGINX. Can you set up and access a simple, static website over HTTP? Can you then configure that to use HTTPS?

Really, you want that up and running first anyway. So that Node-RED is never exposed directly.

I think I understand what your asking.

For simplicity the guide is for setting up a stand alone server with node-red. Are you trying to host a web sited and node red on the same server. If so you need to get a better understanding of nginx.

I've never done what your asking because node-red does not like to have 2 seperate root '/' locations for admin and dashboard.

if you forward it with nginx it can get messy so for it to be easy you will have to pick

in your node-red's settings.js file you need to set your UI settings for dashboard to / and change node-red to a /admin

or keep admin at '/' and change your UI root location

then change nginx file to point to each accordingly

To be honest, the first config change I always make when installing Node-RED is to change the Editor to be on /red since I always want to keep the root url clear.

NGNX should have no issues with this. And Dashboard will be on /ui anyway by default. I usually put a menu of some sort on the root URL just so that there is always something useful there.

Node-RED does, of course have many different URL's and some nodes add their own. However, because Node-RED has its own PORT, you can easily configure a reverse proxy to redirect it to a different virtual web. This is important in production environments since many enterprise firewalls will block port 1880 by default.

1 Like

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