What is Bench?
Bench is a command-line utility that helps you install, update, and manage multiple sites for Frappe applications on Unix-like systems for both development and production environments. Built by Frappe Technologies, Bench simplifies the complexity of managing Frappe-based applications like ERPNext, providing a unified interface for common operations from initialization to deployment.Key Features
Bench provides a comprehensive toolkit for managing your Frappe infrastructure:Bench Initialization
Create and configure new bench instances with isolated Python environments and proper directory structure
Site Management
Create, configure, and manage multiple Frappe sites on a single bench instance
App Management
Install, update, and remove Frappe applications from local or remote repositories
Development Tools
Start development servers with live reload, process monitoring via Procfile, and more
Backup & Restore
Automated periodic backups for all sites with easy restore capabilities
Production Setup
Configure production environments with NGINX, SSL certificates, and process supervision
Architecture Overview
Understanding how Bench organizes your Frappe environment:How It Works
- Virtual Environment: Each bench has an isolated Python environment in the
env/directory - Apps Directory: Frappe applications are cloned and installed in
apps/ - Sites Directory: Each site has its own database and configuration
- Shared Resources: Sites share installed apps but maintain separate data
Multi-Tenancy
Bench excels at managing multiple sites (tenants) on a single installation:- Each site has its own database and configuration
- Sites share the same application code for efficiency
- Install different apps on different sites as needed
- Isolate backups, migrations, and updates per site
The
bench --site flag allows you to run commands for specific sites, making multi-tenant management straightforward.Use Cases
Development Environment- Rapid setup with
bench startfor hot-reload development - Easy app creation and testing
- Multiple test sites for different scenarios
- Multi-site hosting with production-grade setup
- Automated backups and monitoring
- SSL certificate management via Let’s Encrypt
- Process supervision with Supervisor or systemd
- Full control over your Frappe infrastructure
- Containerized deployments with Docker support
- Flexible scaling and configuration options
System Requirements
Python
Python 3.10 or higher required
Platform
Linux or macOS (Unix-like systems)
Database
MariaDB 10.6+ or PostgreSQL 12+
Dependencies
Node.js 18+, Redis, wkhtmltopdf
Getting Started
Ready to dive in? Here’s your path forward:Installation
Install Bench using Docker, pip, or the easy-install script
Quick Start
Create your first bench and site in minutes
Community & Support
Join the Frappe community for help and discussions:- Forum: discuss.frappe.io
- GitHub: frappe/bench
- Documentation: frappeframework.com/docs
- YouTube: Frappe Tech Channel
What’s Next?
After understanding what Bench is and how it works:- Install Bench on your system
- Follow the Quick Start Guide to create your first site
- Explore Commands to unlock Bench’s full potential