Get Keycloak hosted URL for the root URL

In our keycloak application we are finding a way to get the keycloak hosted URL. Like using a variable for the root URL such as ${authBaseUrl} instead of setting a fixed URL.
Issue with the ${authBaseUrl} is it returns ‘/auth’ in the URL. Could you guys please support me if you know any possible solution?