Prerequisites
Before installing, ensure you have:| Requirement | Minimum Version | Check Command |
|---|---|---|
| Docker | 20.10+ | docker --version |
| Docker Compose | 2.0+ | docker compose version |
| Disk Space | 100GB+ | For temporary encoding files |
| RAM | 8GB+ | For parallel encoding jobs |
BitBonsai requires access to your video library via volume mounts. Plan your directory structure before installation.
Quick Start
1
Create Configuration Directory
2
Create docker-compose.yml
Create a
docker-compose.yml file with the following configuration:docker-compose.yml
3
Configure Environment
Edit the
docker-compose.yml file to set:- POSTGRES_PASSWORD: Change
changemeto a secure password - DATABASE_URL: Update password in connection string to match
- Volume paths: Point to your actual video library and temp directory
4
Start Services
- Pull Docker images from GitHub Container Registry
- Create PostgreSQL database
- Start backend API and frontend UI
- Apply database migrations automatically
5
Verify Installation
Check service health:All services should show
Up (healthy) or Up status.Access the UI
Open your browser to:BitBonsai Web Interface
- Frontend: http://localhost:4210
- Backend API: http://localhost:3100
- PostgreSQL: localhost:5432
Environment Variables
Backend Configuration
| Variable | Description | Default | Required |
|---|---|---|---|
DATABASE_URL | PostgreSQL connection string | - | Yes |
PORT | API server port | 3100 | No |
NODE_ENV | Environment mode | production | No |
LOG_LEVEL | Logging verbosity (error, warn, info, debug) | info | No |
Frontend Configuration
| Variable | Description | Default | Required |
|---|---|---|---|
API_URL | Backend API URL (internal Docker network) | - | Yes |
Database Configuration
| Variable | Description | Default | Required |
|---|---|---|---|
POSTGRES_DB | Database name | bitbonsai | Yes |
POSTGRES_USER | Database user | bitbonsai | Yes |
POSTGRES_PASSWORD | Database password | - | Yes |
Volume Mounts
Video Library Mount
- Must be an absolute path on the host system
- User inside container must have read/write permissions
- Sufficient free space for encoded outputs (typically 50-70% of original size)
Temporary Files Mount
- Fast storage recommended (SSD/NVMe preferred)
- Minimum free space: 2× largest video file size
- Cleared automatically after successful encoding
PostgreSQL Data
docker compose exec postgres pg_dump for database backups.
Advanced Configuration
- Custom Ports
- Hardware Acceleration
- Resource Limits
- Logging
Change external ports without modifying container ports:
First Startup
After starting BitBonsai for the first time:1
Database Migrations
Backend automatically applies database migrations on startup. Check logs:Look for:
2
Add Video Library
Navigate to Settings → Libraries in the UI and add your first library:
- Name: Movies
- Path:
/videos/movies(relative to container mount) - Type: Movies or TV Shows
3
Run Initial Scan
Click Scan Library to index your video files. Monitor progress in the Jobs tab.
Updating BitBonsai
Pull latest images and restart containers:Troubleshooting
Container Won’t Start
Check logs for errors:Cannot Access UI
Verify container is running and port mapping:Database Connection Errors
Ensure PostgreSQL is healthy:DATABASE_URL matches PostgreSQL credentials.