[Solved] Problem with the Android App "Hostname not verified"

Like everyone else im ditching Lastpass in favor of Bitwarden. Since I now have the option to host my Vault myself, i’m doing just that. I got it running on Home Assistant with the Bitwarden_RS addon and the Duckdns Let’s Encrypt. The Certificate is signed to my duck dns Domain but I only want it to be accessible from the inside. The Vault is running great, the Chrome Extension with only the local IP also. But when i tried to setup the android app with the local IP:Port i get this error:

Exception Message: Hostname 192.168.1.3 not verified […] DN: CN=maxklos.duckdns.org

Here my Diagnostic:

Your environment (Generated via diagnostics page)

  • Bitwarden_rs version: v1.19.0
  • Web-vault version: v2.18.1
  • Running within Docker: true
  • Internet access: true
  • Uses a proxy: false
  • DNS Check: true
  • Time Check: false
  • Domain Configuration Check: true
  • HTTPS Check: true
  • Database type: SQLite
  • Clients used:
  • Reverse proxy and version:
  • Other relevant information:

I think the app get confused that i’m using another IP then stated in the certificate. When i asked google with the problem i only found an old github post, where the solution was to install an older version of the App (2.0.2). Did that, but i still got an error with no details. Anyone got an idea how to fix the app? Do i have to expose the vault to the web so the app can connect?

Your certificate is presumably for maxklos.duckdns.org, so you need to use https://maxklos.duckdns.org as your base URL, not the IP address. If your instance is going to be private, then you need to point maxklos.duckdns.org to 192.168.1.3 and get certs via DNS challenge.

There’s an example at

Also, if you run it on a different port then you need to configure that port also.

So it was what I was thinking. A confusion between the local IP and the Domain Certificate . I solved it via a custom AdGuard Rule.

adguard

In the app I entert:

https://maxklos.duckdns.org:7277/

And it works like a charm.

Thanks alot for the help!

Hey there, I got a similar problem going on. I got also an LetsEncrypt certificat for, lets use this eample, maxklos.duckdns.org. This domain is linked to nginx proxy manager. The Vaultwarden instance is runnig on a seperate LXC with the subdomain vaultwarden.maxklos.duckdnsorg. I can connect thru my browser on the androoid device with valtwarden, but on the app I get the previous same mention error as Maxklos, because the cert is for maxklos.duckdns.org and not the subdomain.

You would either want to get the cert for the sub domain vaultwarden.maxklos.duckdns.org or a wildcard in this example for *.maxklos.duckdns.org for all different types of hosts you want under the subdomain.