Add "Bind IP Address" to app "port" selection UIs

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

1 Like

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}

Well, it works. Pity if you update the app or change a setting it will zap it :wink:

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.

1 Like

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 :wink:

(And then I’d make a video…)

1 Like