Skip to content

Installation

Server

HiveGuard is distributed as a Docker image. The recommended way to run it is Docker Compose.

Terminal window
git clone https://github.com/your-org/hiveguard
cd hiveguard
docker compose up --build -d

The docker-compose.yml starts:

  • api — FastAPI server on port 8000
  • db — PostgreSQL
  • redis — session cache and config store

From source (development)

Terminal window
git clone https://github.com/your-org/hiveguard
cd hiveguard
uv sync --frozen --extra dev
uv run uvicorn hiveguard.main:app --reload

Requires PostgreSQL and Redis running locally. Set environment variables:

Terminal window
export DATABASE_URL=postgresql+asyncpg://user:pass@localhost/hiveguard
export REDIS_URL=redis://localhost:6379
export TARGET_URL=http://localhost:8080
export SECRET_KEY=dev-secret
export DASHBOARD_USERNAME=admin
export DASHBOARD_PASSWORD=admin

CLI

Terminal window
pip install hiveguard-cli
# or
uv pip install hiveguard-cli

pipx (isolated, no venv management)

Terminal window
pipx install hiveguard-cli

From the monorepo

Terminal window
uv pip install -e apps/cli

Verify

Terminal window
hiveguard --version
hiveguard health

Dashboard

The dashboard SPA is embedded in the server. Open http://localhost:8000/dashboard in your browser and log in with your DASHBOARD_USERNAME / DASHBOARD_PASSWORD.

No separate installation needed.

Environment variables

VariableRequiredDefaultDescription
TARGET_URLyesThe upstream service HiveGuard proxies to
DATABASE_URLyesPostgreSQL async URL (postgresql+asyncpg://...)
SECRET_KEYyesRandom string for session signing
DASHBOARD_USERNAMEyesHTTP Basic username for dashboard access
DASHBOARD_PASSWORDyesHTTP Basic password for dashboard access
REDIS_URLnoredis://redis:6379Redis connection URL
LOG_LEVELnoINFOPython logging level