The official hosted qntm gateway runs at https://gateway.corpo.llc.
It is a separate Cloudflare Worker trust boundary from the relay at https://inbox.qntm.corpo.llc.
This worker can decrypt gateway-provisioned API credentials in order to execute approved requests, so some users will prefer to run their own copy. The source is in gateway-worker/, and the AIM UI can point at any compatible deployment.
- Cloudflare account with the
qntm.corpo.llczone, or your own zone for a self-hosted deployment - Node.js 22
wrangleraccess viawrangler loginorCLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_ID- A 32-byte vault key for at-rest secret encryption
Generate a vault key once and keep it stable across deploys:
openssl rand -hex 32- Build the shared client package.
cd client
npm ci
npm run build- Install and validate the worker.
cd ../gateway-worker
npm ci
npm test
npm run typecheck- Set the vault secret.
printf '%s' "$GATE_VAULT_KEY" | npx wrangler secret put GATE_VAULT_KEY- Deploy the worker.
npx wrangler deploy- Verify the deployment.
curl https://gateway.corpo.llc/healthExpected response:
{"status":"ok","service":"qntm-gateway"}The committed gateway-worker/wrangler.toml already targets:
- Worker name:
qntm-gateway - Custom domain:
gateway.corpo.llc - Relay URL:
https://inbox.qntm.corpo.llc
The repo includes .github/workflows/deploy-gateway.yml for repeatable deploys from main.
Configure these repository secrets before enabling the workflow:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDQNTM_GATE_VAULT_KEY
The workflow builds client/, runs gateway tests and typechecking, upserts GATE_VAULT_KEY, then deploys the worker.
To run your own gateway:
- Copy
gateway-worker/wrangler.tomland replace the custom domain route with your own hostname. - Keep
DROPBOX_URLpointed at the relay you want to trust. - Set your own
GATE_VAULT_KEY. - Deploy with
npx wrangler deploy.
Then point clients at your endpoint:
- AIM UI: set
VITE_DEFAULT_GATEWAY_URL=https://your-gateway.exampleat build time, or override theGateway serverfield in the UI. - Local AIM development still defaults to
http://localhost:8080. - Terminal and Python clients already take an explicit gateway URL when promoting or executing gateway flows.
- Rotating
GATE_VAULT_KEYwithout re-encrypting stored secrets will strand previously provisioned credentials. - The gateway stores conversation-specific state in Durable Objects. Redeploying code is fine; deleting DO state is not.
GET /healthis the only intended unauthenticated public endpoint. All conversation control flow goes through signed qntm messages.