> ## 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 130+ 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.

# addons.hasura section

> Configure the Hasura GraphQL addon for a squid deployment.

## Running Hasura

To provision a [Hasura](https://hasura.io) instance, add an empty `deploy.addons.hasura` section to the [deployment manifest](/en/cloud/reference/manifest). Provide some basic configuration:

```yaml theme={"system"}
deploy:
  env:
    HASURA_GRAPHQL_ADMIN_SECRET: "$\{\{ secrets.HASURA_SECRET \}\}"
    HASURA_GRAPHQL_UNAUTHORIZED_ROLE: user
    HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES: "true"
  addons:
    postgres:
    hasura:
```

Note the use of a [Cloud secret](/en/cloud/resources/env-variables#secrets) for storing the admin password.

## Configuring a Hasura API

### For a squid

Use the [Hasura configuration tool](/en/sdk/squid-sdk/evm/reference/hasura-configuration) for squids running dedicated Hasura instances. To make Cloud initialize Hasura configuration on squid restarts, make sure that the tool runs on squid startup by adding a `deploy.init` section to the manifest, e.g. like this:

```yaml theme={"system"}
deploy:
  init:
    env:
      HASURA_GRAPHQL_ENDPOINT: 'http://hasura:8080'
    cmd:
      - npx
      - squid-hasura-configuration
      - apply
```

See also the [Hasura section of the GraphQL guide](/en/sdk/squid-sdk/evm/guides/serving-graphql#hasura) and the [complete squid example](https://github.com/subsquid-labs/squid-hasura-example).

### For a DipDup indexer

[DipDup](https://dipdup.io) also configures Hasura automatically. See the [DipDup section](/en/sdk/alternative-clients/dipdup) for details.


## Related topics

- [Deployment Guide](/en/cloud/deployment-guide.md)
- [Scale section](/en/cloud/reference/scale.md)
- [Changelog](/changelog.md)
- [RPC addon](/en/cloud/resources/rpc-proxy.md)
- [Serving GraphQL](/en/sdk/squid-sdk/evm/guides/serving-graphql.md)
