Getting Started
Run FlowIndex locally using Docker Compose.
This guide walks you through running a local FlowIndex instance with Docker Compose. By the end you will have the backend indexer, frontend UI, and PostgreSQL database running on your machine.
Prerequisites
- Docker (v20.10+)
- Docker Compose (v2.0+)
- At least 4 GB of free RAM (8 GB recommended)
Quick Start
1. Clone the repository
git clone https://github.com/Outblock/flowindex.git
cd flowindex2. Start all services
docker compose up -d --buildThis starts the following core services:
| Service | Port | Description |
|---|---|---|
frontend | localhost:5173 | Web UI (TanStack Start SSR) |
backend | localhost:8080 | Go API server + indexer |
db | localhost:5432 | PostgreSQL database |
Additional services (Supabase auth stack, developer portal, etc.) are also started automatically.
3. Verify the backend is running
curl http://localhost:8080/healthExpected response:
{"status":"ok"}4. Check indexing status
curl http://localhost:8080/statusThis returns a JSON object with indexing progress, including:
{
"chain_id": "flow",
"latest_height": 142610500,
"indexed_height": 142610498,
"progress": "99.98%",
"behind": 2,
"total_blocks": 1500000,
"total_transactions": 3200000,
"status": "ok"
}5. Open the frontend
Navigate to http://localhost:5173 in your browser. You should see the FlowIndex explorer with blocks appearing in real time.
Viewing Logs
# Backend logs (indexer + API)
docker compose logs -f backend
# Frontend logs
docker compose logs -f frontend
# Database logs
docker compose logs -f dbStopping Services
docker compose downTo also remove stored data (database volumes):
docker compose down -vLocal Development (Without Docker)
Backend
cd backend
go mod download && go mod tidy
# Build
CGO_CFLAGS="-std=gnu99" CGO_ENABLED=1 go build -o indexer main.go
# Run (requires a running PostgreSQL instance)
DB_URL=postgres://flowscan:secretpassword@localhost:5432/flowscan \
FLOW_ACCESS_NODE=access-001.mainnet28.nodes.onflow.org:9000 \
PORT=8080 \
./indexerFrontend
cd frontend
# Install dependencies
bun install
# Start dev server
bun run devThe frontend dev server starts at http://localhost:3000 and connects to the backend at http://localhost:8080 by default.
Database
If running outside Docker, create the database and apply the schema:
createdb flowscan
psql postgres://flowscan:secretpassword@localhost:5432/flowscan < backend/schema_v2.sqlOr use the built-in migration command:
./indexer migrateNext Steps
- Architecture -- Understand how the ingestion pipeline works
- Configuration -- Tune environment variables for your setup
- API Reference -- Explore the REST API