Stux
September 2, 2024, 2:53am
1
There is no way to bind an app’s port mapping to a specific IP address in Electric Eel beta.
If an IP Alias is added to an interface, then that IP Alias can be used when configuring port mapping in raw docker-compose.
eg:
ports:
- 192.168.0.40:80:80
Will bind port 80 on the host’s 192.168.0.40 IP alias to port 80 in the container.
Of course, for the above to work, the TrueNAS UI must first be bound to a specific IP instead of 0.0.0.0
Similarly, docker will bind to 0.0.0.0 by default, which means if no specific IP is provided for binding then the default could just be “0.0.0.0”
TrueNAS already uses similar UI for the GUI and SMB services
4 Likes
Stux
September 3, 2024, 2:54am
2
Looking at the Nginx Proxy Manager app, the ask is to simply allow configuring the “host_ip” value of the ports: section
ports:
- {"host_ip": "0.0.0.0", "mode": "ingress", "protocol": "tcp", "published": 30021, "target": 80}
- {"host_ip": "0.0.0.0", "mode": "ingress", "protocol": "tcp", "published": 30020, "target": 81}
- {"host_ip": "0.0.0.0", "mode": "ingress", "protocol": "tcp", "published": 30022, "target": 443}
Stux
September 3, 2024, 3:20am
3
Well, it works. Pity if you update the app or change a setting it will zap it
1 Like
sfatula
September 15, 2024, 8:40pm
4
I was able to do this on a custom app in Eel. The port definition with IP shouldn’t go away for those. Not ideal to have to use a custom app, but another workaround.
This IP address biinding can be fixed in the catalog infrastructure… after all the Apps are ported and migration enabled.
It should be a good Xmas present.
2 Likes
Stux
September 16, 2024, 10:09pm
6
It would be super awesome to get an early present for just the Nginx Proxy Manager app as that would at least allow setting up a reverse proxy for all the other apps
(And then I’d make a video…)
5 Likes
etorix
September 29, 2024, 8:48am
7
Rule 34 of the TrueNAS forum: For every issue, there is a Stux video to solve it.
5 Likes
etorix
September 29, 2024, 10:27am
8
Then I guess this request can be closed as accepted to release the votes
3 Likes
UBnl
November 11, 2024, 7:30am
9
Thanks for this!
I managed to get NPM working on an alias IP listening on ports 80 and 443 as mentioned using a custom YAML.
However something weird is happening to the TrueNAS GUI:
the GUI is available on the IP address it is bound to in the settings
the GUI is not available hostname.local nor on the domain I configured in my local DNS
Any thoughts how to tackle this?