Can I reverse proxy to my node-red instance?

So I’ve got my Pi running HA with duckdns + letsencrypt at https://domain.duckdns.org/

I went and installed the Node-RED addon and it’s working perfectly at https://<LAN IP>:1880/

Can I make it accessible at https://domain.duckdns.org/nodered or is my only option to port forward 1880 to the Pi?

I think NGINX addon can let you do this through the customize option, just need to figure out how to create the proper conf file.

I’ve changed customize to true and have added the following:

        location /nodered/ {
        proxy_pass https://homeassistant:1880;
        proxy_set_header Host $host;
        proxy_redirect http:// https://;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        access_log /var/log/nginx/nodered_access.log;
    }

Unfortunately, I am getting an error:

Cannot GET /nodered/

Any thoughts on what I need to change?

Did you manage to have this working?

Yes, one of these days I’ll do a writeup.

# NODERED

server {
listen 443 ssl;
server_name node.yourdomain.com;

# all ssl related config moved to ssl.conf
include /config/nginx/ssl.conf;

access_log /config/log/nginx/node_access.log;
error_log /config/log/nginx/node_error.log debug;

location / {
    proxy_pass http://yournoderedip:1880/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

}

1 Like

So for HA nginx addon, what do you put there to make it working?

Check out the guide article I posted on www.khaz.me