Password Reset URL with external domain

I use the Keycloak admin REST API to trigger an email notification to the user for password reset.
However, the reset email goes out with the internal IP Address and port which will not be accessible externally outside the firewall.

https://<internalserver>:<internal-port>auth/realms/...

Whereas, I actually need this to be something like

https://mycompany.com/auth/realms...

How do I go about setting this up such a way the external user gets the right URL ?

Thank you!