Skip to main content
Setup commands help you configure your Bench installation for different environments, from local development to production deployments.

Command Categories

Environment Setup

bench setup env

Set up Python virtual environment for the bench

bench setup redis

Generate Redis configuration files for cache and queue

Production Deployment

bench setup production

Complete production setup with NGINX and Supervisor/systemd

bench setup nginx

Generate NGINX web server configuration

bench setup supervisor

Generate Supervisor process manager configuration

Security & SSL

bench setup lets-encrypt

Set up free SSL certificates with Let’s Encrypt

Maintenance

bench setup backups

Configure automatic backup cronjobs

Development vs Production

Development Setup

For local development, you typically only need:
bench setup env
bench setup redis
You can then start your bench with bench start which uses the Procfile.

Production Setup

For production deployments, use the comprehensive setup command:
sudo bench setup production [username]
This automatically configures:
  • NGINX as a web server
  • Supervisor or systemd for process management
  • Proper file permissions
  • Service symlinks and reloads

Quick Reference

CommandPurposeRequires Sudo
bench setup envCreate Python virtual environmentNo
bench setup redisGenerate Redis configurationNo
bench setup nginxGenerate NGINX configurationNo
bench setup supervisorGenerate Supervisor configurationNo
bench setup productionComplete production setupYes
bench setup lets-encryptSet up SSL certificatesYes
bench setup backupsSchedule automatic backupsNo

Common Workflows

1

Initial Setup

After creating a new bench:
bench setup env
bench setup redis
2

Production Deployment

Deploy to production server:
sudo bench setup production frappe
bench setup backups
3

Add SSL

Secure your site with HTTPS:
sudo bench setup lets-encrypt site1.local

Next Steps

  • Explore individual setup commands for detailed options
  • Learn about bench config to customize your setup
  • See production setup guide for comprehensive deployment instructions

Build docs developers (and LLMs) love