Docker Setup

Run Hyperagent with Docker Compose for a complete, isolated environment with all services included.

Overview

Docker Compose provides the easiest way to run Hyperagent with all dependencies. It includes PostgreSQL, Redis, and the backend API in isolated containers.

Prerequisites

Docker 24.0+

Required for containerized deployment

Docker Compose 2.20+

Comes with Docker Desktop

API Keys

Gemini API key, Thirdweb credentials

Quick Start

Start all services with Docker Compose:

Terminal
# Clone repository
git clone https://github.com/Hyperkit-Labs/HyperAgent.git
cd HyperAgent

# Copy environment file
cp env.example .env

# Edit .env with your API keys
nano .env

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

First Build

The first build may take 25-45 minutes as it downloads dependencies and builds images. Subsequent builds use cached layers and are much faster (5-15 minutes).

Configuration

Configure environment variables in the `.env` file:

Terminal
# Required - LLM
GEMINI_API_KEY=your_gemini_api_key

# Required - x402 (Avalanche)
THIRDWEB_CLIENT_ID=your_client_id
THIRDWEB_SECRET_KEY=your_secret_key
THIRDWEB_SERVER_WALLET_ADDRESS=0x...
MERCHANT_WALLET_ADDRESS=0x...

# Database (auto-configured in Docker)
DATABASE_URL=postgresql://postgres:postgres@postgres:5432/hyperagent

# Redis (auto-configured in Docker)
REDIS_URL=redis://redis:6379