Documentation Index
Fetch the complete documentation index at: https://mintlify.com/frappe/frappe/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Bench is the command-line interface for managing Frappe Framework installations. It provides tools for creating sites, installing apps, running migrations, and managing development and production environments.Installation
Bench can be installed using the official installation script:- Python dependencies
- Node.js and npm
- MariaDB (if not already installed)
- Redis server
- The bench CLI tool
The installation script creates a new user called
frappe and sets up the bench environment in /home/frappe/frappe-bench.Creating a bench
Initialize a new bench (Frappe installation):apps/: Frappe apps (including framework)sites/: Individual site instancesconfig/: Configuration files for production serviceslogs/: Application and error logs
Site management
Create a new site
Create a site with a specific name:- MariaDB root password
- Administrator password for the site
List sites
View all sites in your bench:Use a specific site
Set a default site to avoid specifying it in every command:Application management
Get an app
Download and install a Frappe application:Install app on site
Install an app on a specific site:Uninstall app
Remove an app from a site:Development workflow
Start development server
Start all services for development:- Web server (port 8000)
- SocketIO server
- Redis cache
- Redis queue
- Background workers
- Scheduler
Access your site at
http://mysite.localhost:8000 after running bench start.Watch and rebuild assets
Automatically rebuild frontend assets on changes:Build assets
Manually build production-ready assets:Database operations
Run migrations
Execute database migrations after updates:Console access
Open an interactive Python console with Frappe context:Database console
Access the MariaDB console directly:Backup and restore
Create and restore site backups:Production setup
Configure production services
Generate configuration files for nginx and supervisor:Update and migrate
Update bench, apps, and migrate sites:Worker management
Start workers manually
Start background workers for different queues:Start scheduler
Run the scheduler for periodic tasks:Background jobs
Execute Python functions in the background:Configuration
Site configuration
Edit site-specific settings:Common site configuration
Settings shared across all sites are stored incommon_site_config.json:
Troubleshooting
Clear cache
Clear site cache to resolve caching issues:Rebuild search index
Reindex search for better search results:Check system health
Diagnose installation and configuration issues:- Background workers status
- Queue health
- Configuration validity
- Port availability
View logs
Useful commands
Execute Python code
Run Python code in the Frappe context:Run tests
Execute unit tests:Reinstall site
Completely reinstall a site (deletes all data):Next steps
Configuration options
Learn about site_config.json settings
Production deployment
Deploy Frappe to production