- Android SDK(assuming you have a 32bit system, download it from here )
- Android NDK(assuming you have a 32bit system, download it from here)
- Extract it to suitable location on your system. You will use these PATH'S in server configuration.
ant
,ant-contrib
,maven
,javacc
,openjdk-6-jdk
, any one version control likegit
.- An
apache
webserver.
Clone this repo using:
git clone https://github.com/androportal/f-droid-fdroidserver.git
Or you can clone the most updated repo from official fdroid repository
git clone git://gitorious.org/f-droid/fdroidserver.git
Adding
fdroid
binary in system's$PATH
for example
export PATH=/path/to/this/repo/:$PATH
Or you can add the same line in your
.bashrc
file.
Assuming your webserver document root is
/var/www/
(this is default in case of Ubuntu), make a directory like/var/www/fdroid
.Type
sudo mkdir -p /var/www/fdroid
You need to provide your sudo password
Copy
config.py
from this repository to/var/www/fdroid
locationsudo cp -v config.py /var/www/fdroid
This is the modified file, the original version of this file is with the name
config.sample.py
Also copy
fdroid-icon.png
to same location/var/www/fdroid
:sudo cp -v fdroid-icon.png /var/www/fdroid
Now create three(3) more directories inside
/var/www/fdroid
:sudo mkdir /var/www/fdroid/repo sudo mkdir /var/www/fdroid/metadata sudo mkdir /var/www/fdroid/tmp
repo
will hold all the apk'smetadata
will hold all the extra information about apk'stmp
will have apk cache
Copy all your apk file to
/var/www/fdroid/repo
sudo cp -v *.apk /var/www/fdroid/repo
Your file hierarchy under
/var/www/fdroid
should look something like thismetadata/ repo/ tmp/ config.py fdroid.icon.png
- Open
config.py
from/var/www/fdroid/
and edit it. You can also refer to our sample config filemy-config.py
When setting up the repository, one of the first steps should be to generate a signing key for the repository index. This will also create a keystore, which is a file that can be used to hold this and all other keys used. Consider the location, security and backup status of this file carefully, then create it as follows
You need to create a keystore file with the same name and location assigned to a variable
keystore
inconfig.py
file. For example if ourkeystore
variable iskeystore = "/home/sachin/fdroid-keystore/my.keystore"
then, visit that location
cd /home/sachin/fdroid-keystore/my.keystore
and execute the command
keytool -genkey -v -keystore my.keystore -alias repokey -keyalg RSA -keysize 2048 -validity 10000
Provide same values which you have assigned to variable
keydname
inconfig.py
Please say yes when asked for confirmation and press ENTER
This should generate a file
my.keystore
in present directoryNow everything is in place, visit the location
/var/www/fdroid
and execute the commandfdroid update -c -v
This should show output similar to screenshot below
Now run
fdroid update -v
and finally
fdroid publish
Assuming you have installed a webserver, start it using
sudo service apache2 start
assuming you are using an Ubuntu distro
Don't forget to give access to web user
sudo chown -R www-data.www-data /var/www/fdroid
and
sudo chmod -R 755 /var/www/fdroid
Give root access to
config.py
filesudo chown root.root /var/www/fdroid/config.py sudo chmod 700 /var/www/fdroid/config.py
- You can test your f-droid server by visiting
http://localhost/fdroid/repo
on a web-browser - If you have any problem, please make sure you have followed all above steps correctly OR raise an issue.
- A more detailed manual is maintained on official fdroid site https://f-droid.org/manual/fdroid.html