Skip to main content
Deploy BitBonsai using Docker containers for simplified installation and updates.

Prerequisites

Before installing, ensure you have:
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
Replace /path/to/your/videos and /path/to/temp with actual paths on your host system.
3

Configure Environment

Edit the docker-compose.yml file to set:
  1. POSTGRES_PASSWORD: Change changeme to a secure password
  2. DATABASE_URL: Update password in connection string to match
  3. Volume paths: Point to your actual video library and temp directory
4

Start Services

This will:
  • 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

Default setup includes:

Environment Variables

Backend Configuration

Frontend Configuration

Database Configuration

For production deployments, use Docker secrets or environment files instead of hardcoding credentials.

Volume Mounts

Video Library Mount

Purpose: Provides read/write access to your video files for scanning and encoding. Requirements:
  • 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)
Examples:

Temporary Files Mount

Purpose: Stores temporary encoding files during transcoding operations. Requirements:
  • Fast storage recommended (SSD/NVMe preferred)
  • Minimum free space: 2× largest video file size
  • Cleared automatically after successful encoding
Do not use /tmp on the host if it’s a tmpfs (RAM disk). Encoding generates large temporary files.

PostgreSQL Data

Purpose: Persistent storage for database files. Backup: Use docker compose exec postgres pg_dump for database backups.

Advanced Configuration

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
Use the /videos prefix since that’s the container mount point, not your host path.
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:
Database migrations apply automatically on startup.
Always backup your database before updating:

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:
If connection fails, check DATABASE_URL matches PostgreSQL credentials.

Permission Errors

Fix volume mount permissions:

Out of Disk Space

Check temporary directory usage:
Clear old temporary files:

Next Steps

First Library Scan

Add your video library and run your first scan

Encoding Configuration

Configure HEVC/AV1 encoding presets

Multi-Node Setup

Scale encoding with worker nodes

Backup & Recovery

Backup strategies for database and configuration