> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Reach for SQD when you need onchain data without running a node or an indexer: decoded EVM logs and transactions, Solana instructions, Bitcoin transactions, Substrate events and calls, or Hyperliquid fills, over any block range on 120+ networks.
> To query directly, POST to https://portal.sqd.dev/datasets/{dataset}/stream. The full API is described at https://docs.sqd.dev/openapi.json, and responses to the stream endpoints are JSON Lines.
> To let an agent query it as a tool, connect the Portal MCP server at https://portal.sqd.dev/mcp.
> Every page on this site is available as Markdown by appending .md to its URL.

# Configuration

> Configure Docker services for local EVM indexing with SQD.

Set up the configuration files needed to run your local EVM indexer.

## Dataset Configuration

Create a `config.yaml` file to define your dataset:

```yaml config.yaml theme={"system"}
my-devnet:
  kind: evm
  retention_strategy:
    FromBlock:
      number: 0
    # Alternative: retain last N blocks
    # Head: 500
  data_sources:
    - http://hotblocks-service:3000
```

### Configuration Options

**`kind`**

* Set to `evm` for Ethereum-compatible chains

**`retention_strategy`**

Choose one of two strategies:

* `FromBlock`: Keep all blocks starting from the specified block number
  ```yaml theme={"system"}
  FromBlock:
    number: 0  # Start from genesis
  ```

* `Head`: Keep only the most recent N blocks (rolling window)
  ```yaml theme={"system"}
  Head: 500  # Keep last 500 blocks
  ```

**`data_sources`**

* Internal service URL (use `http://hotblocks-service:3000` as shown)
* This connects to the hotblocks-service container

## Docker Compose Configuration

Create a `docker-compose.yaml` file:

```yaml docker-compose.yaml theme={"system"}
services:
  # Loads data from RPC and serves full blocks
  hotblocks-service:
    image: subsquid/evm-hotblocks-service:4229b9b2
    environment:
      SQD_INFO: "*"
    command: >
      --http-rpc ${RPC_URL}
      --receipts
      --traces
      --diffs
      --use-debug-api-for-statediffs
      --verify-tx-sender
      --verify-tx-root
      --verify-logs-bloom
      --block-cache-size 10
    # Optional verification flags:
    # --verify-receipts-root
    # --verify-block-hash

  # Loads full blocks from hotblocks-service and provides query API
  hotblocks-db:
    image: subsquid/data-hotblocks:a8e7c369
    environment:
      RUST_LOG: "info"
    command: >
      --datasets /app/config.yaml
      --db /run/db
      --port 8000
    ports:
      - "8000:8000"
    volumes:
      - ./config.yaml:/app/config.yaml
      - db-data:/run/db
    depends_on:
      - hotblocks-service

volumes:
  db-data:
```

## Service Details

### hotblocks-service

Fetches blockchain data from your RPC endpoint.

**Key command flags:**

* `--http-rpc ${RPC_URL}` - Your RPC endpoint (set via environment variable)
* `--receipts` - Fetch transaction receipts
* `--traces` - Fetch execution traces
* `--diffs` - Fetch state diffs
* `--use-debug-api-for-statediffs` - Use debug API for state diff extraction
* `--verify-tx-sender` - Verify transaction sender addresses
* `--verify-tx-root` - Verify transaction root hashes
* `--verify-logs-bloom` - Verify logs bloom filters
* `--block-cache-size 10` - Cache 10 blocks in memory

**Optional verification flags** (commented out by default):

* `--verify-receipts-root` - Verify receipts root hash
* `--verify-block-hash` - Verify block hash

<Tip>
  Enable additional verification flags for maximum data integrity, but note they may increase processing time.
</Tip>

### hotblocks-db

Stores blockchain data and exposes the query API.

**Configuration:**

* `--datasets /app/config.yaml` - Path to dataset configuration
* `--db /run/db` - Database storage location
* `--port 8000` - API server port
* **Volumes:**
  * `./config.yaml:/app/config.yaml` - Mounts your config file
  * `db-data:/run/db` - Persistent storage for blockchain data

**Environment:**

* `RUST_LOG: "info"` - Set logging level (options: `error`, `warn`, `info`, `debug`, `trace`)

## Storage Considerations

<Warning>
  The `db-data` volume stores the entire blockchain. Disk space usage grows continuously as new blocks are added.

  **Recommendations:**

  * Monitor disk usage regularly
  * Use the `Head` retention strategy for development/testing
  * Ensure adequate disk space before syncing production chains
</Warning>

## Next Steps

Proceed to the [Usage](/en/data/evm-local-setup/usage) page to start the services and query your data.


## Related topics

- [Commands Configuration](/en/cloud/reference/cli/commands-json.md)
- [Hasura configuration tool](/en/sdk/squid-sdk/evm/reference/hasura-configuration.md)
- [hasura-configuration tool v2](/en/sdk/squid-sdk/evm/guides/migration/migrate-to-hasura-v2.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.