Feature request: allow configuring download URL order/preference in config.php
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 51
- Forks
- 40
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 3
Description
Hello,
I would like to suggest a small but useful improvement to the updater.
Currently, when downloading a Nextcloud update, the updater tries download URLs in the order provided by the update server — GitHub releases first, then download.nextcloud.com as fallback. If the first URL is unreachable (e.g. GitHub is blocked or rate-limiting a server IP), the updater waits for the full curl timeout (~2 minutes) before failing entirely, without attempting the next URL.
Suggested improvement
Add a config.php option to either:
- define a preferred download URL directly, or
- reverse the URL priority order
Something like:
'updater.download.url' => 'https://download.nextcloud.com/server/releases/',
This would allow server administrators to force the use of a specific mirror without having to patch updater.phar or index.php manually after every update.
Context
The downloadUpdate() method already supports a $url parameter when called from CLI (--url flag), but this is not exposed as a config.php option, and it is not available at all when using the web updater (index.php).
Workaround currently used
Patching getDownloadURLs() in both updater.phar and index.php to call array_reverse() on the returned URL list — but this patch is lost after every Nextcloud update.
Thank you for considering this improvement.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing downloadUpdate() and getDownloadURLs(), including the --url CLI path and the web updater in index.php. Review how config.php is read, then define and implement the requested URL preference consistently in updater.phar and index.php. Done means administrators can configure the preference without patching generated files and the updater tries URLs in the configured behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100