---
title: Add a self-managed region manually
meta:
   description: Create your own Tinybird Cloud region in the cloud service provider of your choice.
headingMaxLevels: 3
---

# Add a self-managed region manually

To add a self-managed region manually, you need to:

1. Create a region in Tinybird Cloud.
2. Deploy the Tinybird Local container on your cloud provider.

{% callout type="info" %}
Self-managed regions are currently in beta. Use them for development environments only; avoid production workloads. Features, requirements, and implementation details might change as we continue to improve this capability.
{% /callout %}

## Resource requirements

When planning your self-managed region deployment, consider the following resource requirements:

- Compute: At least 4 vCPUs and 16 GB RAM for development environments. Production environments may require more resources depending on your workload.
- Storage: Allocate at least 100 GB for the ClickHouse® volume and 10 GB for the Redis volume. Scale according to your data volume needs.
    - Required paths in the container are `/redis-data` and `/var/lib/clickhouse`
- Network: Ensure your deployment has sufficient bandwidth for your expected query and ingestion rates.
    - You also need a publicly accessible HTTPS URL. For example, `https://tinybird.example.com`.
- Init parameters: Provide the following parameters to the deployed container. These parameters can be provided in the `tb infra add` command or automatically generated by `tb infra init`:
    - `TB_INFRA_TOKEN`
    - `TB_INFRA_WORKSPACE`
    - `TB_INFRA_ORGANIZATION`
    - `TB_INFRA_USER`

## Create a region manually

To add a new self-managed region to Tinybird Cloud manually, follow these steps:

{% steps %}

### Log into Tinybird Cloud

Log into Tinybird Cloud using the `tb login` command.

```shell
tb login
```

### Add the new region

Before you deploy the `tblocal` container on your cloud provider, add a self-managed region using `tb infra add`:

```shell
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 host is optional, as you might not known it yet. You can update it later using `tb infra update`. Copy the environment variables and their values to use in the next step.

{% callout type="tip" %}
If you're an organization admin, you can also list, add, update, or remove infrastructure regions in Tinybird Cloud. Go to **Settings**, **Managed regions** in the Tinybird Cloud.
{% /callout %}

### Deploy Tinybird Local

Deploy the [Tinybird Local](/forward/install-tinybird/local) container on your cloud provider. At the end of the deployment, the `tblocal` container must be publicly accessible on an HTTP URL, which is the host of the self-managed region.

Make sure to expose and set the following environment variables to the `tblocal` container using the values provided in the previous step:

- `TB_INFRA_TOKEN`
- `TB_INFRA_WORKSPACE`
- `TB_INFRA_ORGANIZATION`
- `TB_INFRA_USER`

### Log into your instance

Navigate to your Tinybird project and run `tb login --host <host>`, where `<host>` is the host of your self-managed region that you set up in the previous step.

```shell
tb login --host https://<host>
```

### Use your instance

After you're logged in, you can run commands against it using the `--cloud` flag.

```shell
tb --cloud workspace ls 
```
{% /steps %}

## Examples

The following examples show how to add a self-managed region manually in different cloud providers.

- [Minimal setup on a dedicated VM](https://gist.github.com/alejandromav/f4b61d77580ad9596a0a92c6a2df7c19)

## Troubleshooting

If you encounter issues with your self-managed region:

- Check the container logs for error messages.
- Verify that all required environment variables are set correctly.
- Ensure your network configuration allows the necessary connections.
- Confirm that your persistent volumes are properly mounted and have sufficient space.
- For connectivity issues, verify that your HTTPS endpoint is properly configured.

For additional help, contact Tinybird support with details about your deployment.