Tell container to use Port forward ip by default (not use main ip)

I’ve successfully set up port forwarding on the host. Because I can do netcat nc -l 8333 on the server in the container on the port and nc -v 8333 on my desktop and send messages successfully.

description: "coins.js"
config: {}
- description: "btc"
  protocol: tcp
  listen_port: "8333"
- description: "doge"
  protocol: tcp
  listen_port: "22556"
location: none

But it seems like the container is missing instruction to use the listen_address.

I can see this when I run bitcoin-cli inside the container and view the output of the command getpeerinfo because each peer shows "addrlocal" : "" which is my websites main ip not the listen address. It should be listen_address:random_port instead.

How do I instruct the container to use the listen address instead of the main ip?

Network forwards provide NAT forwarding to an internal IP. They do not provide the external IP inside the instance itself. For that you would need to use something like ipv4.routes on a bridged NIC or the ipv4.address on the routed NIC type:

You’ve not really explained where the address has come from in your application? Is it hard coded in a config or is the actual local IP of the instance?