Skip to content

[Bug]: Mac desktop client cannot connect to some self‑hosted servers using internal CA (works from browsers and other OS clients) #9794

@Tom9876

Description

@Tom9876

⚠️ Before submitting, please verify the following: ⚠️

Bug description

On macOS the Nextcloud desktop client cannot establish a secure connection to some of my self‑hosted Nextcloud servers that use certificates from the same internal CA.
The exact same servers work fine:

  • in all browsers on macOS

  • with the Windows and Linux desktop clients

  • with an other Nextcloud server that uses the same CA chain.

On macOS, the account setup wizard immediately shows:
“Secure connection to server address https://… failed. How do you want to proceed?”
It offers only “Use different URL / Try unencrypted HTTP / Configure client TLS certificate”, but no certificate details or trust prompt.

After I completely removed the client configuration and containers and reinstalled, the problem persists.
Interestingly, if I start the client manually from Terminal with:

/Applications/Nextcloud.app/Contents/MacOS/nextcloud

I can add the problematic accounts successfully and syncing works.

This looks like a macOS‑specific initialization / TLS handling bug that affects only some servers, even though their certificate chains are valid and identical to the working one

Environment

Desktop client: 33.0.2 (macOS build)
OS: macOS (26.4) on M1 MacBook Pro
Installation: official .app (and tested via Homebrew cask)
Nextcloud servers: multiple self‑hosted instances
2x behind Traefik (Docker)
1x separate Apache server (no Docker, no Traefik)
Certificates: all servers use the same internal PKI:
RootCA → Sub1CA → Signing1CA → leaf cert
Full chain is presented correctly; openssl s_client -showcerts verifies Verify return code: 0 (ok) on all servers.
All servers are reachable and trusted in Safari/Chrome/Firefox on the same Mac.

Steps to reproduce

  1. On macOS, install the desktop client (33.0.2).
  2. Ensure the internal CA (Root + intermediates) is imported into the macOS System keychain and set to “Always trust”.
  3. Start the client normally (Dock / Launchpad).
  4. Try to add an account for https://nextcloud.example.local (affected server).
  5. The wizard shows “Secure connection failed …” with the three buttons mentioned above and does not allow trusting the certificate.
  6. Quit the client.
  7. Start the client from Terminal with:
    /Applications/Nextcloud.app/Contents/MacOS/nextcloud
  8. Repeat the account setup for the same server → now the connection succeeds and the account is added.

Expected behavior

The macOS client should use the same TLS / trust behavior regardless of how it is started, and it should be able to connect to all servers whose certificate chains validate in the macOS keychain and with openssl s_client.

If there is a certificate problem, the client should show a clear trust dialog (similar to browsers), not only a generic “Secure connection failed” page.

Which files are affected by this bug

Nextcloud-33.0.2.pkg

Operating system

macOS

Which version of the operating system you are running.

26.4

Package

Official macOS 12+ universal pkg

Nextcloud Server version

33.0.2

Nextcloud Desktop Client version

33.0.2

Is this bug present after an update or on a fresh install?

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Server logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions