F-driod Repo on a Mesh Network

Hello everyone,
I am Noela Tenku, my team and I developed a mesh network for a community in Cameroon with very limited access to the internet. We have a server on this network where we deployed some offline open source services so that the community can benefit from them such as Kiwix and Kolibri. To further serve the community, we have been thinking about setting up f-driod on our server so that they can download apps within the network without internet connection. With that context, my question is:
Can an f-driod repo be setup on a server that is connected to a Mesh Network? So that fdriod clients on that same network can download applications from the repo without internet connection? As well as manage application updates?
I am available and will be very grateful for more information and recommendations on this.

Best Regards,
Noela Tenku

3 Likes

The mesh has IPs? Not sure about certs…I’d guess self-signed?

2 Likes

Hey, nice project!
If the client can access the server this should work fine. The repo is basically just a webserver.
E.g. have a look at this repo where directory listing is enabled: https://bubu1.eu/fdroidclassic/fdroid/repo/

The F-Droid client can also exchange apps with other clients in the same network or via bluetooth.

3 Likes

http should work too if certs are a problem

1 Like

Amazing project! Thanks for reaching out, I would like to help where I can. I agree, it should be 100% doable. HTTPS will be the tricky part. Is this mesh work not connected to the internet at all? It would work with plain HTTP, but there are risks for the users that you would have to weigh.

You can get started very quickly, just install Debian/Ubuntu etc. on any computer, install any webserver (Apache, nginx, lighttpd, etc), then use fdroidserver to index and publish the APKs to that webserver. It is also possible to use an Android device as the webserver, the fdroid update publish process would still need to happen on a computer somewhere. For that, there are webserver apps for Android.

I can help you with downloading APKs and updates as needed. I could even mail you an SD Card with a whole 64GB copy of the f-droid.org repo.

In any case, we welcome your questions.

4 Likes

Another option for HTTPS is pretty simple. If only one computer connects to the “real internet” and the rest is a mesh setup, you can use no-ip.com to get dynamic dns to your one computer, and then use Let’s Encrypt to certify it. I use this setup for my home server with no issues. This solves the security issues on your mesh.

Just my (less than) 2 cents. :smiley:

1 Like

Thanks to everyone who responded. I apologize for the late reply, I was in an area without an internet connection, and with the current crisis, movement has been difficult. But I’m here now.

@Licaon_Kter Yes, it has IPS, not self-signed yet. But we are thinking about getting one signed by let’s encrypt as we will need to do updates on the platform from time to time and probably connect more communities who have the mesh network.

@hans Thank you, I would need all the help I can get. Yes, the network is connected to the internet sometimes. The problem is connecting to work on the server remotely with the poor internet connection in that area. I will need a guide in setting up the repo to work on the MESH network so clients who have the app can access updates by just being on the network without an internet connection. From my understanding, I can just download updates on the webserver, and the client phones on the MESH network can get updates from the web server without an internet connection?
It would be great if we can have the SD Card with the entire repo.
I can use my laptop as a test server for simulation or a raspberry PI. When you have the time, I would really be grateful for your assistance Hans.

2 Likes

Yes, basically you set up a mirror on your server.
https://f-droid.org/en/docs/Running_a_Mirror/

Optimizing for slow internet:
The current repo size is 84 GiB (without the subdirectories)
53 GiB of that are source tarballs and 31 GiB are apk files.
Of these 31 GiB only 13 GiB are the latest version.
Signatures are just 6 MiB total.
https://marzzzello.gitlab.io/mirror-monitor/repo/f-droid.org:repo.html

Therefore, normally only 16% of the repo is relevant.

I think we should really split the repo to make it easier for the mirror operators.
The source tarballs can be moved to a separate source repo, and older apks that are not the latest version should be moved to the archive.

But until now you could manually exclude the source tarballs with rsync --exclude='*._src.tar.gz.
Excluding older apks won’t save bandwith, only disk space and would require a separate script.