Hadrian is experimental alpha software. Do not use in production.
Hadrian

Getting Started

Install and configure Hadrian Gateway in minutes

Get Hadrian Gateway running in under a minute. No complex setup required.

Quick Start

# Download and run (creates config automatically)
cargo install hadrian
hadrian

# Or with a custom config
hadrian --config hadrian.toml

Using Docker

# Quick start with OpenRouter (access 100+ models)
docker run -p 8080:8080 -e OPENROUTER_API_KEY=sk-... ghcr.io/ScriptSmith/hadrian

# Or with your own config file
docker run -p 8080:8080 -v ./hadrian.toml:/etc/hadrian/hadrian.toml ghcr.io/ScriptSmith/hadrian

The gateway starts at http://localhost:8080 with the chat UI. No database required for basic use.

Zero-Config Mode

Running hadrian without arguments automatically:

  • Creates ~/.config/hadrian/hadrian.toml with sensible defaults
  • Uses SQLite at ~/.local/share/hadrian/hadrian.db
  • Opens browser to the chat UI on first run

This is perfect for local development and single-user setups.

Custom Configuration

Generate a starter config file:

hadrian init --output my-config.toml

Or create a minimal hadrian.toml:

[providers.openai]
type = "open_ai"
api_key = "${OPENAI_API_KEY}"

Environment variables are interpolated using ${VAR_NAME} syntax. Never commit API keys to version control.

See the Configuration guide for all options.

Docker Compose Deployments

For persistent deployments, use the configurations in the deploy/ directory:

cd deploy

# Development (SQLite - simplest)
docker compose -f docker-compose.sqlite.yml up -d

# Development with caching (SQLite + Redis)
docker compose -f docker-compose.sqlite-redis.yml up -d

# Production (PostgreSQL + Redis)
cp .env.example .env
# Edit .env with your API keys and passwords
docker compose -f docker-compose.postgres.yml up -d

Available Configurations

ConfigurationUse Case
sqlite.ymlDevelopment, single-user
sqlite-redis.ymlDevelopment with rate limiting
postgres.ymlProduction, single-node
production.ymlFull production stack (HA, monitoring, auth)

See the Docker Deployment guide for details, or Advanced Deployment for high availability setups.

Verify Installation

Once running, verify everything is working:

# Check health endpoint
curl http://localhost:8080/health

# List available models
curl http://localhost:8080/v1/models

# Access the web UI
open http://localhost:8080

# View API documentation
open http://localhost:8080/api/docs

Building from Source

git clone https://github.com/ScriptSmith/hadrian.git
cd hadrian/gateway
cargo build --release
./target/release/hadrian

Next Steps

On this page