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

# Deployment manifest

> Configure SQD Cloud services, addons, resources, variables, and deployment identity.

The deployment manifest is named `squid.yaml` by convention. It defines the Cloud deployment identity, build, services, addons, environment, and resource profiles used by [`sqd deploy`](/en/cloud/reference/cli/deploy).

<Warning>
  Use `manifest_version`, `slot` or `tag`, and `deploy.init` in new manifests.
  The older `manifestVersion`, numeric `version`, and `deploy.migrate` fields are
  accepted for backwards compatibility but are deprecated.
</Warning>

## Minimal manifest

```yaml title="squid.yaml" theme={"system"}
manifest_version: subsquid.io/v0.1
name: sample-squid

build:

deploy:
  addons:
    postgres:
  processor:
    cmd: ["sqd", "process:prod"]
  api:
    cmd: ["sqd", "serve:prod"]
```

With no `slot` or `tag`, `sqd deploy .` creates a new slot with a generated identifier. See [Slots and tags](/en/cloud/resources/slots-and-tags) before choosing a production deployment strategy.

## Header

| Field | Description | Required |
| - | - | - |
| `manifest_version` | Manifest schema. The supported value is `subsquid.io/v0.1`. | Yes |
| `name` | Squid name. Use 3 to 30 lowercase letters, numbers, or dashes. It cannot start or end with a dash. | Yes, unless supplied through the CLI |
| `slot` | Deploy to or update this slot. Use 2 to 6 lowercase letters, numbers, or dashes. | No |
| `tag` | Deploy to the slot currently carrying this tag. Use 2 to 32 lowercase letters, numbers, or dashes. | No |
| `description` | Reader-facing description shown in Cloud. | No |

`slot` and `tag` are mutually exclusive. If neither is present, Cloud creates a new slot.

<Warning>
  A `tag` identifies the slot that currently carries it. Deploying through a
  production tag updates that slot in place. If the change requires a fresh
  database or historical replay, create a new slot and move the tag only after
  validation.
</Warning>

## `build`

Cloud builds one image and runs it with different commands for `init`, `processor`, and `api`.

| Field | Values | Default | Purpose |
| - | - | - | - |
| `dockerfile` | Path | `Dockerfile` | Use a custom Dockerfile from the squid source |
| `node_version` | `18`, `20`, `21` | `20` | Node.js version used by the managed build |
| `package_manager` | `auto`, `npm`, `pnpm`, `yarn` | `auto` | Package manager used for dependency installation |
| `install.cmd` | String array | Detected package-manager install command | Override dependency installation |
| `cmd` | String array | Project default | Override the build command |

The following files must exist in the squid source:

* `package.json`
* `tsconfig.json`
* `commands.json`
* `src/`

The `db/` and `assets/` directories are included when present.

Example:

```yaml theme={"system"}
build:
  node_version: "20"
  package_manager: pnpm
  install:
    cmd: ["pnpm", "install", "--frozen-lockfile"]
  cmd: ["pnpm", "build"]
```

## `deploy`

The `deploy` section is required and contains the services and addons that make up the squid.

### `addons`

#### `postgres`

Provision managed Postgres:

```yaml theme={"system"}
deploy:
  addons:
    postgres:
      version: "18"
      config:
        statement_timeout: 60s
        log_min_duration_statement: 5s
        idle_in_transaction_session_timeout: 60s
        idle_session_timeout: 10min
        max_locks_per_transaction: 64
        max_pred_locks_per_transaction: 64
      external_access:
        max_connections: 10
```

Supported Postgres versions are `14`, `15`, `16`, `17`, and `18`. Cloud injects the connection variables described in the [Postgres reference](/en/cloud/reference/pg).

Duration fields accept an integer number of milliseconds or a value ending in `us`, `ms`, `s`, `min`, `h`, or `d`.

#### `rpc`

Provision one or more Cloud RPC endpoints:

```yaml theme={"system"}
deploy:
  addons:
    rpc:
      - eth.http
      - arbitrum-one.http
```

See [RPC proxy networks](/en/cloud/reference/rpc-proxy-networks) for valid names and [RPC proxy](/en/cloud/resources/rpc-proxy) for usage.

#### `hasura`

Provision Hasura instead of an application-managed GraphQL server:

```yaml theme={"system"}
deploy:
  addons:
    hasura:
      version: latest
      env:
        HASURA_GRAPHQL_ENABLE_CONSOLE: "false"
```

See [Hasura](/en/cloud/reference/hasura) for initialization and API configuration.

### `init`

`init` runs to completion before processor and API services start. Use it for database migrations or one-time deployment initialization:

```yaml theme={"system"}
deploy:
  init:
    cmd: ["sqd", "migration:apply"]
    env:
      SQD_DEBUG: "sqd:migration"
```

