F-droid 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

6 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.

6 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.

4 Likes

Yes, basically you set up a mirror on your server.

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.

1 Like

It should be no problem if the server has limited or even no internet at all. As long as the devices on the mesh can reach the server, they can get files from it. The only tricky thing there will be providing HTTPS, but I think if you use Let’s Encrypt, it should work fine. That will mean that you have to have DNS working throughout the mesh.

Once you have this server setup, you can actually run multiple F-Droid app repositories on it. So you can provide a mirror of f-droid.org. Then the client devices will use your server when on the mesh, then if they get internet, they will be able to get apps directly. That will probably be trickier to setup, unfortunately.

You can also include any apps you want in your own local repository. Or also mirror other repositories like IzzySoft or Guardian Project. Those can all be on the same server with the same hostname, just separate paths, like:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

@Noela what are the next steps we can help you with? I’m very keen on helping you get this up and running. :slight_smile: Do you already have a server setup in mind? If not, this can be any computer, Raspberry Pi or WiFi Storage device or an old PC or laptop.

Thank you Hans.
Yes, we have a server. Infact we have Linux servers at each beneficiary community where we are hosting our digital platform (GO-ON). I will like to mention that my contract with the executing company GIZ-PROMUD Cameroon has ended. But this platform, GO-ON is opensource and hence everyone can contribute to it. Can we have a call? So that I can clearly explain the details and you get an exact picture of what the project is about and it’s present stage. Though I am no longer working, I am also interested in seeing the progress of the project and since it’s opensource, that makes it easier.

Can you post a link to where we can learn more about GO-ON? Looks like GIZ-PROMUD is this:

I’m up for having a call. I’m in Austria, so Central European Time, which should be close to Cameroon time. I think we’re only 1 hour different in the summer.

Hello Hans,
Yes, that’s the description for GIZ-PROMUD. You can learn more about GO-ON from here telecentrecameroon.ovh , the website for it is still under construction. Alright, I propose a zoom call tomorrow at 3p.m your time. My email address is tenkunoela@gmail.com, if you are not available please suggest another time and tell me.

Agreed that splitting the repo is a good idea, or creating a repo-latest build somehow with just the 16% needed.

Out of curiosity: would it make sense to cooperate with https://www.kiwix.org/en/downloads/kiwix-hotspot/?

So that F-droid would deliver apps and kiwix would deliver content.
Like wikipedia, simple wikipedia, wiktionary or TED talks?

2 Likes

Thank you for suggesting. Yes, we already have kiwix on the server of the MESH network.

2 Likes

That does seem like a great combination. Figuring out how to enable someone to build a curated mirror of F-Droid apps into their Kiwix deployment would make a lot of sense. This is what the F-Droid RepoMaker project was meant for, of course. Repomaker | F-Droid - Free and Open Source Android App Repository

We are now looking into supporting an fdroid.local local DNS lookup, that any RPi or other “offline hotspot” box could use to make access a local fdroid mirror more automatic.