Kite

Running in production

Deploying, securing, upgrading and backing up a Kite server.

Mainnets

A server with KITE_IS_TESTNET unset or false offers these networks: Ethereum, OP Mainnet, BNB Smart Chain, Polygon, Robinhood Chain, Base, Arbitrum One and Monad. Each needs your own Kite factory deployed on it before it can be configured.

Deploying

Kite is one process and a Postgres database. The Docker image is the simplest way to run it:

docker build -t kite-server .
docker run -d --restart unless-stopped -p 3000:3000 --env-file .env kite-server

Put it behind a reverse proxy or load balancer that terminates HTTPS, and set KITE_PUBLIC_BASE_URL to the public HTTPS URL. Use a managed Postgres, or one you back up.

Background work, such as settling transfers and delivering webhooks, runs in the same process on a queue kept in Postgres, so there's nothing else to run.

Checklist

  • Strong, unique KITE_ROOT_KEY and KITE_ENCRYPTION_KEY, kept in a secret manager.
  • A dedicated operator mnemonic, set as the operator of your Kite factory on each chain.
  • A settlement address you control on each chain.
  • Your own RPC URLs on each chain.
  • A deposit notifier and a gas sponsor on each chain, and KITE_PUBLIC_BASE_URL reachable from the internet.
  • Apps use API keys with only the scopes they need, never the root key.
  • Webhooks verified with their signing secret.
  • KITE_ENABLE_DASHBOARD=false if nobody should reach the dashboard from this URL; the checkout stays up.

Upgrading

Pull the new version and restart. The Docker image applies migrations as it starts; from source, run them yourself first:

git pull
bun install && bun install --cwd client
bun run migrate
bun run build
bun run start

Always use bun run migrate. Some releases need data upgrades it runs after the schema migrations.

Backups

Back up the database and keep KITE_ENCRYPTION_KEY with it: without the key, the provider keys and webhook secrets in a backup can't be read. Funds are never in the database; they're on-chain, in each transfer's contract until it settles or refunds.

Monitoring

  • GET /api/overview/info with the root key answers when the server and database are up.
  • Watch your gas sponsor's balance or policy limits, so settlements don't stall.
  • Failed webhook deliveries are listed on each webhook in the dashboard.

On this page