Tinybird Local container¶
You can run your own Tinybird instance locally using the tinybird-local
container.
The Tinybird Local container is useful in CI/CD pipelines. See CI/CD for more information. You can also deploy it on your own cloud infrastructure.
Prerequisites¶
To get started, you need a container runtime, like Docker or orbstack.
Run the Tinybird Local container¶
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.
API endpoints¶
By default, the Tinybird Local container exposes the following API endpoint:
http://localhost:7181/api/v0/
You can call all the existing Tinybird API endpoints locally. For example:
```shell curl \ -X POST 'http://localhost:7181/v0/events?name=<your_datasource>' \ -H "Authorization: Bearer <your_token>" \ -d $'<your_data>'
Persist data between sessions¶
To persist your data between development sessions, you can specify a custom path for storing your data volumes with the --volumes-path
flag:
tb local start --volumes-path <your/path>
This ensures your data persists between restarts, making local development more efficient and reliable.
Remember that tb local stop
does not remove the data. tb local restart
does, so to get to an earlier state you can do tb local restart --volumes-path ./tb_previous_snapshot
Next steps¶
- Learn about datafiles. See Datafiles.
- Learn about the Tinybird CLI. See Command reference.