You have different ways of setting up your development environment:
You can tweak your instance by changing some settings.
Follow instructions to get AAS token here.
Create the file exodus/exodus/settings/custom_docker.py with the following content:
from .docker import *
GOOGLE_ACCOUNT_EMAIL = "<a valid google account>"
GOOGLE_ACCOUNT_AAS_TOKEN = "<a valid aas token>"
# Overwrite any other settings you wish toecho uid=$(id -u) > .env
docker compose up -d
# Once exodus started, you can check its logs
docker compose logs -f exodus-frontWhen everything is up (Docker logs Exodus DB is ready.), you may have to force a first download of the F-Droid index:
docker compose exec exodus-worker /entrypoint.sh refresh-fdroid-indexThe worker must be running to do this.
The exodus container automatically:
- Create the database
- Make migration
- Import trackers from the main instance
- Start the frontend of exodus
Don't forget to rebuild your image and refresh your container if there is any change with docker compose up -d --build.
You can use the command
docker compose exec exodus-worker /entrypoint.sh "<command>"to make actions, where <command> can be:
collect-static: Collect all static filescompile-messages: Compile the translation messagescreate-db: Create the database and apply migrationscreate-user: Create a Django usermake-messages: Create the extracted translation messagesimport-trackers: Import all trackers from the main exodus instancestart-frontend: Start the web serverstart-worker: Start the exodus workerrefresh-fdroid-index: Refresh F-Droid index file
This setup is based on a Debian 11 (Bullseye) configuration.
- Install system dependencies
sudo apt install git gettext virtualenv postgresql-13 rabbitmq-server build-essential libssl-dev dexdump libffi-dev python3-dev libxml2-dev libxslt1-dev libpq-dev pipenv- Install apkeep, the tool used to download applications from the Google Play Store.
git clone https://github.com/Exodus-Privacy/exodus.gitsudo su - postgres
psql
CREATE USER exodus WITH PASSWORD 'exodus';
CREATE DATABASE exodus WITH OWNER exodus;
\c exodus
CREATE EXTENSION pg_trgm;cd exodus
pipenv install --devYou can tweak your instance by changing some settings.
Follow instructions to get AAS token here.
Create the file exodus/exodus/settings/custom_dev.py with the following content:
from .dev import *
GOOGLE_ACCOUNT_EMAIL = "<a valid google account>"
GOOGLE_ACCOUNT_AAS_TOKEN = "<a valid google aas token>"
# Overwrite any other settings you wish toecho "DJANGO_SETTINGS_MODULE=exodus.settings.custom_dev" > .env
# enter into python environment
pipenv shell
cd exodus
python manage.py migrate --fake-initial
python manage.py makemigrations
python manage.py migratepython manage.py compilemessagespython manage.py createsuperuserMinio is in charge to store files like APK, icons, flow and pcap files.
wget https://dl.minio.io/server/minio/release/linux-amd64/minio -O $HOME/minio
chmod +x $HOME/minioConfigure Minio
mkdir -p $HOME/.minio
cat > $HOME/.minio/config.json << EOL
{
"version": "33",
"credential": {
"accessKey": "exodusexodus",
"secretKey": "exodusexodus"
},
"region": "",
"browser": "on",
"logger": {
"console": {
"enable": true
},
"file": {
"enable": false,
"filename": ""
}
},
"notify": {}
}
EOLCreate Minio storage location
mkdir -p /tmp/exodus-storage$HOME/minio server /tmp/exodus-storage --console-address :9001Minio API is now listening on 9000 port and the browser interface is available
at http://127.0.0.1:9001. Use exodusexodus as both login
and password.
The εxodus handle asynchronous tasks submitted by the front-end.
You have to activate the virtual venv and cd into the same directory as manage.py file.
pipenv shell
cd exodus
celery -A exodus.core worker --beat -l debug -S djangoNow, the εxodus worker and scheduler are waiting for tasks.
You have to activate the virtual venv and cd into the same directory as manage.py file.
pipenv shell
cd exodus
python manage.py runserverNow browse http://127.0.0.1
Activate the εxodus virtual venv, cd into the same directory as manage.py file and execute the following commands:
python manage.py import_categories
python manage.py importtrackersNow, browse your tracker list
An initial F-droid index manual download may be required:
python manage.py refresh_fdroid_indexThe following options can be configured in exodus/exodus/settings/:
| Setting | Description | Default value (from base.py) |
|---|---|---|
| ALLOW_APK_UPLOAD | Whether to allow APK file upload | False |
| ANALYSIS_REQUESTS_AUTO_CLEANUP_TIME | Requests cleanup frequency (in seconds) | 86400 |
| ANALYSIS_REQUESTS_KEEP_DURATION | Requests keep duration (in days) | 4 |
| DISABLE_SUBMISSIONS | Whether to disable app submissions | False |
| ETIP_HOSTNAME | ETIP URL | https://etip.exodus-privacy.eu.org |
| EX_PAGINATOR_COUNT | Number of elements per page | 25 |
| FDROID_INDEX_UPDATE_TIME | FDroid index file update frequency (in seconds) | 86400 |
| FDROID_MIRROR | FDroid repository to download apps | https://f-droid.org/repo |
| GOOGLE_ACCOUNT_AAS_TOKEN | AAS token of Google account to download apps | / |
| GOOGLE_ACCOUNT_EMAIL | Email of Google account to download apps | / |
| TRACKERS_AUTO_UPDATE | Whether to update automatically trackers | False |
| TRACKERS_AUTO_UPDATE_FROM | API URL of an Exodus instance to update trackers from | https://reports.exodus-privacy.eu.org/api/trackers |
| TRACKERS_AUTO_UPDATE_TIME | Trackers update frequency (in seconds) | 345600 |
| TRACKERS_STATISTICS_AUTO_UPDATE_TIME | Trackers statistics update frequency (in seconds) | 259200 |
Browse to the analysis submission page and start a new analysis (ex: fr.meteo).
When the analysis is finished, compare the results with the same report from the official instance.