How to set up your local development environment for GAIA.
This development setup guide is designed for:
Developers who want to contribute to the GAIA project by fixing bugs, adding features, or improving documentation
Developers who want to modify GAIA for their specific use cases or integrate it with custom systems
Developers who want to learn from the codebase, understand the architecture, or build upon GAIA
Development teams who need to customize GAIA for enterprise deployment and integration
Before you begin, ensure you have the following installed:
Docker & Docker Compose
Development Tools
System Requirements
To start developing on GAIA, you need to set up your local environment. You can choose between an automated setup using our script or a manual setup.
The easiest way to get started. Our script handles everything for you.
For those who want more control over the setup process.
We provide a script that automates the entire setup process. This is the recommended method for most users.
Run the Setup Script
Open your terminal and run the following command from the project root:
This script will:
uv
.pnpm
.You're Ready!
Once the script finishes, your development environment is ready to go!
If you prefer to set up your environment manually, follow these steps.
Before you start the services, you need to configure your environment variables. GAIA uses .env
files to manage these settings.
Copy Example Files
We provide example files to get you started. Copy them to create your own .env
files:
Fill in Your Secrets
Edit the newly created .env
files and fill in your API keys and other secrets.
For a detailed explanation of all the available environment variables, see the Environment Variables Reference.
Start Docker Services
GAIA relies on several services that run in Docker containers. You have two options:
Option 1: Start all services (including frontend in Docker)
Option 2: Start only backend services (recommended for development)
Why use backend-only profile?
Running the frontend in Docker can introduce slight latency and slower hot reloading. For the best development experience, we recommend using the backend-only
profile and running the frontend manually with pnpm dev
(see Frontend Setup below).
Create Virtual Environment
Create and activate a Python virtual environment:
Install Backend Dependencies
We use uv
for fast dependency management. Install the required packages:
Navigate to Frontend Directory
Install Frontend Dependencies
We use pnpm
for managing frontend packages. Install them with:
Start Development Server (Recommended)
For the best development experience with fast hot reloading, run the frontend manually:
This will start the Next.js development server on http://localhost:3000
with optimized hot reloading.
Performance Tip: Running the frontend outside Docker provides faster hot reloading and better performance during development. The frontend will automatically connect to the backend services running in Docker.
Return to Root Directory
After completing the setup, here’s how to start your development environment:
Start Backend Services
Start only the backend services and databases using the backend-only profile:
This starts:
Start Frontend Development Server
In a separate terminal, navigate to the frontend directory and start the development server:
The frontend will be available at http://localhost:3000
with optimized hot reloading.
Verify Setup
If you prefer to run everything in Docker (including the frontend):
Performance Note: This approach may result in slower hot reloading for frontend development compared to running the frontend manually with pnpm dev
.
To stop all running Docker services:
To stop and remove all data (reset everything):