Skip to main content

Bench Start

The bench start command launches all services required to run a Frappe application in developer mode. It uses Honcho as a process manager to start and monitor multiple processes simultaneously, making local development simple and efficient.

Note

This command is intended for development environments only. In production, Frappe processes are typically managed using Supervisor and served through NGINX and Gunicorn.

Usage

bench start

What This Command Does

When executed, bench start reads the bench Procfile and starts every required process needed to run a complete Frappe development environment.

Instead of manually launching Redis servers, workers, the web server, and the scheduler one by one, this single command starts them all and displays their logs in a single terminal window.

Processes Started

Process Purpose
redis_cache Provides Redis-based caching to improve application performance.
redis_queue Manages background job queues used by worker processes.
redis_socketio Acts as the message broker for real-time communication and notifications.
web Runs the Frappe development web server.
socketio Handles real-time messaging between clients and the server.
schedule Triggers scheduled tasks and recurring background jobs.
worker_short, worker_default, worker_long Execute asynchronous background jobs from their respective Redis queues.

Optional Development Process

If you are actively developing the Frappe framework or working on frontend assets, you can also run:

bench watch

This command automatically rebuilds JavaScript and other frontend assets whenever source files change, eliminating the need for manual builds during development.

Sample Process Configuration

redis_cache: redis-server config/rediscache.conf
redis_socketio: redis-server config/redissocketio.conf
redis_queue: redis-server config/redisqueue.conf
web: bench serve --port 8000
socketio: /usr/bin/node apps/frappe/socketio.js
watch: bench watch
schedule: bench schedule
worker_short: bench worker --queue short
worker_long: bench worker --queue long
worker_default: bench worker --queue default

This configuration illustrates the individual processes managed by Honcho when running bench start. Each process runs independently while sharing the same terminal session.

Best Practice

Use bench start only for local development. For production deployments, configure Supervisor to manage Frappe processes and use NGINX with Gunicorn to serve your application reliably.

Rating: 0 / 5 (0 votes)