Community Document Server - cURL error 28: Operation timed out after 120000 millisecond

What worked to me was to change curl’s timeout at the time of invoking it by software installer in: [path to nextcloud]/lib/private/Installer.php. You will see a line that says something like:

// Download the release
$tempFile = $this->tempManager->getTemporaryFile('.tar.gz');
$timeout = $this->isCLI ? 0 : 120;
$client = $this->clientService->newClient();

Change the 120 (seconds) value and put something bigger or remove the condition and leave it always in 0 (unlimited, but perhaps not the best idea).