Your own F-Droid Repository with Repomaker
There might be different reasons why one should want to create a repo. Examples include:
- As developer, you want to offer your (beta-) testers an easy way to install test versions and keep them updated
- You want to provide a specific group (e.g. your family, your club, or some other organisation) with a specific app collection
- You just want to manage apps you’re using on multiple devices at a central place
Long time, this was only possible by using the fdroidserver software. Which requires some special knowledge: for the software install, for creating a repo and, especially for adding and maintaining apps in that repo. Something that would be feasible for a developer – but most likely overstrain the possibilities of the „average user“.
In this series:
- Part 1: The privacy-friendly alternative to Google Play Store
- Part 2: for advanced users and developers
- Part 3: Your own F-Droid Repository with Repomaker
- Part 4 (external, by Nico Alt): Trust is good, control is better: Reproducible builds at F-Droid
more F-Droid articles at IzzyOnDroid:
- IzzyOnDroid’s F-Droid Repo with additional functionality (1/2018)
- Unofficial (and incomplete) list of F-Droid repositories (regularly updated)
A project which is relatively young (and yet sparsely documented) should make creation and maintenance of your own repository „child’s play”: Repomaker targets the less tech-savvy user who only wants to provide existing APK files.
Repomaker is the easy variant of providing an F-Droid compatible repository. It requires no special technical knowledge. A new repository is created with a few clicks – and provided either on your own web space or via freely available services like Github, GitLab or (paid) Amazon S3. The installation via Flatpak, as described in this article, is intended for single-user installs.
Before you can use Repomaker, you need to install it on your computer. The application, its source code and short installation instructions can be found in the associated GitLab Repository – along with the possibility to report errors or seek help. The F-Droid forum additionally offers the exchange of information with other users; existing discussions can be found here.
Installation and use of Repomaker require a Linux system. As the created app repositories will be hosted on external web space, a „virtual machine” like a Debian, Ubuntu or Linux Mint running in VirtualBox, are fully sufficient. In fact, all tests for this article were done in such a VM. And instructions in this article are based on a system running Linux Mint, Ubuntu or Debian.
Install per Flatpak
While Repomaker’s website still describes a rather complex manual installation process, this is meanwhile done much more easier: since the middle of December 2018, installation is also possible using Flatpak – and since end of December 2018, there’s even an experimental Debian package. Other than with the „usual Linux packages” like Debian’s
.deb or Redhat’s
.rpm, Flatpaks have no dependencies on external libraries: all things a Flatpak requires ship inside it. But to not reinvent the wheel, a Flatpak can lean on other existing Flatpaks – which e.g. Repomaker does. As of writing this article, Flatpak is available for 17 Linux distributions such as Debian/Ubuntu (and derivates), Fedora, CentOS, openSUSE, Arch Linux and even Raspian. If you use a supported system that doesn’t ship with Flatpak preinstalled, you can easily install it via its packaging system, e.g. using
sudo apt install flatpak with Debian-based systems, or
sudo yum install flatpak with a RedHat based system. If Flapak is (then) available, just run
flatpak remote-add --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo to enable Flathub’s Flatpak repository for your user, and you’re ready to start. Just make sure you have enough free disk space: at least 1 GB should be available, as about 700 MB will currently already be consumed by the Repomaker software itself1.
To install Repomaker now will only take a single command at the terminal:
flatpak install --user flathub org.fdroid.Repomaker (we just want to install it for the current user, and not system-wide – hence this not even requires „root powers” aquired via
sudo). After having confirmed the last promt (see screenshot), grab a cup of coffee: Download and install of ca. 700 MB Flatpaks takes a little.
Install per Debian Package
On Debian and derivates, installation is even easier: A PPA provides a Debian package. But keep in mind this is currently rather experimental: in my tests I stumbled into several issues where Repomaker simply seemed to hang. But they are easy to work around if you are ready to call some daemons.
sudo add-apt-repository ppa:fdroid/repomaker sudo apt update sudo apt install repomaker
Line 1 integrates the PPA into your local system (Ubuntu and derivates), line 2 updates the local index, and line 3 finally installs Repomaker including its dependencies.
In contrast to the approx. 700 MB the Flatpak variant consumes, the Debian package(s) only need about 250 MB for the software (based on a „virgin system”; even less if you had e.g. installed Python before – and the planned optimization mentioned in the footnotes will apply here as well). Repomaker can now be started from the terminal with the command
repomaker – or of course with its entry in the application menu.
Now you should find Repomaker in the application menu. If not, a „reload“ of the desktop2 or a simple log-off/log-on should to the job. Alternatively, you can start Repomaker from within a terminal:
flatpak run org.fdroid.Repomaker. It should then show up as you can see in the screenshot – and ask you to create a new repository. For that, you first need to give it a name and a description – then it will be created.
Within your new repository you can add APK files via Drag’n’Drop, or via a file selection dialog. Another option is to use the blue button labeled „ADD FROM GALLERY”: This lets you pick APKs from other repositories. Preconfigured are the official F-Droid and the Guardian repository (both trustworthy sources); you can add others if you wish.
Several apps added to your repo, you look into „Info” or „Share“ and notice: there’s no storage assigned? Of course your repository already occupies a certain amount on your hard disk. But there it’s only available for you to maintain – but not for others to access.
The GUI shipped with Repomaker has some short-comings: every here and then you might get stuck with the interface apparently freezing. You can work around that by calling daemons. The following script starts the Repomaker daemons (to run in the background) and then opens the web interface in your default browser:
remopaker-server & repomaker-tasks & xdg-open http://127.0.0.1:8000/
Instead of the last command, you also can copy the given URL into a web browser of your choice (on the same machine / inside the same VM you started the daemons on). Opened this way, Repomaker seemed to run much smoother in my tests.
If you need to damonize with your Flatpak install, an additional step is required. You first need to activate the Flatpak environment for Repomaker:
flatpak run --command=bash org.fdroid.Repomaker
That done, continue as described above.
Make your app repository available
To make your repository available for other devices, you need to configure „external storage“ that can be accessed via HTTPS. For that, Repomaker offers three options:
- Amazon S3: for fail-safe, commercial operations. This option is fee-based, and requires a corresponding Amazon account. The „average user“ won’t be interested in this.
- SSH: If you run your own web server (at home or at a web hoster) and want to host your repo there – this is your best choice. Of course your server must be accessible via SSH with credentials you configure here.
- Git: none of the other two options apply? Then this is your easiest option. You will need an account at Github, GitLab or any other Git hoster, which usually comes for free for personal use, and is set up in a minute. (Of course you could also self-host your own Git server. But if you run your own server, SSH is the choice with less overhead.)
The easiest method (available to everyone) being Git, I’ll describe that. First, if you haven’t already done so in the past, you’ll need to create an account with the provider of your choice. With Github, this is done via the Github Homepage. Then you create a new Git repository there, for Repomaker to use. Right after account creation, that can be done via the button labeled „Start a Project“ – or generally via the Plus symbol in the upper right corner. Choose a name (for my test I simply choose „repo“) and add a short description (so others know what this is about) – all remaining fields can be ignored. Pressing the „Create Repository” button, this task is completed.
Our Github repository is available now. To integrate it with Repomaker we will need an SSH key whose public part we deposit in our Github account. If you do not yet have such a key, now is the time to create one:
ssh-keygen will perform this job3. The content of our public key (
~/.ssh/id_rsa.pub) we copy-paste to our Github account (see screenshot).
Now we can add our Github repository as new storage to Repomaker – and activate it. With minimal delay, Repomaker will start syncing our local storage with it (in the background, so you won’t be interrupted). That done, you should be able to see it on the Github website, as the corresponding screenshot shows. If you like you can (as suggested there) add a short explanatory text („Add a README”) which then should contain details from the „Public Link” from the „Share” tab and the fingerprint from the „Info” tab if you want to make this repo available for everyone.
How easy it is to add apps to your repository we’ve already seen in „First Start”. But when added from „local sources” (and not via the Gallery), details on the app are rather meager: you can see the name of the app, its size, and when it was added to your repo. That often makes it hard to grasp what purpose such an app has, what it is for.
But you can edit the details. If you click on an app entry in the list, details on the app will be shown. On this details page you also find a button to edit the entry (in the upper-right corner). So you can e.g. add the author of the app, a (detailed) description – and even screenshots of the app. That done, the app’s description becomes much more meaningful.
Updates of the „online repository” (in our case at Github) are performed automatically in the background by Repomaker. As soon as some details have been changed, they’ll be synchronized (after a short delay) – whether you adjusted an app description, or added/removed an app.
Integrate your app repository with the F-Droid client
How to add a third-party repository to the F-Droid Client on Android has already been shown in the previous article. The link you need for this is shown in Repomaker’s „Share” tab under „SHARE PUBLIC LINK“. Don’t be confused if you click on the button labeled „VIEW REPO” and the page opening in your web browser claims to not exist („404: Not Found”) – it is there. If you don’t believe me, add
/index.xml to the link in your browser and load that page: Ah, there’s something, right?
If you kept up until here: Nothing should stop you now from offering your own repositories. They can be specific to a certain topic – or simply present a list of your favorite apps. But for your „customers” not to run outdated apps (possibly with security gaps) you should not forget to keep your repository’s contents up-to-date – i.e. always add their latest APKs of its apps whenever they become available.
Optimization is planned: Repomaker should e.g. no longer ship the entire Java SDK, and the currently used „org.kde.Platform” Flatpak should be replaced by the less demanding FreeDesktop Runtime. ↩︎
With Cinnamon this can be accomplished by hitting Alt-F2, then „r”, then the „Enter” key – without losing a single window. There’s already a bug report open at Flatpak to deal with this. It seems only Cinnamon is affected by this (as well as distributions not shipping with Flatpak pre-installed, and you installed it in the same session) – and then only once initially. With subsequent Flatpak installs, the entry in the application menu should show up immideately, as I could confirm in my tests. ↩︎
„Fine-Tuning“ will be skipped here: Creation of the optimal (or most secure) SSH key is described in many other fine tutorials. For our „simple repository”, standard settings should suffice. Of course feel free to substitute ↩︎