Self-managed regions¶
Tinybird supports using your own cloud service provider so that you can deploy your own self-managed Tinybird Cloud region.
Using your own cloud requires deploying the Tinybird Local container in existing cloud infrastructure, either manually or using the tb infra init
command. The following diagram shows an outline of the process.
Supported clouds¶
The following cloud service providers are supported:
- AWS
- GCP (Coming soon)
- Azure (Coming soon)
You can also create a self-managed region by deploying the container on the following Platform as a Service (PaaS) providers:
- Fly.io
- Zeet
- Google Cloud Run
- CloudFoundry
- Azure Container Instances
- DigitalOcean App Platform
Requirements¶
To deploy Tinybird Local on AWS, GCP, or Azure, you need to set up the following:
- A publicly accessible HTTPS URL. For example,
https://tinybird.yourdomain.com
. - Two volumes with sufficient storage and IOPS to persist data.
- Required paths in the container are
/redis-data
and/var/lib/clickhouse
.
- Required paths in the container are
- A way to access the internet from the cloud provider.
Create a self-managed region¶
To add a new self-managed region to Tinybird Cloud, follow these steps:
Check the requirements¶
Make sure that you set up the requirements described in Requirements.
Deploy Tinybird Local¶
Deploy Tinybird Local on your cloud provider. At the end of the deployment, Tinybird Local must be publicly accessible on an HTTP URL.
Make sure to expose the following environment variables to the Tinybird Local container:
TB_INFRA_TOKEN
TB_INFRA_WORKSPACE
TB_INFRA_ORGANIZATION
TB_INFRA_USER
The value of each variable is provided in the next step.
To facilitate deployment, you can use the tb infra init
command. See tb infra.
Add the new region¶
After you've deployed Tinybird Local on your cloud provider, add a self-managed region using tb infra add
:
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
To list, add, update, or remove infrastructure regions, you can also go to Settings, Managed regions in the Tinybird Cloud.
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.
tb login --host https://<host>
Use your instance¶
After you're logged in, you can run commands against it using the --cloud
flag.
tb --cloud workspace ls
Next steps¶
- Learn about environments. See Environments.
- Learn about datafiles. See Datafiles.
- Learn about the Tinybird CLI. See Command reference.