Built-in collabora CODE server not working

Hello,

I have a new Nextcloud installation but i can not get the built-in Collabora CODE server to work. When i try to access a document it just hangs on the loading screen forever.

If i go to the Administration settings-> NextCloud office i get this error after a few seconds:

Could not establish connection to the Collabora Online server.

Failed to connect to the remote server: cURL error 28: Operation timed out after 5001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://nextcloud.bitmatic.com/apps/richdocumentscode/proxy.php?req=/hosting/discovery

A thing to note is that although it times out on the /hosting/discovery page i can actually see the /hosting/capabilities page.
It returns

{
  "convert-to": {
    "available": true
  },
  "hasMobileSupport": true,
  "hasProxyPrefix": false,
  "hasTemplateSaveAs": false,
  "hasTemplateSource": true
}

The raw error from the log page when trying to see the Settings is this:

{"reqId":"QSzdKbO4xYyHXjEqigQ4","level":3,"time":"2025-07-08T16:45:17+00:00","remoteAddr":"","user":"--","app":"richdocuments","method":"","url":"--","message":"Failed to fetch discovery: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://nextcloud.bitmatic.com/apps/richdocumentscode/proxy.php?req=/hosting/discovery","userAgent":"--","version":"31.0.6.2","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://nextcloud.bitmatic.com/apps/richdocumentscode/proxy.php?req=/hosting/discovery","Code":0,"Trace":[{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":205,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":157,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},"*** sensitive parameters replaced ***",{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},"*** sensitive parameters replaced ***",{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":142,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/lib/private/Http/Client/DnsPinMiddleware.php","line":109,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":66,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Client.php","line":333,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Client.php","line":169,"function":"transfer","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Client.php","line":189,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/lib/private/Http/Client/Client.php","line":206,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",{"verify":false,"timeout":5,"nextcloud":{"allow_local_address":true},"headers":{"User-Agent":"Nextcloud Server Crawler","Accept-Encoding":"gzip"},"synchronous":true}]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/apps/richdocuments/lib/Service/DiscoveryService.php","line":59,"function":"get","class":"OC\\Http\\Client\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/apps/richdocuments/lib/Service/CachedRequestService.php","line":74,"function":"sendRequest","class":"OCA\\Richdocuments\\Service\\DiscoveryService","type":"->","args":[{"__class__":"OC\\Http\\Client\\Client"}]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/apps/richdocuments/lib/Backgroundjobs/ObtainCapabilities.php","line":41,"function":"fetch","class":"OCA\\Richdocuments\\Service\\CachedRequestService","type":"->","args":[]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities","type":"->","args":[null]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/lib/public/BackgroundJob/TimedJob.php","line":97,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"}]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/lib/public/BackgroundJob/TimedJob.php","line":84,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"}]},{"file":"/home/bitmatic/nextcloud.bitmatic.com/cron.php","line":170,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"}]}],"File":"/home/bitmatic/nextcloud.bitmatic.com/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":275,"message":"Failed to fetch discovery: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://nextcloud.bitmatic.com/apps/richdocumentscode/proxy.php?req=/hosting/discovery","exception":[],"CustomMessage":"Failed to fetch discovery: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://nextcloud.bitmatic.com/apps/richdocumentscode/proxy.php?req=/hosting/discovery"},"id":"686d4c6cf36c6"}

Output of occ config:list system

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.bitmatic.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.6.2",
        "overwrite.cli.url": "https:\/\/nextcloud.bitmatic.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "app_install_overwrite": []
    }
}

Output of occ app:list

Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.3.4
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.1.4
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - deck: 1.15.1
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - mail: 5.1.6
  - nextcloud_announcements: 3.0.0
  - notes: 4.12.1
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - richdocuments: 8.7.1
  - richdocumentscode: 25.4.202
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - spreed: 21.1.1
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - tasks: 0.16.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - admin_audit: 1.21.0
  - encryption: 2.19.0
  - files_external: 1.23.0
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0

Hey @bitmatic welcome to the community :waving_hand:

can you double check that syntax? → for built-in CODE I’m quite sure you may define that URL in plain syntax https://cloud.yourdomain.tld

occ config:system:set overwrite.cli.url --value="https://cloud.my.domain.xyz"

do check out How to manage Hosts and FQDN for Nextcloud snap even though you’re not using the snap… but there are some useful hints if you have issues.

I could double-check it if i knew what to check for. It is not a setting i have added myself, so i do not know how it is supposed to look…

When i open the config-php file in an editor it looks slightly different. It just says
'overwrite.cli.url' => 'https://nextcloud.bitmatic.com', without the garbled forward slashes.

1 Like

are you running the snap? please complete the support teplate

if this is a snap install, jump right here: CODE & Nextcloud Office configuration

I am running

Nextcloud Hub 10 (31.0.6)

I downloaded latest server archive about a month ago on june 12th.

The Basics

  • Nextcloud Server version * Nextcloud Hub 10 (31.0.6)*:
  • Operating system and version ( Linux 4.18.0-513.9.1.lve.el8.x86_64 x86_64):
  • Web server and version (Apache 2.4.63):
  • Reverse proxy and version (Don’t know):
  • PHP version ( 8.2.28):
  • Is this the first time you’ve seen this error? (Yes / No): It was alway there
  • When did this problem seem to first start? It never worked.
  • Installation method Just dropped all the files into a folder on my webhost
  • Are you using Cloudflare, mod_security, or similar? Don’t think so…

I am running this on a shared webhost. I have terminal access to the installation, so i can issue the occ commands, but i do have limited acces, so no sudo and there are many files i can not edit. /etc/hosts for example.

Hello @bitmatic, welcome to the Nextcloud community! :handshake:

the problem is your server can not reach the code instance. It checks the URL

which seem to be unrecheable from the server. This could be due to DNS/networking issues or just because CODE doesn’t run (common issue on shared hosting). you can check using curl from the command line. Please review Collabora integration guide and pay special attention to the build-in part.

1 Like

Thanks for the suggestion. I am inclined to just give up getting it to run and use something else instead.

It just seems weird to me that i can access /hosting/capabilities which i guess suggests that the server is running and the DNS is working, but i get the timeouts on /hosting/discovery

could it be that the provider is preventing you from running binaries? possibly you’ll get some information from your provider.

don’t throw in the towel too early… “something else” like Install & configure Collabora CODE on Nextcloud with Docker may work, but that would entail self-hosting that service and would imply that you could self-host your entire instance instead of shared hosting…

or

shared hosting including office from the provider, depending on your budget

Nextcloud has worked perfectly for me except the collabora CODE part, so “something else” for me would be to just not use nextcloud office, and maybe go with libreoffice or similar… It just would have been nice to have everything in the same package.

I have decided to not use the office part of Nextcloud. It seems too flaky, and if i have to go through too many hoops to get it to work, it might be inclined to break again with any changes to either Nextcloud, Collabora CODE or my hosting provider.

So don’t use more time on this case, and thanks for the kind help and suggestions.

1 Like

I use OnlyOffice. I prefer it to NextCloud Office which, I believe, is LibreOffice. OnlyOffice is, in my experience, more compatible with MS Office file formats and is much more lightweight too. I run the docker images of OnlyOffice and NextCloud and have found both to be trouble-free. I’m running them on a Synology DS723+.

1 Like