Port question about 2nd RPi4 with Home Assistant and DuckDNS

I have a 2nd RPi4 that I am using to test alternative setups so I don’t take down my running setup while doing the testing. I need to setup remote access and SSL to test different configurations and I don’t want to pay for a 2nd Nabu Casa account. I already use Nabu Casa so Alexa has access to the running Home Assistant but otherwise I use my own domain and Cloudflare to access the running HA. I installed duckdns and created an address for the test setup. The running domain already goes to port 443 which I already have pointed to port 8123. What do I need to do so that the duckdns domain points to the 2nd RPi4 with Home Assistant? Can there be two port forwarding rules in the router for port 443? So far the duckdns domain goes to my running HA and states that the SSL certificate is only valid for the running domain.

In my case, 443 is forwarded to nginx, which forwards ha.mydomain.com, home.my domain.com and hatest.mydomain.com to the correct HA instance.

So you have 3 HA instances each with their own domain and nginx is able to determine which one is the desired HA instance? So you don’t need to setup a different internal port for each instance separate port forwarding in the router?

Correct. One forward in the router.

I’m still confused. My router is forwarding port 443 to the static IP of the running instance of HA. I don’t have the option of not using an IP with port forwarding. How would the router know that there is another static IP that is using the same port?

You forward 443 to the IP of nginx. Nginx forwards again to the IP of HA.