Why the browser works and the app doesn't
- User CAs: from Android 7, apps trust only the system CAs by default. A CA certificate you installed yourself counts for Chrome, but for an app only if its developer allowed it in
network_security_config.xml. Every app decides this for itself. - Missing intermediates: the browser fills them in, the app doesn't.
- No “proceed anyway”: many apps don't offer the browser's button.
What the apps require
| App | Own CA possible? | Note |
|---|---|---|
| Home Assistant Companion | yes, via installed CA | Trusts user CAs but offers no option to ignore certificate errors. Message: “The Home Assistant certificate authority is not trusted”. |
| Nextcloud | yes | Asks whether you want to trust an unknown certificate. That doesn't help permanently with chain errors. |
| Outlook with your own Exchange | no | Uses Java's standard root CAs. A certificate from an internal CA leads to “Insecure connection”. TLS 1.2 is also required. |
For Outlook with Exchange you therefore need a publicly trusted certificate, see renewing the Exchange certificate.
Checklist
- Chain complete? The SSL check shows whether the server sends the intermediates. With Let's Encrypt the configuration needs
fullchain.pem, notcert.pem. - Right name? The name in the app must be a SAN in the certificate, even if you use an IP address internally, see Hostname not verified.
- Root CA installed instead of the server certificate? The phone needs your CA's certificate, installed as a “CA certificate”, not as a VPN or Wi-Fi certificate. Android requires a screen lock for this. Guide: installing a certificate on Android.
- Does the app trust user CAs? If not, only a publicly trusted certificate helps.
- Date and time correct on phone and server?
- Certificate renewed? Some apps remember a previously accepted certificate. After a change, clearing the app data and signing in again helps.
The permanent fix: a real certificate
The least trouble is a Let's Encrypt certificate, even for services that are only reachable at home. With the DNS challenge the server doesn't need to be reachable from the internet. All you need is your own domain and a DNS provider with an API. Internally the name points to the private IP address. The ACME helper generates the right commands. Every app then trusts the certificate without anything installed on the devices.
# Example: acme.sh with the DNS challenge via Cloudflare export CF_Token="…" acme.sh --issue --dns dns_cf -d ha.example.com # Then check the chain from a client’s point of view openssl s_client -connect ha.example.com:443 -servername ha.example.com -showcerts </dev/null 2>/dev/null | grep -E "s:|i:|Verify return"
If it has to be your own CA
- Create a root CA with
basicConstraints CA:TRUEand install only that on the phones. - Issue server certificates with a SAN for every name and IP address used. The CSR generator helps.
- On the server, send the server certificate plus intermediates.
- Provide it for Android in DER format (
.crt). The certificate converter converts PEM.
With OpenSSL it looks like this:
# 1. Root CA, valid for 10 years openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout ca.key -out ca.pem \ -subj "/CN=Home Root CA" -addext "basicConstraints=critical,CA:TRUE" -addext "keyUsage=critical,keyCertSign,cRLSign" # 2. Server certificate with SAN for name and IP address openssl req -newkey rsa:2048 -nodes -keyout ha.key -out ha.csr -subj "/CN=ha.home.example" openssl x509 -req -in ha.csr -CA ca.pem -CAkey ca.key -CAcreateserial -days 397 -sha256 -out ha.pem \ -extfile <(printf "subjectAltName=DNS:ha.home.example,IP:192.168.1.10\nbasicConstraints=CA:FALSE\nextendedKeyUsage=serverAuth") # 3. CA for Android as a DER file openssl x509 -in ca.pem -outform der -out ca.crt
FAQ
Is it enough to install the server certificate on the phone?
Usually not. Android expects a CA certificate. A self-signed server certificate without the CA flag often can't be installed as a CA.
Why does Home Assistant work in the browser but not in the app?
Usually an intermediate that Chrome fills in itself is missing from the chain, or the CA was installed as a Wi-Fi or VPN certificate instead of a CA certificate.
Can I use Outlook for Android with an internal CA?
No. Outlook uses Java's standard root CAs. For Exchange you need a publicly trusted certificate.