Local services
Run the API and workers with Docker-backed persistence.
On this page
Start persistence
docker compose -f docker-compose.testnet.yml up -d
pnpm install
pnpm buildThe testnet compose stack starts MongoDB with a one-member replica set and Redis. MongoDB listens locally on 27018, Redis on 6380. Database state lives in the Docker volume; there is no native MongoDB data folder to maintain.
Configure the root environment
PORT=3002
MONGO_URL=mongodb://127.0.0.1:27018/termbook_testnet_upgradeable?replicaSet=rs0&directConnection=true
REDIS_URL=redis://127.0.0.1:6380
MONAD_CHAIN_ID=10143
AUTH_DOMAIN=api.termbook.local
PUBLIC_API_BASE=http://127.0.0.1:3002Add the current deployment addresses, finalized deployment block, public RPC and collateral/feed configuration from deployments/testnet.json. server/.env.example documents available variables. Keep API keys and signer keys in the ignored root environment or approved key files, not in docs or public manifests.
Start API & workers
node --env-file=.env server/dist/server.jsnode --env-file=.env server/dist/worker.jspnpm dev:clientThe client runs on 4178. /health confirms API process health. /ready additionally checks fresh finalized indexing and healthy risk scans; a running server does not necessarily mean lending services are ready.
What persists
| Location | Contents |
|---|---|
| MongoDB Docker volume | Intents, credits, integration validation, indexed events, queues and operation progress. |
| Redis | Queue coordination when configured; MongoDB provides the durable fallback queue. |
| deployments/testnet.json | Public deployed addresses and completed setup configuration. |
| .testnet/ | Private operational wallet keys. Do not publish or delete funded identities casually. |
| .data/operations | Active signed-transaction journals created before broadcast; completed temporary journals are removed. |
Deleting a database volume resets local application state, not blockchain state. Rescanning restores finalized indexed events, but it cannot recreate arbitrary private authoring data or lost wallet keys.