Run the services
Start the API, settlement keeper, and managed maker workers.
On this page
Prepare the workspace
Use pnpm, Bun, and Node with support for --env-file-if-exists. Contract builds additionally require the pinned Solana, Anchor, Rust, and Arcium toolchains.
pnpm install --frozen-lockfile
node scripts/build-package.mjs bindings schema sdk maker-sdkCreate a root .env.local from .env.example if you do not already have one. All configured file paths resolve from the repository root.
Configure the services
| Setting | Purpose |
|---|---|
| SOLANA_RPC_URL | Server and worker RPC endpoint. |
| DEPTH_ENVIRONMENT | Selected environment; devnet for these guides. |
| DEPTH_DEVNET_MANIFEST_PATH | Signed deployment JSON served by the API. |
| DEPTH_KEEPER_KEYPAIR_PATH | Funded signer for settlement transactions. |
| DEPTH_AUTOMATION_SECRET | 32 random bytes encoded as hex for the maker registry. |
| DEPTH_VIEW_RELAY_ENABLED | Set true to sponsor authorized private reads. |
| PYTH_ORACLE_MODE | sponsored reads the feed; hermes enables the publisher. |
Hermes publishing also needs PYTH_API_KEY. Sponsored mode requires no Hermes key; stale source data still stops trading. Keep signer files and environment secrets private.
Start and stop
pnpm services:start
pnpm services:status
pnpm services:stopThe supervisor manages the API, keeper, maker workers, and client. To run individual processes, use separate terminals:
pnpm --dir server start
pnpm --dir server keeper
pnpm maker
pnpm devMonitor readiness
| Endpoint | Checks |
|---|---|
| GET /health | API liveness. |
| GET /ready | Workers, oracle freshness, funding, market status, and quotes. |
| Keeper /healthz · default port 8786 | Keeper process health. |
| Maker /healthz · default port 8789 | Maker supervisor health. |
Keep durable state
- Back up data/maker and the automation secret together.
- Mount durable worker storage when hosting.
- Use one supervisor per registry and one worker per maker/hedge account.
- Set SOLANA_RPC_RPS within the provider’s request allowance.
Runtime logs and process state live in data/runtime. Local managed services need the host to remain awake; public hosting is configured separately.