This guide walks you through running the entire Astera stack locally with a single command. It is the fastest way to get the contracts, frontend, indexer, oracle, and compliance services running together against a local Stellar network.
That's it. Docker Compose builds the Rust contracts, the Next.js frontend, the indexer, and the off-chain services for you — you do not need Rust, Node, or the Stellar CLI installed locally to run the stack.
From the repository root:
docker compose up --buildThis starts:
| Service | URL / Port | Purpose |
|---|---|---|
stellar |
http://localhost:8000 | Local Stellar quickstart network (RPC+Horizon) |
contracts |
— | Builds & deploys all contracts, writes IDs |
frontend |
http://localhost:3000 | Next.js 14 app (Freighter wallet) |
mock-service |
http://localhost:4000 | Mock REST API (json-server) |
indexer-postgres |
localhost:5433 | Postgres for the off-chain indexer |
indexer |
http://localhost:3001 | Event indexer + read API |
oracle-service |
— | Invoice verification oracle |
compliance-service |
— | Compliance screening service |
The stellar container must be healthy before contracts deploy, and contracts
must finish deploying before the frontend starts. Compose encodes these
dependencies, so a plain docker compose up brings everything up in order.
The contracts service runs scripts/deploy-local.sh, which builds all 14
contracts and writes their IDs to a shared /contract-ids/env volume that the
frontend and services consume. The deployed contracts are:
access_control, arbitration, auction, compliance, credit_score,
governance, insurance, invoice, oracle_registry, pool, referral,
secondary_market, share, and tranche.
Reset everything (including chain state):
docker compose down -v
docker compose up --buildRebuild only the contracts after a Rust change:
docker compose up --build contractsView contract logs:
docker compose logs -f contractsFrontend environment file: the local frontend reads contract IDs from the
shared volume automatically. If you deploy manually (outside Compose), copy
frontend/.env.example to frontend/.env.local and fill in the contract IDs.
If you prefer to build and deploy contracts yourself, see
Testnet Deployment Guide and
Smart Contract Interaction Guide. The local
commands are identical except the network is Standalone Network ; February 2017
with RPC http://localhost:8000/soroban/rpc.
- Frontend shows empty contract IDs: the
contractscontainer hasn't finished deploying yet. Wait fordocker compose logs contractsto printContract IDs written to .... stellarcontainer unhealthy: first run can take up to a minute to initialize. Give it time; Compose retries 20 times.- Port already in use: stop whatever is bound to 8000/3000/4000/3001/5433,
or edit the port mappings in
docker-compose.yml.