If `init` is omitted, Cloud does not run a separate init step. Whether migrations still run then depends on the squid's own `commands.json`: the default templates declare `migration:apply` as a dependency of `process:prod`, so the processor applies pending migrations at startup even without `deploy.init`. Set `deploy.init` explicitly to run migrations as a distinct step before the processor starts, for example when a custom `commands.json` does not declare that dependency.

If `init` exits with an error, the deployment does not start.

### `processor`

A single processor:

```yaml theme={"system"}
deploy:
  processor:
    cmd: ["sqd", "process:prod"]
    env:
      SQD_INFO: "sqd:processor"
```

Multiple processors:

```yaml theme={"system"}
deploy:
  processor:
    - name: ethereum
      cmd: ["node", "lib/main.js", "ethereum"]
    - name: base
      cmd: ["node", "lib/main.js", "base"]
```

Names are required and must be unique when `processor` is a list. Each entry runs as a separate service and is billed separately.

Processor services can run any executable included in the built image. That includes non-indexing workloads such as [background and scheduled jobs](/en/cloud/resources/background-jobs).

### `api`

`api` is optional. Add it when the deployment serves GraphQL or another HTTP API:

```yaml theme={"system"}
deploy:
  api:
    cmd: ["sqd", "serve:prod"]
    env:
      SQD_INFO: "sqd:graphql-server"
```

The server must listen on the Cloud-provided `GRAPHQL_SERVER_PORT`.

Cloud exposes APIs through slot and tag URLs:

```text theme={"system"}
https://<org>.squids.live/<name>@<slot>/api/graphql
https://<org>.squids.live/<name>:<tag>/api/graphql
```

Use a tag URL in production so the destination can move between slots without changing clients.

### `env`

Deployment-level variables are available to every service:

```yaml theme={"system"}
deploy:
  env:
    NETWORK: ethereum-mainnet
  processor:
    cmd: ["sqd", "process:prod"]
    env:
      SQD_DEBUG: "sqd:processor"
```

Service-level variables override deployment-level variables. See [Environment variables and secrets](/en/cloud/resources/env-variables).

### `cors`

Configure the Cloud API proxy:

```yaml theme={"system"}
deploy:
  cors:
    enabled: true
    allow_origin:
      - https://app.example.com
    allow_methods:
      - GET
      - POST
    allow_headers:
      - Content-Type
      - Authorization
    allow_credentials: true
    max_age: 3600
```

Available fields are `enabled`, `allow_origin`, `allow_methods`, `allow_headers`, `expose_headers`, `allow_credentials`, and `max_age`.

## `scale`

The `scale` section selects dedicated or collocated placement and resource profiles:

```yaml theme={"system"}
scale:
  dedicated: true
  addons:
    postgres:
      profile: medium
      storage: 100Gi
      autoresize: true
      autoresize_limit: 250Gi
  processor:
    profile: medium
  api:
    profile: large
    replicas: 3
```

<Warning>
  `version` belongs under `deploy.addons.postgres`, not
  `scale.addons.postgres`. Scaling changes resources; it does not change the
  database engine version.
</Warning>

See [Scaling](/en/cloud/reference/scale) and [Postgres](/en/cloud/reference/pg) for allowed profiles, replicas, storage, and billing behavior.

## Secrets

Reference an organization secret with the `secrets` context:

```yaml theme={"system"}
deploy:
  env:
    RPC_ENDPOINT: "${{ secrets.FAST_RPC_ENDPOINT_URL }}"
```

Secrets are organization-scoped. Changing a secret does not update running processes until the deployment is restarted:

```bash theme={"system"}
sqd restart -n <name> -s <slot>
```

Never store credentials directly in `squid.yaml`.

## Production example

```yaml title="squid.yaml" expandable theme={"system"}
manifest_version: subsquid.io/v0.1
name: account-history

build:
  node_version: "20"
  package_manager: pnpm

deploy:
  addons:
    postgres:
      version: "18"
      config:
        statement_timeout: 60s
        log_min_duration_statement: 5s
        idle_in_transaction_session_timeout: 60s
    rpc:
      - eth.http
  env:
    NETWORK: ethereum-mainnet
  init:
    cmd: ["sqd", "migration:apply"]
  processor:
    cmd: ["sqd", "process:prod"]
  api:
    cmd: ["sqd", "serve:prod"]

scale:
  dedicated: true
  addons:
    postgres:
      profile: medium
      storage: 100Gi
      autoresize: true
      autoresize_limit: 250Gi
  processor:
    profile: medium
  api:
    profile: medium
    replicas: 2
```

Deploy it into a new generated slot:

```bash theme={"system"}
sqd deploy .
```

After validation, attach a stable tag:

```bash theme={"system"}
sqd tags add production -n account-history -s <slot>
```


## Related topics

- [Deployment Guide](/en/cloud/deployment-guide.md)
- [Multichain Indexing](/en/sdk/squid-sdk/substrate/guides/advanced/multichain-indexing.md)
- [Subscriptions](/en/sdk/squid-sdk/substrate/reference/openreader/configuration/subscriptions.md)


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