F-Droid Repo Server with Filebrowser
Docker Hub Pre-Built image: fdroid-reposerver
You can also use the docker-compose-deploy.yaml from here to automate the process.
This Dockerfile creates a Docker image that deploys an F-Droid repository server using Alpine Linux and serves the /repo directory using Filebrowser with authentication.
Overview
The Dockerfile consists of two stages:
- Build stage: In this stage, the F-Droid repository is built using Alpine Linux. The necessary packages and tools for the F-Droid server and Android SDK are installed, and the F-Droid repository is initialized and updated.
- Filebrowser stage: In this stage, the
/repodirectory from the build stage is served using Filebrowser with authentication. Thesettings.jsonfile is used to configure Filebrowser, and the authentication is handled using ausers.jsonfile.
Usage
- Create a .env file specifying the Timezone (E.g. TZ=Europe/Rome)
- Create a
settings.jsonfile with the desired Filebrowser settings, including the authentication method and the path to theusers.jsonfile. - Create a
users.jsonfile with the desired user credentials and permissions. - Place your custom apps (APK files) in the
/repodirectory. - Build the Docker image using the provided Dockerfile:
docker build -t fdroid-repo-server .(you can also usedocker compose buildto use the default settings - Run a container using the built image:
docker run -d -p 80:80 --name fdroid-repo-server fdroid-repo-server(or usedocker compose -f docker-compose-deploy.yaml up -dto deploy with default settings) - Access the Filebrowser web interface at
http://<your-server-ip>:8083(or the appropriate IP address) and log in with the credentials specified in theusers.jsonfile. - Share the F-Droid repository URL with your users. The URL to add to the repository list in F-Droid app should be in the format
http://<your-server-ip>:8084/repo. - Default username and password is admin/admin (please change the password at first configuration)
- A standard single node production configuration would be behind a reverse proxy (the one like Nginx Proxy Manager)
Customization
You can modify the Dockerfile and the settings.json and users.json files according to your specific requirements. For more information on Filebrowser settings and authentication methods, refer to the Filebrowser documentation.
Versioning
To enable automatic updates managed by F-Droid app you need to specify VersionName(string) and VersionCode(uint). In case the app has been built using Xamarin or MAUI you'll need to specify the options below in your current .csproj file:
<ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
Credits
- FileBrowser for his amazing work, more details at filebrowser.org
- F-Droid for the amazing open source repo app store