Skip to main content
The Steward is a lightweight agent that runs inside your infrastructure. It proxies LLM calls locally, writes request and response bodies to your S3 or GCS bucket, and sends only metadata to Majordomo Cloud. The dashboard works identically to the managed deployment.

How it fits together

  • Steward — runs in your VPC. Handles all LLM traffic. Writes bodies to your bucket. Reports metadata to Butler.
  • Butler + dashboard — runs in Majordomo’s cloud. Backs the web UI, manages API keys, dispatches replay and eval jobs. Never receives prompt content.

What you need

  • Docker (or Kubernetes) in your VPC
  • PostgreSQL 14+ (not bundled — use RDS, Cloud SQL, or self-managed)
  • An S3 bucket (AWS) or GCS bucket (GCP) for body storage
  • A Majordomo Enterprise account

Setup

This section covers running Steward in your VPC with Postgres and optional S3/GCS body storage.

Prerequisites

  • Docker (or Kubernetes)
  • PostgreSQL 14+
  • Optional: S3 or GCS bucket for body storage
  • Majordomo Enterprise account and a Steward token (mdm_st_...)

1) Build or pull the image

From source:
cd majordomo-steward
docker build -t majordomo-steward:latest .

2) Configure environment

Set the minimum required environment. You can pass these via docker run -e or your orchestrator.
export ENCRYPTION_KEY=<64-hex-bytes>          # required for encrypting secrets at rest
export POSTGRES_HOST=localhost
export POSTGRES_PORT=5432
export POSTGRES_USER=majordomo
export POSTGRES_PASSWORD=...
export POSTGRES_DB=majordomo_steward
Optional (defaults are sensible): LOG_LEVEL, PRICING_REMOTE_URL, PRICING_ALIASES_FILE, provider *_BASE_URLs.

3) Initialize the database

docker run --rm \
  -e ENCRYPTION_KEY -e POSTGRES_HOST -e POSTGRES_PORT \
  -e POSTGRES_USER -e POSTGRES_PASSWORD -e POSTGRES_DB \
  majordomo-steward:latest migrate

4) Register with Butler

Create a Steward token in the Majordomo dashboard or via the CLI (majordomo stewards create --name "prod"). The token has the format mdm_st_... and is shown once at creation time — store it in your secrets manager. Then:
docker run --rm \
  -e ENCRYPTION_KEY -e POSTGRES_HOST -e POSTGRES_PORT \
  -e POSTGRES_USER -e POSTGRES_PASSWORD -e POSTGRES_DB \
  majordomo-steward:latest register \
  --token $MDM_STEWARD_TOKEN \
  --butler-url https://butler.gomajordomo.com
This stores the encrypted token and org details for job dispatch and usage ingest.

5) Run Steward

docker run -d --name majordomo-steward \
  -p 7680:7680 \
  -e ENCRYPTION_KEY -e POSTGRES_HOST -e POSTGRES_PORT \
  -e POSTGRES_USER -e POSTGRES_PASSWORD -e POSTGRES_DB \
  majordomo-steward:latest
In the Web dashboard, set up Cloud Body Storage at the Personal or Organization scope. Steward will upload request/response bodies there; Majordomo receives metadata only.

7) Verify

Point your SDK at the Steward and send a test request with X-Majordomo-Key. The request should appear in the dashboard with tokens, cost, and latency.

Notes

What gets logged where

DataDestinationWho controls it
Prompt contentYour S3 / GCS bucketYou
Completion contentYour S3 / GCS bucketYou
Token counts, cost, latencyMajordomo CloudMajordomo
Provider API keysYour Steward’s Postgres, encrypted at restYou
For security questionnaire answers and a data flow diagram, see Security & Compliance.