Skip to content
Termbook
Operators

Local services

Run the API and workers with Docker-backed persistence.

On this page

Start persistence

From the repository root
docker compose -f docker-compose.testnet.yml up -d
pnpm install
pnpm build

The 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

.env · local service values
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:3002

Add 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

Terminal 1 · API
node --env-file=.env server/dist/server.js
Terminal 2 · worker
node --env-file=.env server/dist/worker.js
Terminal 3 · client
pnpm dev:client

The 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

LocationContents
MongoDB Docker volumeIntents, credits, integration validation, indexed events, queues and operation progress.
RedisQueue coordination when configured; MongoDB provides the durable fallback queue.
deployments/testnet.jsonPublic deployed addresses and completed setup configuration.
.testnet/Private operational wallet keys. Do not publish or delete funded identities casually.
.data/operationsActive 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.

Documentation
8 results

Let’s talk

Tell us what you have in mind.

Supply liquidity