How to run two instance of ERPNext on same VPS?

Currently I am running one instance of ERPNext on a VPS.

But now I have a need to run different instance (1. Development Instance and 2. Production Instance) of ERPNext on the same VPS.

How can we do this?

bench init on 2 different folder.

1 Like

Or create two sites
bench new-site

If the codebase is different for dev and Prod you can repeat the same process that you have done for dev in another folder

@Tej, Will both instance run at the same time or will I have to switch from one to antoher manually?

@FHenry, Creating two sites would mean I will have to redo everything that I do in
Development instance on Product instance. Is this advisable? And will this process not be error pron?

I run two Virtual Machines in Oracle VirtualBox on the same physical server.

The advantage is, that each instance is completely separate and works like it is its own server. It is possible to copy/paste/reset a full instance from one Virtual Machine to the other in a matter of minutes.

And yes, you need to redo everything that you do in one instance to the other, if you want to replicate something. However, if you really want to test things, it is advisable to have them completely separate, if you really want to test some new settings, upgrades, developments, etc. So your production environment is completely unaffected by anything you try on the dev instance.

Both instance will run concurerntly. No problem should happen. I used to run 2 different instances while testing version 12 before migrating.

You will only need to install erpnext app on new site, then run startup wizard, then you’re good to go. All sites will have same bench, frappe, and erpnext version.
Running 2 sites will require you to enable DNS multi tenancy.

1 Like