|
| 1 | +# Corporate Certificate Configuration |
| 2 | + |
| 3 | +This guide covers how to configure Rocket.Chat Desktop for environments where Exchange or Rocket.Chat servers use certificates not trusted by default (internal CAs, self-signed certificates, etc.). |
| 4 | + |
| 5 | +## Option 1: System CA Certificates (Recommended) |
| 6 | + |
| 7 | +The app automatically loads CA certificates from the operating system's trust store at startup, combining them with the bundled Mozilla CA bundle. This covers all Node.js HTTPS connections from the main process, including Outlook calendar sync and supported version checks. |
| 8 | + |
| 9 | +This feature uses Node.js 24's native `tls.setDefaultCACertificates()` API — available since the upgrade to Electron 40 (Node.js 24.5.0+) — with zero external dependencies. |
| 10 | + |
| 11 | +### How it works |
| 12 | + |
| 13 | +- **Enabled by default** — no configuration needed |
| 14 | +- On startup, the app calls `tls.getCACertificates('system')` to read OS-trusted certificates |
| 15 | +- These are combined with the bundled Mozilla CAs via `tls.setDefaultCACertificates()` |
| 16 | +- All subsequent TLS connections automatically trust both system and bundled CAs |
| 17 | + |
| 18 | +### When this helps |
| 19 | + |
| 20 | +- Corporate environments with internal Certificate Authorities |
| 21 | +- Exchange servers using certificates signed by an enterprise CA in the OS trust store |
| 22 | +- Environments where IT manages certificates via Group Policy (Windows), Keychain (macOS), or `/etc/ssl` (Linux) |
| 23 | + |
| 24 | +### How to disable |
| 25 | + |
| 26 | +If system CA loading causes issues, add to `overridden-settings.json`: |
| 27 | + |
| 28 | +```json |
| 29 | +{ |
| 30 | + "useSystemCertificates": false |
| 31 | +} |
| 32 | +``` |
| 33 | + |
| 34 | +### Troubleshooting |
| 35 | + |
| 36 | +**Outlook sync still fails with certificate errors:** |
| 37 | +1. Verify the CA certificate is installed in the OS trust store (not just the browser) |
| 38 | +2. Windows: check `certmgr.msc` > Trusted Root Certification Authorities |
| 39 | +3. macOS: check Keychain Access > System Roots / System |
| 40 | +4. Linux: check `/etc/ssl/certs/` or `/etc/pki/tls/certs/` |
| 41 | +5. Check app logs for `System CA certificates:` messages at startup |
| 42 | + |
| 43 | +**App logs show "System CA certificates: failed to load":** |
| 44 | +- The app falls back to bundled Mozilla CAs automatically |
| 45 | +- This may happen on locked-down systems where the certificate store is not readable |
| 46 | +- Use Option 2 below as a fallback |
| 47 | + |
| 48 | +## Option 2: Allow Insecure Connections (Last Resort) |
| 49 | + |
| 50 | +If your Exchange server uses a truly self-signed certificate that is not installed in the OS trust store, you can disable TLS certificate validation for Outlook calendar sync. |
| 51 | + |
| 52 | +> **Warning:** This setting disables all TLS certificate verification for Outlook sync requests. Only use it when Option 1 cannot solve the problem. |
| 53 | +
|
| 54 | +Add to `overridden-settings.json`: |
| 55 | + |
| 56 | +```json |
| 57 | +{ |
| 58 | + "allowInsecureOutlookConnections": true |
| 59 | +} |
| 60 | +``` |
| 61 | + |
| 62 | +This setting defaults to `false`. When both this and system CAs are active, a warning is logged suggesting the insecure bypass may be unnecessary. |
| 63 | + |
| 64 | +## Configuration file locations |
| 65 | + |
| 66 | +| Platform | Path | |
| 67 | +|----------|------| |
| 68 | +| **Windows** | `%APPDATA%/Rocket.Chat/overridden-settings.json` | |
| 69 | +| **macOS** | `~/Library/Application Support/Rocket.Chat/overridden-settings.json` | |
| 70 | +| **Linux** | `~/.config/Rocket.Chat/overridden-settings.json` | |
| 71 | + |
| 72 | +Settings can also be placed at the app ASAR level (outside the app bundle) for system-wide deployment by administrators. |
| 73 | + |
| 74 | +## Related |
| 75 | + |
| 76 | +- PR: [#3191](https://github.com/RocketChat/Rocket.Chat.Electron/pull/3191) — `allowInsecureOutlookConnections` |
| 77 | +- Jira: [CORE-1363](https://rocketchat.atlassian.net/browse/CORE-1363) |
0 commit comments