This is an old revision of the document!
Nextcloud apps Download and Enable Onlyoffice Community Document Server throws a Curl error 28 operation timed out after 120000 milliseconds
What worked for me was to change curl’s timeout at the time of invoking from the software installer located in: [path to nextcloud]/lib/private/Installer.php.
cd /var/www/<path-to-nextcloud>/nextcloud/lib/private/ sudo vim Installer.php
You will see a line that says something like:
<block> $tempFile = $this→tempManager→getTemporaryFile('.tar.gz'); $timeout = $this→isCLI ? 0 : 120; $client = $this→clientService→newClient(); </block> Change the 120 (seconds) value to some longer value, say 240 (seconds) or remove the condition and leave it always as 0 (unlimited, but perhaps that is not the best idea).
See thread at: https://help.nextcloud.com/t/community-document-server-curl-error-28-operation-timed-out-after-120000-millisecond/80589/17
tecnicaso offered this fix. It worked for me. Thanks tecnicaso!