IP to domain name re-direct causing issues

When I access my local Bitwarden server installed on Ubuntu, via the IP, it redirects me to the domain URL (https://bitwarden.mydomain.com). It successfully shows the page. If I refresh, or attempt to login, I get a “Server not found” or a “Network error when attempting to fetch resource”, respectively.
I am hosting this on an internal server, not on a public server. How do I fix this?

That is successfully shows a login page after redirection makes it a bit difficult for me to grasp. Most likely during installation you gave the stated domain URL as address to connect to your instance. If this hostname is not known to a) the internet) and b) no port forwarding is done on your router since you want to only host it locally, my suggestion would be the following:

  • on your client device add the domain name of your instance to the hosts file (/ etc/ hosts on linux and c:\windows\system32\drivers\etc\hosts on windows) and try again. If that client can then connect successfully, it proves the instance itself runs correctly.
  • when you indeed just want to host locally, you could change the entries in ./bwdata/env/global.override.env (replace the domain name with a hostname locally known for your machine where the instance is running.