OnlyOffice connect to Nextcloud served by Caddy results in Exception: Bad healthcheck status

OnlyOffice connect to Nextcloud served by Caddy results in Exception: Bad healthcheck status

  • Goal: I am trying to install OnlyOffice into my Nextcloud (23.0.5).
  • Problem: “Exception: Bad healthcheck status” when configuring OnlyOffice Docs address in NextCloud OnlyOffice Server settings
  • OnlyOffice Document Server Version: 7.0.1
  • DMS version: (I’m unsure what is being asked here)
  • connector version: (listed within NextCloud Apps, right?) - 7.3.4
  • OS and browser version: I run Windows 8.11 and the Brave browser.

I have NextCloud being served via Caddy. I installed OnlyOffice document server via snap and changed the port to 8888 and I am using Caddy to revere proxy OnlyOffice. It is now being served properly at my domain with SSL encryption. Let’s call the domain example.com. So everything is good. The problem is when I go to connect OnlyOffice to Nextcloud in the admin panel, I am getting an “Exception: Bad healthcheck status” As, I have dug further, it seems Caddy is not passing along the SSL certificates the way Nextcloud is needing. OnlyOffice has documentation for all the other webservers, but not Caddy. My caddy file is below snippit is below:

example.com {   
       reverse_proxy http://localhost:8888 {
       header_up Host {upstream_hostport}
         }
}

The OnlyOffice Documention for apache is this:

SetEnvIf Host "^(.*)$" THE_HOST=$1
RequestHeader setifempty X-Forwarded-Proto http
RequestHeader setifempty X-Forwarded-Host %{THE_HOST}e
ProxyAddHeaders Off

How do I translate the Apache documentation to Caddy, as I think this will fix the issue?

Hello @Art
Unfortunately, we didn’t test Caddy proxy, so I have no idea how to help you with this situation.
Probably, using tested solutions where we have made config examples is the only way: Using ONLYOFFICE Docs behind the proxy - ONLYOFFICE
Sorry for inconvenience.