Tinybird Local container¶
You can run your own Tinybird instance locally using the tinybird-local
container. This is useful for testing and development. For example, you can test Data Sources and Pipes in your data project before deploying them to production.
Tinybird Local doesn't include the following features:
- Tinybird UI
- Connectors
- Scheduled operations
- Batch operations
Prerequisites¶
To get started, you need a container runtime, like Docker or orbstack.
Run Tinybird Local¶
To run Tinybird locally, run the following command:
docker run --platform linux/amd64 -p 7181:7181 --name tinybird-local -d tinybirdco/tinybird-local:latest
By default, Tinybird Local runs on port 7181, although you can expose it locally using any other port.
Local authentication¶
To authenticate with Tinybird Local, retrieve the Workspace admin token and pass it through the CLI:
TOKEN=$(curl -s http://localhost:7181/tokens | jq -r ".workspace_admin_token") tb --host http://localhost:7181 --token $TOKEN auth
After you've authenticated, you can get the default Workspace with the tb workspace ls
CLI command. For example:
tb workspace ls ** Workspaces: -------------------------------------------------------------------------------------------- | name | id | role | plan | current | -------------------------------------------------------------------------------------------- | Tinybird_Local_Testing | 7afc6330-3aae-4df5-8712-eaad216c5d7d | admin | Custom | True | --------------------------------------------------------------------------------------------
Kafka data sources¶
The Tinybird Local container supports Kafka data sources. You can follow same process as you follow with generic data sources:
Create a Kafka connection¶
tb connection create kafka --connection-name kafka_local --bootstrap-servers <BROKER_URL> --key "<USERNAME>" --secret "<PASSWORD>"
Push a Kafka data source¶
echo """ SCHEMA > json String \`json:$\` ENGINE MergeTree KAFKA_CONNECTION_NAME kafka_local KAFKA_TOPIC kafka_topic_test KAFKA_GROUP_ID tinybird_local KAFKA_AUTO_OFFSET_RESET earliest """ > /tmp/kafka_ds.datasource tb push /tmp/kafka_ds.datasource
Next steps¶
- Learn about datafiles and their format. See Datafiles.
- Learn how advanced templates can help you. See Advanced templates.
- Browse the full CLI reference. See Command reference.