Skip to content

Multi Bench Setup

Adam Dawoodjee edited this page Oct 5, 2021 · 8 revisions

A Multi-Bench setup allows you to have multiple codebases and configurations on the same system. Creating a new bench is straightforward, just run:

bench init [bench-name], preferably in your home directory, and let it install its dependencies.

When you create a new bench, it will automatically use different ports from the existing bench. For example, if you are accessing your site from localhost:8000 on your first bench, then the second bench's port will be set as 8001.

The biggest advantage to a multibench setup is that you can have different kinds of setups, e.g Development and Production on the same server. A multi-production, multi-development setup is also fine.

For production setup you will have to run bench setup nginx every time after creating a new site.

Note:

  1. If a new site is automatically created in primary bench, then remove file name frappe_bench_dir in /etc/
  2. If the server port doesn't change from 8000, then change it manually in nginx.conf and supervisor.conf
  3. For redis, change redis port in /sites/common_site_config.json and run the following commands:
    • bench setup socketio
    • bench setup redis
    • service nginx reload
    • supervisorctl reload
  4. Multi-Bench works easier when setup under one user