F-Droid back-end spec?

Hello,

Is there an F-Droid back-end specification document, that could be used to create a server that would be compatible with all F-Droid clients ?

Thanks

Try to start with: Setup an F-Droid App Repo | F-Droid - Free and Open Source Android App Repository

An read one of many from here: Artikel - IzzyOnDroid :wink:

1 Like

Thanks, but what I meant is, I want to actually code my own server implementation, so I would like to know the specs, e.g. endpoints, etc.

It’s just a web server that serves files from a certain folder structure, no enpoints, this is not REST API :slight_smile:

F-Droid / fdroidserver · GitLab help maybe?

I can’t seem to find information in this repo regarding that folder structure. Thanks

Read Erstellen eines „simple binary F-Droid Repos“ - IzzyOnDroid

and Erweitern des „simple binary Repos“: Screenshots & mehr - IzzyOnDroid

What do you think the server does exactly? Which part of it? The building of apps? The hosting of repo?

Well, I thought that app details would be stored in a database, that search would be server-side, that client update would involve server-side diffing, etc.
I also thought that maintainers would have administrative endpoints to create/update/delete apps.

(This is not a criticism) now I understand why clients are slow, because of the server-side being static.

Thanks

No, for privacy, everything the client does is on-device only.

The repo storage is just a dumb static page with packages.

Slow or not that depends on actions, slow downloading depends on server/network, app search/installs depends on device, ect

Static assets are best suit for catching. See the arguments of headless CMS

Yes, but client updating would be much faster if the back-end would only return changed items since last time (i.e. server-side diffing).

This will be supported in the index-v2.

Also, the database is just several megabytes. It’s not theb bottleneck. To my understanding the really slow part is APK downloading and website loading.

I can generate the index-v1.json file and its contents, but how to put it inside a jar and generate the META-INF directory and its contents ?
Thanks

You can check this file. It just put the index file into a zip file with .jar suffix. Then sign it with apksigner.

Are there example values for config ? Thanks

In index-v1.json :

  • How do repo.version & packages[][].versionCode integers work ?
  • What are requests.install & requests.uninstall arrays ?

Thanks

repo.version is a static value. fdroidserver/index.py · master · F-Droid / fdroidserver · GitLab

packages[][].versionCode is the app version code.

What are requests.install & requests.uninstall arrays ?

They are used to push install/uninstall command from the repo. I don’t know how they work but I thought they are not used in the main repo.

repo.version is a static value.

When should it be changed and how should it be generated ?

packages[][].versionCode is the app version code.

How to generate such value from a major.minor.patch version ?

They are used to push install/uninstall command from the repo.

Do you mean clients will automatically install or uninstall apps from those values ?