Displaying Node-RED UI in Home Assistant without add-on?

I run Home Assistant container and Node Red container and access the Node Red UI outside the network through a reverse proxy. I use the SWAG/NGINX reverse proxy and since you are already using docker, you would be able to as well.

With the reverse proxy, you only expose ports 80 and 443 and not all the individual ones for Home Asssistant and Node Red (ie no need to expose ports 1880 or 8123 through the router with a reverse proxy).

You can create subdomains and access all these things as well with a reverse proxy. I also use the reverse proxy to access the UI for zigbee2MQTT outside the network as well.

Instructions to setup the SWAG proxy are on this thread

Once you have the reverse proxy setup, the iframe panel mentioned above would work to display the Node Red dashboard in Home Assistant by using the external proxy’s address for Node red - ie https://nodered.yourdomain.duckdns.org. Prior to exposing the Node Red UI to the web, be sure to setup a password to secure access the editor’s UI page.

Also here are the NGINX proxy configs to setup Node Red access. I have separate ones to expose the endpoints and/or the UI so you can do either or both as needed:

################################################################################
### SUBDOMAIN 1a Node Red Admin#################################################
server {
	listen 443 ssl;

	root /config/www;
	index index.html index.htm index.php;

	server_name nodered.yourdomain.duckdns.org;
	
	include /config/nginx/ssl.conf;

	client_max_body_size 0;

	location / {
#		auth_basic "Restricted";
#		auth_basic_user_file /config/nginx/.htpasswd;
		include /config/nginx/proxy.conf;
		proxy_pass http://yourIPhere:1880;
	}
}

################################################################################
### SUBDOMAIN 1b Node Red Endpoints##############################################
server {
	listen 443 ssl;

	root /config/www;
	index index.html index.htm index.php;

	server_name noderedend.yourdomain.duckdns.org;
	
	include /config/nginx/ssl.conf;

	client_max_body_size 0;

	location / {
#		auth_basic "Restricted";
#		auth_basic_user_file /config/nginx/.htpasswd;
		include /config/nginx/proxy.conf;
		proxy_pass http://yourIPhere:1880/endpoint/;
	}
}

If you do an IFRAME and use a VPN, the local IFRAME address should work to point to the local Node Red instance as well when the VPN is on, if you want to go that route instead of a reverse proxy. The VPN will be more secure but access will only work on machines you setup the VPN on, versus the reverse proxy which allows access from any machine. I wroteup a post about setting up Wireguard container if you want a VPN

1 Like