Production operations
InferCrane is designed to run as multiple stateless gateway replicas backed by PostgreSQL. Each replica has a stableINFERCRANE_INSTANCE_ID and supervises its own loopback vLLM Router
processes. Router generations are scoped by instance, so one replica never publishes another
replica’s loopback endpoint.
Required configuration:
INFERCRANE_ENV=production: enables production security validation.INFERCRANE_DATABASE_URL: PostgreSQL URL with TLS enabled outside a trusted private network.INFERCRANE_API_KEY: at least 32 characters, supplied by the workload secret manager; no production default exists.INFERCRANE_URL: absolute HTTP(S) control-plane base URL used by lifecycle CLI commands.INFERCRANE_TLS_CERT_FILEandINFERCRANE_TLS_KEY_FILE: optional native server identity. Both are required together. AddINFERCRANE_TLS_CLIENT_CA_FILEto require and verify client certificates.INFERCRANE_PASSPORT_SIGNING_KEY_FILE: optional mounted Ed25519 private-key file for issuing Inference Passports, signing the built-in answer check’s quality evidence, and signing the reports of finished optimization runs. It must be readable only by its owner (0600); the private key is never persisted in PostgreSQL. Back it up and rotate it through the workload secret manager. Without it, Inference Passports are unavailable, optimization run reports are served unsigned, and each process signs built-in quality evidence with a key it generates at startup, so that key ID changes on restart. On platforms that inject secrets as environment variables, setINFERCRANE_PASSPORT_SIGNING_KEYto the key file’s contents instead. The container entrypoint writes it to an owner-only file under/tmp/infercrane-secrets, points the file variable at it, and removes the value from the server’s environment. Setting both variables is an error.
Hosted control plane on Fly.io
deploy/fly/control-plane.toml is the maintained single-machine hosted-control-plane profile. It
runs the Go API, gateway, reconciler, and durable-operation worker on a small CPU machine. It does
not run model inference and does not make Fly.io a GPU supplier. Managed model APIs, RunPod
Serverless, bounded Modal experiments, BYOC deployments, and connected endpoints remain behind
InferCrane’s provider contracts.
Use a Supabase session pooler connection string on port 5432 for this persistent IPv4 backend.
Keep sslmode=require in the URL. Direct database URLs may require IPv6; transaction pooling is
intended for transient or serverless clients and can change prepared-statement/session behavior.
The profile deliberately keeps one machine running. Auto-stop is unsafe for the background
reconciler and would interrupt durable work until another request arrived. Start with one machine
to minimize fixed cost; move to two machines only after completing the database-failover and
rolling-upgrade qualifications described below.
Configure secrets without printing or committing them:
RUNPOD_API_KEY, INFERCRANE_WORKER_CREDENTIAL_KEY, and
INFERCRANE_MANAGED_DEPLOYMENTS_ENABLED=true as Fly secrets. The RunPod
key is the platform’s supply credential, not a tenant BYOC credential. The worker credential key
gives each managed Pod its own credential; the control plane refuses to start with the flag set and
the key missing. Leave the flag absent or
false until current price ingestion, Stripe funding, auto-stop, provider deletion, and settlement
are all operational.
To let the dashboard and CLI deploy and optimize open Hugging Face models outside the reviewed
catalog, set INFERCRANE_HUGGING_FACE_METADATA_ENABLED=true. The control plane then needs outbound
HTTPS to huggingface.co and reads model metadata only when someone plans, checks, or proposes such
a model. Leave it unset to keep planning to reviewed models; see
Check any model automatically.
Give the control plane a stable signing key so built-in quality evidence keeps one key ID across
restarts and Inference Passports can be issued. Generate the key on a trusted machine, import it as
a Fly secret without printing it, then delete the local copy once it is backed up in your secret
manager:
INFERCRANE_CREDENTIAL_ENCRYPTION_KEY and INFERCRANE_WORKER_CREDENTIAL_KEY values of at least 32
bytes each. The first encrypts tenant provider credentials and optimization run notification
destinations at rest; the second derives
tenant-and-deployment-scoped worker credentials. Neither is a RunPod credential. Back them up and
rotate them through an explicit credential migration and controlled worker replacement. Keep the
operator RUNPOD_API_KEY separate. Customer deployments never receive the control plane’s global
API key.
The same worker credential key scopes every Pod on the operator’s own RunPod account, including
InferCrane Cloud Pods and the bootstrap operator’s own. Set it on any control plane that uses the
RunPod supply key.
Pods started before the key was set, or by a release that did not yet scope operator Pods, still
hold the control-plane API key. They keep serving and are still reached with that credential. To
finish the change, replace those deployments’ Pods (redeploy, or delete and create), confirm no Pod
on the RunPod account predates the change, and then rotate INFERCRANE_API_KEY. Rotating first
makes the older Pods unreachable.
The Fly Machine hostname is the default replica identity. Do not set INFERCRANE_INSTANCE_ID to
one shared value: two live replicas with the same identity would violate lease ownership and route
generation isolation. Set the variable only when the host supplies a different stable, unique
value for every replica.
The provider-neutral runtime requirements, scale-out gates, and Fly-to-ECS/Kubernetes exit path are
defined in Control-plane hosting. The maintained Fly
profile remains deliberately single-machine until those real failure and rolling-upgrade gates are
recorded as passing.
Use test-mode Stripe keys until the complete checkout, signed webhook, idempotent ledger-credit,
refund, and replay journey passes. The hosted verifier accepts either
INFERCRANE_HOSTED_AUTH_JWT_KEY from a secret manager or the file variant used by mounted-secret
platforms, never both. A static Clerk PEM avoids a network dependency during request verification;
rotate it when the Clerk signing key changes.
Public hosted signup also requires INFERCRANE_HOSTED_AUTH_AUTO_PROVISION=true. After Clerk verifies
the session and active organization, InferCrane atomically creates a dedicated tenant for a new
organization, grants its first member administrator access, and maps later verified members without
changing existing roles or restoring revoked access. Leave this setting disabled for invite-only
or manually provisioned installations.
Leave INFERCRANE_OPERATOR_COMPUTE_TENANTS unset on the hosted control plane. It lets workspaces use
the control plane’s own provider accounts, which only fits a control plane that serves one
customer. Startup rejects the * value together with hosted sign-up or managed capacity.
On the hosted control plane, set INFERCRANE_ENV_SECRET_TENANTS only to the operator’s own workspace
IDs that keep env secret references, or leave it unset. Every other workspace is refused, because
an env reference reads this process’s environment, which holds the operator’s keys. Before turning
on a release with this rule, list the existing env references by workspace: those outside the
operator’s workspaces stop resolving and should be replaced.
For a test-mode Stripe account authenticated with the Stripe CLI, create or verify the fixed-price
prepaid catalog with scripts/bootstrap-stripe-prepaid.sh. The command is idempotent by product
name and denomination and prints the non-secret INFERCRANE_STRIPE_PRICE_IDS_JSON value. It never
creates recurring prices and never runs in live mode. Keep secret keys and webhook signing secrets
in the deployment secret manager.
The default Model API catalog is a deliberately small discovery shelf. It publishes model identity
and explicit unknown states, not managed availability or price claims. A hosted operator can load a
strict model-api-catalog/v1 file with INFERCRANE_MODEL_API_CATALOG_FILE to attach internal supply
contracts and InferCrane rate cards. Treat that file as an operational secret: it names the upstream
offers behind each model. The customer API collapses it to one infercrane-standard service offer,
standardizes price provenance, and omits internal offer IDs, regions, adapters, URLs, credentials,
and supplier identities. Invalid or incomplete priced entries fail control-plane startup.
Customer-wallet bindings additionally require a complete rate card with an RFC3339 expiry; the
control API rejects an incomplete one. Authorization fails before supplier transmission when the
immutable rate card has expired. Public catalog responses also stop emitting expired pricing and
downgrade availability to unknown until a fresh contract is installed. See
Managed Model API architecture for supply lanes, prepaid
credit, and the evidence boundary for capacity-derived pricing.
For a single-host first installation, copy .env.production.example to a private path, replace
every example secret and URL, then render and start the maintained production stack:
The example pins the published v2.0.2 image. Hosted documentation follows main, which may
describe work scheduled for the next release. Do not combine a release image with a newer schema
or configuration contract without following upgrade and compatibility.
compose.yaml, this stack contains no fake workers or development router. Unlike
compose.runpod-acceptance.yaml, it contains no fault proxy or acceptance credential. PostgreSQL
is private to the Compose network; only the InferCrane API port is published. The bundled database
generates a persistent, self-signed server certificate and requires an encrypted
sslmode=require connection across that bridge. This encrypts the single-host transport but does
not provide CA-backed server identity; use managed PostgreSQL with verify-full, external secret
management, and multiple control-plane instances for a production service that must survive a host
failure.
The base production stack is provider-neutral: it does not require a RunPod credential and does
not start SkyPilot. Provider adapters remain dormant until a DeploymentSpec selects them. The
image contains pinned AWS CLI v2, Google Cloud CLI, and kubectl clients because those are the
explicit process boundaries used by the AWS, GCP, and Kubernetes adapters; credentials and
kubeconfig are always supplied by the operator at runtime.
For RunPod, add the explicit production overlay and the variables from .env.runpod.example:
~/.runpod/config.toml, mode 600) without
printing the key; it no longer runs runpod config, which the runpod 2.x CLI removed. Native
RunPod Pods remain available while INFERCRANE_SKYPILOT_API=disabled; SkyPilot starts only for an
explicit provider manifest in an operator-owned overlay.
Native RunPod Pods and Serverless endpoints use RunPod’s REST API v2 at https://api.runpod.io/v2.
INFERCRANE_RUNPOD_REST_URL overrides that base, for example to route through the acceptance
fault proxy; leave it unset in production. RunPod retired REST v1 (https://rest.runpod.io/v1) on
2026-11-15 and that host no longer resolves, so a control plane built before this change cannot
create, observe, or delete RunPod resources. Upgrade it, then check the RunPod inventory for
resources it could not delete (see RunPod).
RunPod’s GPU price feed and stock check use https://api.runpod.io/graphql, which is a separate API.
InferCrane-paid GPU deployments remain disabled unless
INFERCRANE_MANAGED_DEPLOYMENTS_ENABLED=true is set explicitly in that private environment file.
When enabled, RunPod becomes internal InferCrane Cloud supply: the API requires a current exact
price, atomically holds sufficient prepaid wallet credit before queueing provider work, limits the
first self-serve product to one elastic GPU for 1–24 hours, and deletes resources before settling
actual runtime and releasing unused credit. BYOC requests cannot use this platform-owned provider
connection. See Managed deployments.
AWS and Kubernetes follow the same explicit composition pattern:
INFERCRANE_SKYPILOT_PROVIDERS_JSON; the entrypoint
then supervises its foreground API server and exits if that required subprocess stops.
INFERCRANE_INSTANCE_ID: stable and unique per control-plane replica.INFERCRANE_DATABASE_MAX_OPENandINFERCRANE_DATABASE_MAX_IDLE: size these with the total replica count below PostgreSQL’s connection budget or place PgBouncer in transaction mode.INFERCRANE_REQUEST_RETENTION_HOURS: bounds high-volume request-accounting storage; the default is 24 hours and cleanup runs in small batches.
/livez: process liveness; it does not depend on downstream services./readyz: PostgreSQL connectivity with a bounded timeout./metrics: Prometheus-format gateway request, failure, active request, byte, duration histogram, and operation claim, completion, failure, retry, and cancellation counters.
deploy/prometheus-rules.yaml from the repository, then tune thresholds
from real model latency and traffic. Follow the compatibility policy and perform
the backup/restore drill for every release containing migrations.
Use a disruption budget, topology spread constraints, anti-affinity across failure domains, and
at least two replicas. Termination grace must exceed INFERCRANE_SHUTDOWN_TIMEOUT_SECONDS so
streaming requests and buffered request accounting can drain. Do not configure an HTTP server
write timeout: it would terminate legitimate long-running streaming inference responses.
Each replica publishes its live binary and protocol interval. Use
infercrane system instances --output json before and during a rolling upgrade. Membership does not
elect a leader: durable operation claims are independently fenced in PostgreSQL. Configure CLI mTLS
with INFERCRANE_CLIENT_TLS_CA_FILE, INFERCRANE_CLIENT_TLS_CERT_FILE, and
INFERCRANE_CLIENT_TLS_KEY_FILE; Python SDK callers can pass ca_file, cert_file, and key_file.
Put private DNS, firewalls, and workload identity at the deployment boundary; TLS does not replace
network policy.
The production image includes InferCrane, the pinned upstream vLLM Router, the pinned SkyPilot
RunPod client, AWS CLI v2, and kubectl. Including provider clients does not select or configure a
provider. Development
workers and the simple development router exist only in the development image target and are
not performance or reliability substitutes for vLLM and vLLM Router.
Before rollout, qualify the exact PostgreSQL, vLLM, vLLM Router, model, GPU, and provider versions
with sustained load, streaming cancellation, worker loss, database failover, pod termination,
and soak tests. Capacity limits must be based on those measurements rather than defaults.
The control-plane API accepts the bootstrap bearer secret or hashed tenant-scoped credentials:
GET /api/v1/operations/{id}POST /api/v1/operations/{id}/cancelPOST /api/v1/deployments/applyPOST /api/v1/deploymentsDELETE /api/v1/deployments/{name}GET /api/v1/deploymentsGET|POST /api/v1/targetsGET /api/v1/orphansGET /api/v1/audit-eventsPUT /api/v1/tenant/quota- principal creation, rotation, and revocation endpoints