Last update: 2025-12-18T09:52:50.000Z
Content:
---
title: "tb infra · Tinybird Docs"
theme-color: "#171612"
description: "Select the infrastructure on which you want to run Tinybird."
inkeep:version: "forward"
---




# tb infra [¶](https://www.tinybird.co/docs/forward/dev-reference/commands/tb-infra#tb-infra)

Copy as MD Helps you deploy Tinybird on a cloud service provider of your choice and manage custom regions. See [Self-managed Tinybird Cloud](/docs/forward/install-tinybird/self-managed).

To list, add, update, or remove infrastructure regions, you can also go to **Settings**, **Managed regions** in Tinybird Cloud.

## Subcommands [¶](https://www.tinybird.co/docs/forward/dev-reference/commands/tb-infra#subcommands)

The following subcommands are available:

| Subcommand | Description |
| --- | --- |
| init | Initializes the infrastructure and deploys Tinybird Local in a custom region. By default, the command is interactive and prompts you for the necessary information. |
| add | Adds a new self-managed infrastructure region using an existing infrastructure URL. |
| update | Updates the URL of an existing self-managed infrastructure region. |
| rm NAME | Removes an existing infrastructure region. |
| ls | Lists available infrastructure regions. |

## tb infra init [¶](https://www.tinybird.co/docs/forward/dev-reference/commands/tb-infra#tb-infra-init)

Initializes the selected cloud infrastructure provider to host Tinybird Local.

Running the `tb infra init` command requires the following components:




- AWS

The following tools are required to deploy Tinybird Local on AWS:

- [  Terraform CLI](https://developer.hashicorp.com/terraform/install)   to create the Kubernetes cluster.
- [  Kubectl CLI](https://kubernetes.io/docs/tasks/tools/)   to manage your Kubernetes installation.
- [  AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)   with credentials configured.

Before initiating deployment, you need to set up the following in AWS:

- A zone and domain name in[  Route53 zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingHostedZone.html)  .  

  - Write down the hosted zone name and the zone ID for your domain.
- An[  EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html)   with the following components:  

  - [    AWS Load Balancer Controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/)     installed.
  - [    external-dns](https://github.com/kubernetes-sigs/external-dns)     configured.
  - Both components need sufficient permissions to manage resources.
  - Optionally, set a storage class in the EKS cluster with high IOPS and throughput.

The command requires the following information:




- AWS

When prompted, enter the following information from the first step:

- AWS region. For example, `us-east-1`  .
- DNS zone name. For example, `example.com`  .
- DNS record name. For example, `tinybird`
- The Kubernetes context to apply the changes on.
- Kubernetes namespace. For example, `default`  .
- EKS storage class. For example, `gp3-encrypted`  .

Review the changes before applying them. If you want to generate the files without applying them, use the `--skip-apply` flag.

After the deployment is complete, `tb infra` shows the URL to access your Tinybird Local instance. See [tb infra](/docs/forward/dev-reference/commands/tb-infra) for more information and settings.

The following options are available:

| Option | Description |
| --- | --- |
| --name TEXT | Name for identifying the self-managed infrastructure region in Tinybird. |
| --cloud-provider TEXT | Infrastructure provider. Possible values are: `aws`  , `gcp`  , `azure`  . |
| --cloud-region TEXT | AWS region, when using `aws`   as the provider. |
| --dns-zone-name TEXT | DNS zone name. |
| --kubernetes-namespace TEXT | Kubernetes namespace for the deployment. |
| --dns-record TEXT | DNS record name to create, without domain. For example, `tinybird`  . |
| --kubernetes-storage-class TEXT | Storage class for the Kubernetes StatefulSet. |
| --skip-apply | Create all the configuration files without applying them. |
| --auto-apply | Apply all the configuration automatically, without prompting for confirmation. |

The command always generates the following files inside the `infra/<provider>` directory, where `<provider>` is the infrastructure provider:

- config.json: Contains the configuration for the provider.
- k8s.yaml: Contains the Kubernetes configuration.
- main.tf: Contains the Terraform configuration.

## tb infra add [¶](https://www.tinybird.co/docs/forward/dev-reference/commands/tb-infra#tb-infra-add)

Adds a new self-managed infrastructure region using an existing infrastructure URL. The command prompts you for the necessary information.

For example:

tb infra add

Running against Tinybird Cloud: Workspace example_workspace
Enter name: example
Enter host: https://tinybird.example.com
» Adding infrastructure 'example' in Tinybird...
✓ Infrastructure 'example' added
» Required environment variables:
TB_INFRA_TOKEN=example_token
TB_INFRA_WORKSPACE=example_workspace
TB_INFRA_ORGANIZATION=example_organization
TB_INFRA_USER=user@example.com The following options are available:

| Option | Description |
| --- | --- |
| --name TEXT | Name for identifying the self-managed infrastructure in Tinybird. |
| --host TEXT | Host for the infrastructure. |

## tb infra update [¶](https://www.tinybird.co/docs/forward/dev-reference/commands/tb-infra#tb-infra-update)

Updates an existing infrastructure region.

For example:

tb infra update example --host https://tinybird-2.example.com

Running against Tinybird Cloud: Workspace example_workspace
» Updating infrastructure 'test' in Tinybird... The following options are available:

| Option | Description |
| --- | --- |
| --name TEXT | Name for identifying the self-managed infrastructure in Tinybird. |
| --host TEXT | Host for the infrastructure. |

## tb infra rm [¶](https://www.tinybird.co/docs/forward/dev-reference/commands/tb-infra#tb-infra-rm)

Removes an existing infrastructure region.

For example:

tb infra rm example

Running against Tinybird Cloud: Workspace example_workspace
» Deleting infrastructure 'example' from Tinybird...
✓ Infrastructure 'example' deleted
## tb infra ls [¶](https://www.tinybird.co/docs/forward/dev-reference/commands/tb-infra#tb-infra-ls)

Lists all the infrastructure regions.

For example:

tb infra ls

Running against Tinybird Cloud: Workspace example_workspace
** Infras:
--------------------------------------------------------------------------
| name         | host                                                    |
--------------------------------------------------------------------------
| example      | https://tinybird.example.com                            |
| example2     | https://tinybird2.example.com                           |
--------------------------------------------------------------------------
## Environment support [¶](https://www.tinybird.co/docs/forward/dev-reference/commands/tb-infra#environment-support)

| Environment | Supported | Description |
| --- | --- | --- |
| `--local` | ✗ No | Infrastructure management requires cloud. |
| `--cloud` | ✓ Yes (implicit) | Manages self-managed infrastructure regions. |
| `--branch=BRANCH_NAME` | ✗ No | Infrastructure is managed at account level, not in branches. |


