OpenAI-compatible gateway and admin UI for running vLLM and llama.cpp inference engines on your own infrastructure. Built and maintained by Aulendur Labs.
- OpenAI-compatible
/v1/chat/completions,/v1/completions,/v1/embeddings, streaming with TTFT metrics - Scoped API keys, organizations and users; rate and concurrency limits; usage metering
- One managed container per model on vLLM
v0.28.0or llama.cppserver-cuda-b10731(pinned inversions.env; per-modelengine_imageoverride), dry-run of the exact command, readiness tracking with failure reasons, recipes, GGUF inspection - Admin UI with System Monitor (host, GPU, per-model metrics) and a Chat Playground
- Prometheus metrics (model containers discovered through the gateway), Alembic migrations at startup, transfer bundles (engine images, models, the program itself) for air-gapped hosts, offline rebuilds
sudo apt-get install -y make docker.io docker-compose-plugin curl jq
sudo mkdir -p /var/cortex/{models,hf-cache,exports} && sudo chown -R 1000:1000 /var/cortex
cp .env.example .env # optional: paths and ports
make quick-start # build + up; asks for the admin username/password onceOpen http://<HOST_IP>:3001/login (the IP is printed; do not use localhost from other
devices), sign in with the credentials you chose (make setup-admin changes them), create an
API key, add a model. Full walkthrough:
docs/getting-started/quick-start.md -
START_HERE.md is the five-minute version.
curl -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
http://<HOST_IP>:8084/v1/chat/completions \
-d '{"model":"<served name>","messages":[{"role":"user","content":"Hello!"}]}'cp .env.example .env # set CORS_ALLOW_ORIGINS; `make up` generates the secrets and asks for the admin login
make build ENV=prod # cortex-gateway:<version>, cortex-frontend:<version> (next build)
make prod-check # fails on default secrets, :latest tags, drift between versions.env and config.py
make up ENV=prodTLS reverse proxy (Caddy example), firewall and the security checklist: docs/operations/production-deployment.md.
make prepare-offline # connected host: program bundle (pinned images + built Cortex + deps images + wheels)
make load-offline BUNDLE=/media/usb/cortex-offline-bundle # air-gapped host (or Transfer → Import in the UI)
make verify-offline
echo OFFLINE_MODE=true >> .env && make prod-check && make up ENV=proddocs/operations/offline-deployment.md.
make help |
all targets |
make up / make down / make restart |
the compose stack (model containers keep running across down) |
make ps, make health, make monitoring-status |
status |
make logs SERVICE=gateway, make logs-models |
logs |
make test-backend, make test-frontend, make test-live GGUF=<path> |
tests (backend unit tests, frontend vitest + typecheck, live llama.cpp inference) |
make migrate |
re-run Alembic migrations |
make db-backup, make db-restore BACKUP_FILE=... |
database |
make clean-models |
remove all model containers |
make versions |
pinned images from versions.env, config.py, compose and the offline manifest |
make validate, make test-external-access, make setup-firewall |
network diagnostics |
- Docs site: https://aulendurforge.github.io/Cortex/ (source in
docs/;mkdocs build --strict) - Models: model management, vLLM, llama.cpp, custom args/env, GGUF, Nemotron 3 Super example
- Operations: runbooks, backup & restore, network access, Makefile guide
- Configuration, Security, Admin API
make up # dev stack: hot-reloading frontend, gateway image cortex-gateway:dev
make test-backend # pytest inside the gateway container (unit + integration against it)
docker exec cortex-gateway-1 python -m pytest src/tests -q -m "not live and not integration"
cd frontend && npm ci && npm run typecheck && npm test && npm run build
python3 scripts/gen-engine-flag-tables.py --check # engine docs match backend/src/engines/spec.pyCI (.github/workflows/ci.yml) runs backend unit tests with Postgres, frontend typecheck/tests/build,
both Docker image builds, compose validation and mkdocs build --strict on every pull request.
make targets only touch resources labelled for Cortex: compose project cortex, containers
with cortex.managed=1, volumes/networks prefixed cortex_, and locally built images. Other
containers on the host are never affected. Model files under /var/cortex/models are never
deleted by Cortex.
See CHANGELOG.md. Copyright © 2026 Aulendur Labs. See LICENSE.txt and NOTICE.txt.

