Installing the Server and Repo Tools

The fdroidserver tools provide
everything you need to set up and maintain your own repos, run an fdroid
build server, and even host your own website like f-droid.org. The
F-Droid developers mostly work on Debian, Arch, and Ubuntu, so those are
currently the best supported platforms.

To setup and maintain your own collection of apps and media from the
command line, setup an F-Droid repository using the tools from
fdroidserver. To run the full F-Droid build server setup, see
Build Server Setup.

After running fdroid init, you need to set the Windows path to your
keystore in config.py. It is also possible to install
fdroidserver in a virtual environment using virtualenv and pip.

Docker Executable Image (any platform)

If you are already running Docker “Executable Images”, then the
easiest way to run fdroidserver is to use our
executable image

Installing the latest code (any platform)

The easiest way to install the fdroidserver tools from source is to use
virtualenv and pip. First, make sure you have the Python3 version of
virtualenv or pyvenv installed, it
should be included in your OS’s Python distribution or via other
mechanisms like dnf/yum/pacman/emerge/Fink/MacPorts/Brew. Then here’s
how to install fdroidserver into a Python “virtual
env”:

You can find variations on this used in the CI tests:
https://gitlab.com/fdroid/fdroidserver/blob/master/.gitlab-ci.yml

Building apps

To build apps using F-Droid, Java and the whole Android SDK must be
installed. This process is currently only developed on GNU/Linux, but
we’d love patches getting it working on MacOS and Windows. If you only
want to make F-Droid repositories of APK files that you already have
or don’t know what this means, then you can skip this section.

In order to build Android apps with the fdroidserver toolchain,
Java, the Android SDK, and some other essential tools must be
installed. Only
parts of the Android SDK
are available in Debian, so the Android SDK must be installed
manually, as well as the packages that it requires (the Android SDK
tools include some 32-bit binaries, so even 64-bit systems need these
i386 library packages). The F-Droid tools use the Android SDK to
build and inspect apps, so you must have the Android SDK installed and
setup before using fdroidserver.

Install the Android SDK
and make sure the ANDROID_HOME environment variable is properly
set. Be sure to verify the file you downloaded, you can double-check
the SHA-1 Checksum on Google’s download page.

Note: If you have Android Studio installed, you have the Android SDK installed.
It should be located at ~/Android/Sdk instead of ~/android-sdk-linux.
You can find the location in Android Studio when you open the
Tools→SDK Manager menu.

On top of that, to build apps like they are built on f-droid.org, then
the whole Build Server Setup is required.
That is a more secure, production-ready setup that requires quite a
bit more setup and resources. The
build server provisioning scripts
provide a useful reference for all the needed bits.

If you want to make your own official releases with the F-Droid tools,
then you’ll also need to set up the
Signing Process.

Proprietary, non-free libraries

The Android SDK is made available by Google under a proprietary
license. Within that, the essential build tools, SDK platforms,
support library and some other components are under the Apache license
and source code is provided.

Google APIs, used for building apps using Google Maps, are free to the
extent that the library comes pre-installed on the device. Google
Play Services, Google Admob, GCM, and many other third party libraries
are proprietary and cannot be included in the main F-Droid repository.
The MicroG project is developing free software
replacements for some of the most used proprietary Google libraries