Thanks for this suggestion. I gather that what you propose would entail balena offering similar functionality as www.noip.com, allowing users to link a domain name to a balena application or device, perhaps with subdomains for specific devices, right? Like, perhaps, the hostname mypi4.mydomain.com
pointing to a specific device UUID and IP address, and arbitrary port number. Does this sound like what you had in mind?
For some background, currently there is a fundamental difference between the way public URLs work, and how DDNS works:
- In the case of a balena Public URL, the “public HTTP endpoint” is at a balenaCloud datacentre (AWS). For example, if you use the command
"host"
on a laptop to resolve the Public URL to an IP address, you will see something like:
$ host <device_uuid>.balena-devices.com
<device_uuid>.balena-devices.com is an alias for resin-dep-proxyelb-1wi337umvdb20-1314791444.us-east-1.elb.amazonaws.com.
resin-dep-proxyelb-1wi337umvdb20-1314791444.us-east-1.elb.amazonaws.com has address 34.196.215.76
resin-dep-proxyelb-1wi337umvdb20-1314791444.us-east-1.elb.amazonaws.com has address 52.7.123.9
resin-dep-proxyelb-1wi337umvdb20-1314791444.us-east-1.elb.amazonaws.com has address 52.44.69.179
resin-dep-proxyelb-1wi337umvdb20-1314791444.us-east-1.elb.amazonaws.com has address 52.22.198.129
Those IP addresses don’t correspond to any particular device (not even through NAT or “router port forwarding”). When a Public URL is typed on a web browser, the web browser opens a TCP connection to the balenaCloud datacentre. From there, the connection is tunnelled over an openVPN link between balenaCloud and the balenaOS device, to reach the application.
- In the case of DDNS (as setup for example in the balena-minecraft-server), the “public HTTP endpoint” is the balenaOS device itself, through NAT mapping / port forwarding. The
host
command mentioned above, if applied to the DDNS hostname, would point to the public IP address that a NAT router maps to the device’s private IP address.
Notably, in the case of the Public URL solution, there is no need to setup any NAT or port forwarding in any router. The instructions in balena-minecraft-server README include:
Then you need to Port Forward the Port 25565
on your Pi (UDP and TCP). […] After this you need to Log in to NO-IP in your Router (Somewhere at Dynamic DNS). At least you need to paste the internet address your router is saying you (NOT something like 192.168.178.xx) in the NO-IP dashoard.
This need to setup NAT and port forwarding in a local network router (which applies to the DDNS solution) does not exist for the Public URL solution, and it was a key design choice, because it doesn’t require balena users to provide or configure “special infrastructure” where the balenaOS device is placed, which for many customers is a big plus.
This is not to say that balena shouldn’t offer something closer to DDNS, but I think it would not be a replacement for the Public URL service, but rather an additional service. There are some clear use cases for it, and I have added the feature request to our internal tracking system, which we review regularly to decide what to work on next. Thank you for raising it in the forums!