Overview
Local development mode uses thetinybird-local Docker container to run a full Tinybird instance on your machine. This provides:
- Offline development - Work without internet connection
- Isolated testing - No impact on cloud workspace
- Faster iteration - No network latency
- Branch isolation - Automatic workspace per git branch
- Zero configuration - Tokens automatically managed
Quick Start
1. Start the Container
Run the Tinybird local container:http://localhost:7181.
2. Configure Local Mode
SetdevMode to "local" in your config:
tinybird.config.json
3. Start Development
Run the dev command:--local flag to override config:
How Local Mode Works
WhendevMode: "local" is configured:
- Automatic tokens - The SDK obtains tokens from the local container (no cloud auth needed)
- Branch workspaces - A workspace is created per git branch automatically
- Local URL - Requests go to
http://localhost:7181instead of cloud API - Full features - All Tinybird features work locally
Local mode requires Docker to be installed and running on your machine.
Development Workflow
Watch Mode
Usedev to watch for changes and sync automatically:
- Watches your resource files for changes
- Automatically syncs to local container
- Validates schemas and SQL
- Reports errors in real-time
Build Mode
Build and push resources once:--dry-run to preview without pushing:
Branch Isolation
Local mode creates a separate workspace for each git branch:- Test different features simultaneously
- Isolate experimental changes
- Avoid conflicts between branches
Switching Between Local and Cloud
You can switch between local and cloud mode using CLI flags:devMode setting in your config file.
Container Management
Check Container Status
tinybird-local in the output.
Stop Container
Start Existing Container
Remove Container
View Container Logs
Access Container Shell
Querying Local Data
Your application code works with local mode without changes:http://localhost:7181 when in local mode.
Inspecting Local Workspace
Use theinfo command to see local workspace details:
- Local container status
- Workspace name
- Token information
- Branch details
Comparing with Cloud Mode
| Feature | Local Mode | Cloud Mode |
|---|---|---|
| Internet required | No | Yes |
| Authentication | Automatic | Required (token) |
| Branch workspaces | Automatic | Manual branches |
| Performance | Fast (local) | Network latency |
| Data persistence | Container lifetime | Permanent |
| Collaboration | No | Yes |
| Production deploy | Not supported | tinybird deploy |
When to Use Local Mode
Local development mode is ideal for:Rapid prototyping
Quick iteration without cloud sync delays
Offline work
Develop without internet connection
Testing
Isolated environment for experiments
CI/CD
Local testing in pipelines
Limitations
Local mode has some limitations:- No persistence - Data is lost when container stops (unless using volumes)
- Single machine - Can’t share with team members
- No production deploy - Must use cloud mode for production
- Resource limits - Constrained by local machine resources
Troubleshooting
Container Not Starting
Check if port 7181 is already in use:Connection Errors
Verify the container is running:Workspace Not Found
Ensure you’re in a git repository with a valid branch:Next.js Integration
Run both Next.js and Tinybird in local mode:package.json
Transitioning to Production
When ready to deploy:-
Switch to branch mode:
-
Test on a cloud branch:
-
Deploy to production: