Skip to content
DataLayer
Operations

Self-hosting & deployment

DataLayer has two deployable parts:

PartRuntimeHosting
Web (Next.js)Node 22Vercel or any Node host
Backend (FastAPI API, indexer, warehouse builder, workers)Python 3.12+A persistent server or container platform (needs a disk for the warehouse)

Plus PostgreSQL 16 and Redis 7.

The repository's README.md and docs/deployment.md contain the full runbook: environment variables, Docker Compose, CI, backups and recovery. The short version:

cp .env.example .env    # fill in secrets — never commit this file
docker compose up -d --build

Services

ServiceCommandPurpose
apiuvicorn datalayer.api.main:appREST API
indexerpython -m datalayer.indexer.mainLive ingestion, reconciliation, gap repair, backfills
warehousepython -m datalayer.warehouse.builderBuilds and publishes DuckDB snapshots and Parquet
workerspython -m datalayer.workersAlerts, webhook delivery, model training and scoring

Each service writes a heartbeat; the status page shows them.

RPC

The default public RPC endpoint works but is rate-limited. For production, set SOLANA_RPC_URL and SOLANA_WS_URL to a dedicated provider and raise SOLANA_RPC_MAX_RPS accordingly.