home-assistant / home-assistant/iOS
Can't connect to Home Assistant instance after certificate replacement
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 520
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 264
Description
**Device model, version and app version**
Model Name: Mac Mini (2024)
macOS Version: Tahoe 26.3
App Version: (Can't find the information - the latest)
Safari Version: irrelevant
**Home Assistant Core Version**
2026.2.3
**Describe the bug**
I had to replace my internal certificates which are self-signed (was expired). My setup internally is Client -> HAProxy -> Home Assistant. I terminate the SSL session on the loadbalancer (HAProxy).
After updating the certificate (the CA is in the local keychain and in my Apple account), the Home Assistant app no longer connects to the Home Assistant instance.
After a quick look, my assumption was confirmed. The app doesn't "ask" whether I want to accept the new certificate. Unfortunately, it doesn't show any confirmation popup and just logs it.
```
2026-02-21 12:24:07.860 [Error] [main] [WebViewController+WebKitDelegates.swift:63] webView(_:didFailProvisionalNavigation:withError:) > Failure during content load: Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “homeassistant.xxx.local” which could put your confidential information at risk." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _WKRecoveryAttempterErrorKey=, networkTaskDescription=LocalDataTask <2A8C3E80-57A6-43F6-9A65-97E2247E0B54>.<14>, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=(
...
```
**To Reproduce**
As described above, switch the certificate on a load balancer (or MITM proxy) between the client and Home Assistant if you were connected to Home Assistant before the certificate change.
**Expected behavior**
1. I think the application should show a popup asking whether I want to accept the new certificate.
2. (Just an assumption) The app should rely on the system keychain where the CAs are stored
**Screenshots**
After removing the Home Assistant instance from the app and re-adding it, I am prompted for the certificate.
**Additional context**
Changing the _Connection security level_ to _Less secure_ doesn't help
Contributor guide
Assessment
This issue has not been assessed yet.