Setting up self-hosted bitrwarden

Hi,

I’m trying to set up a self hosted instance of Bitwarden but I’m struggling to do so and getting a little bit confused. So I would really appreciate any help or explanation of things that I could be doing wrong.

What I have tried so far:

Setting up a version of Bitwarden (Linux) on my home server. I have done this before using self signed certificates and in the installation pointing to my local ip address instead of using a FQDN. I did this because I only wanted to use Bitwarden inside my local network and not exposing it to the internet. I got this to work on my pc but whenever I started using the mobile apps I got error messages about the certificate telling me that it could not trust it. I posted another forum message about this but didn’t really get any help.

Just now I tried using an azure linux vm and a domain that I own. The Azure vm has a public ip and inside my domain I created an A record pointing to the ip address of the vm. So for example my domain is test.com and the azure vm ip is 1.2.3.4. I created an a record vault.test.com pointing to 1.2.3.4. While setting up the vm and installing bitwarden I got an error in the letsencrypt stage of the installation that it could not reach port 80 of the ip address. I checked the firewall of the vm and opened up port 80 for any incoming traffic but still got that error. Then I tried doing a NS lookup to see if vault.test.com would resolve to that ip, but it would give me another ip address of some kind of provider in the USA.

So basically I’m confused right now with what I should do. What I would prefer to have is a bitwarden server running inside of my local network and being able to use the mobile apps. Another option would be using an azure vm and my domain name and blocking all traffic to that public ip except from my ip address, but apparently I’m currently doing something wrong with the dns configuration. Can someone help me with how I would be able to realize this? I’m also open to other suggestions of doing this or getting to an end result that looks like what I want.

Thanks!