How to setup Apps mirror website?

Issue: Connection timed out to GitHub, while update Apps (https://apps.nextcloud.com/).
log :

GuzzleHttp\Exception\ConnectException: cURL error 28: Connection timed out after 120000 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://github.com/nextcloud-releases/spreed/releases/download/v11.3.4/spreed-11.3.4.tar.gz

Reason: In some countries around the world, such as China, it’s very hard to access GitHub.

Few months ago, it would be able to update successfully after re-try a few more times. But recently, it is difficult to update successfully after more than ten attempts.

Suggestion: Thus, build a nother mirror website may be a good way to solve this issue.

So, may we build a mirror website manually? Or just using a existing mirror website?

Do you know F-Droid?

Hi j-ed,
I sorry for not clearly describe my issue.
I am update the apps in “https://<www.example.com>/index.php/settings/apps” , i.e., the app in https://apps.nextcloud.com/. Not the nexcloud-andriod-client-app.

I have find the configuration keyword to using a apps-mirror-site, that is as the <nextcloud_home_path>/config/config.sample.php:

/**
 * Enables the installation of apps from a self hosted apps store.
 * Requires that at least one of the configured apps directories is writeable.
 *
 * Defaults to ``https://apps.nextcloud.com/api/v1``
 */
'appstoreurl' => 'https://apps.nextcloud.com/api/v1',

That is, if there is a mirror website, we can easily set that configration.

However, that defalt url is not Accessible for nomal browser, which stop me from trying to mirror it. At the same time, we may also change the data-sheets in ‘https://apps.nextcloud.com/api/v1’ from ‘github’ to the ‘new mirror’, not just only mirror the files in ‘https://apps.nextcloud.com/api/v1’.

Then, how to mirror ‘https://apps.nextcloud.com/api/v1’ ?

Does this paragraph from the adminstrator guide answer your question?

https://docs.nextcloud.com/server/latest/admin_manual/apps_management.html?highlight=app%20store#using-a-self-hosted-apps-store

Yes.
We can mirror the apps.json and categories.json file from https://apps.nextcloud.com/api/v1/apps.json and https://apps.nextcloud.com/api/v1/categories.json.

At the same time, we also need to modify the download-url in apps.json, i.e., such as the value of:

appname=richdocuments
cat apps.json | jq '.[] | select (.id == "'${appname}'") | .releases[0] | .download' | sed 's/\"//g'