Quickstart Guide
Deploy a complete local instance of Flit with Docker Compose in under five minutes. This guide walks you through configuration, database migrations, administrator bootstrapping, and making your first routed API call.
Step 1: Clone Repository
Clone the Flit repository including its pinned submodules:
git clone --recurse-submodules https://github.com/RytQlk/flit.git
cd flit
Step 2: Initialize Runtime Secrets & Environment
From the repository root, copy the base environment file and run the automated runtime secret provisioning script:
cp src/deployment/docker/.env.example src/deployment/docker/.env
python3 scripts/setup_runtime_secrets.py
The interactive setup generates individual, file-based secrets under src/deployment/docker/secrets/:
litellm_master_key: Private upstream gateway management key (kept private behind Nginx).litellm_salt_key: Cryptographic salt for virtual key hashing and token storage.postgres_password: PostgreSQL cluster password.redis_password: In-memory store authentication password.aquila_cookie_encryption_key: 32-byte Fernet key for encrypting browser session cookies.aquila_bootstrap_admin_password: Initial password for the localadminuser.
python3 scripts/setup_runtime_secrets.py --validate-only
Step 3: Run Database Migrations
Execute upstream LiteLLM schema migrations followed by Flit's core migrations:
cd src/deployment/docker
docker compose --profile migration run --rm litellm-migrate
docker compose --profile migration run --rm aquila-migrate
Step 4: Launch the Flit Stack
Start all runtime services (Nginx reverse proxy, LiteLLM gateway, Flit web application, PostgreSQL, and Redis):
docker compose up -d --wait --wait-timeout 300
Verify that all containers are healthy:
docker compose ps
http://localhost:4000/admin in your browser. Log in with username admin and the password stored in secrets/aquila_bootstrap_admin_password. You will be prompted to change your password immediately upon first login.
Step 5: Send Your First Inference Request
Once you have configured a provider deployment and issued a virtual key in the admin console, dispatch requests through Nginx at http://localhost:4000/v1/chat/completions. Use the virtual model selector aquila to let Flit automatically route to the optimal tier:
curl -X POST http://localhost:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-virtual-key" \
-d '{
"model": "aquila",
"messages": [
{"role": "user", "content": "Explain the difference between TCP and UDP in two sentences."}
]
}'
aquila-fast, aquila-smart, or aquila-power).