Installation Guide
This guide walks you through installing, configuring, and getting started with EO-Toolkit on an Ubuntu server.
System Requirements
Hardware Specifications
- Server Type: Linux-based Ubuntu server
- Processor: AMD or Intel processor with minimum 32 cores
- RAM: Minimum 126 GB for efficient performance
- Storage: Minimum 5 TB (considering future expansion of the database)
- Access: Full admin access to the server is required
Operating System
- Ubuntu Server 22.04 (required)
Required Software
- PostgreSQL and its developer packages
- PostGIS (spatial database extension)
- Redis (for Celery task queue)
- Git
- GDAL (Geospatial Data Abstraction Library)
- Apache web server
- Build-essential (compilers)
- Python 3 development packages
Step 1: Install System Dependencies
sudo apt-get update
sudo apt-get install -y gdal-bin apache2 postgis redis-server \
build-essential python3-dev libpq-dev pango1.0-tools
sudo apt-get install -y postgresql postgresql-postgis
sudo apt install -y libapache2-mod-uwsgi
Step 2: Database Setup
Create a PostgreSQL user and database:
In psql (use strong passwords of your choice):
ALTER USER postgres PASSWORD 'etoolkit';
ALTER USER etoolkit PASSWORD 'etoolkit123';
ALTER USER etoolkit WITH SUPERUSER;
\q
Create the database and enable PostGIS:
createdb -U etoolkit -h localhost etoolkit
psql -U etoolkit -h localhost etoolkit -c "CREATE EXTENSION postgis"
Step 3: Clone the Repository
Step 4: Python Virtual Environment
Step 5: Install Python Dependencies
Step 6: Environment and Configuration
Create the environment file
Copy the example file and edit it (path is inside the etoolkit project directory):
Environment file template
Use this template (based on .env.example). Set values for your environment.
OPENAI_API_KEY=
EE_KEY=
DJANGO_ENV=development
DATABASE_NAME=db.sqlite3
# For production, uncomment and set:
# DJANGO_ENV=production
# POSTGRES_DB=
# POSTGRES_USER=
# POSTGRES_PASSWORD=
# POSTGRES_HOST=localhost
# POSTGRES_PORT=5432
ADMIN_EMAIL=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
GEOSERVER_URL=
GEOSERVER_WMS_URL=
GEOSERVER_USER=
GEOSERVER_PASSWORD=
GEOSERVER_WORKSPACE=
How to obtain API keys
OPENAI_API_KEY (optional; used for AI features):
- Go to OpenAI Platform and sign in.
- Open API keys and click Create new secret key.
- Copy the key and set in
.env:OPENAI_API_KEY=sk-proj-...
EE_KEY (Google Earth Engine; required for GEE analyses):
- In Google Cloud Console, create or select a project.
- Enable Google Earth Engine API (APIs & Services → Library).
- Create a Service account (APIs & Services → Credentials → Create credentials → Service account).
- Request Earth Engine access at signup.earthengine.google.com and add the service account email as a user.
- For the service account, add a key: Keys → Add key → Create new key → JSON, and download the file.
- Set
EE_KEYin.envto the entire JSON object as a single line (e.g.EE_KEY={"type":"service_account",...}). Ensure the value is correctly quoted; escape internal double quotes if required by your env loader.
GeoServer configuration
- Install GeoServer from geoserver.org and start it.
- In the GeoServer admin UI, create a workspace (e.g.
etoolkit). - Set
GEOSERVER_URL,GEOSERVER_WMS_URL,GEOSERVER_USER,GEOSERVER_PASSWORD, andGEOSERVER_WORKSPACEin.envto match your setup. - Create and permit the data directory:
Email configuration
Set ADMIN_EMAIL, EMAIL_HOST_USER, and EMAIL_HOST_PASSWORD in .env for OTP and notifications. For Gmail: enable 2-factor authentication, create an app password, and use it in EMAIL_HOST_PASSWORD.
Step 7: Initialize Database
cd /path/to/etoolkit
python manage.py makemigrations webapp
python manage.py migrate
python manage.py collectstatic
Step 8: Create Superuser
Set email and password when prompted.
Step 9: Testing (Development Mode)
Start Celery (in a separate terminal) and the Django server:
* Start celery worker to use asynchronous requests
celery -A etoolkit worker -l INFO
* At this point you could run the app
python3 manage.py runserver
* run this to access on other device too
python manage.py runserver 0.0.0.0:8002
Open in a browser:
http://127.0.0.1:8000/(or your port)- From other devices:
http://server_ip:8002/
First Steps: Using the Application
Accessing the application
- Open your browser and go to your EO-Toolkit URL (e.g.
http://localhost:8000orhttps://etoolkit.terrawatch.net).
Creating your account
- Click Sign Up or go to
/accounts/register/. - Enter username, email, password, and confirm password, then click Register.
- On the email verification page, click Send OTP, check your email for the 6-digit code, enter it, and click Verify.
- Go to
/accounts/login/, enter username and password, and click Sign In.