Install ESS-LLP/erpnext-medical repo, alongside Core ERPNext repo. Tips Please

Hello Guys,

I want to have a look on ERPNext Medical Repo: GitHub - ESS-LLP/erpnext-healthcare: Open Source ERP built for the Web. Uses Python, MariaDB. which is forked from Core Repo GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) .

Only medical module is plus with “ESS-LLP/erpnext-medical” which I currently want to run on production, which is already running here:

Question is: I’m already running a production server, which contains --production version of core ERPNext, with DNS-Based Multitenancy.

However, I always perform
bench --site --force reinstall for every new DNS. Now, I really don’t have any idea how to install Medical repo GitHub - ESS-LLP/erpnext-healthcare: Open Source ERP built for the Web. Uses Python, MariaDB. along side existing server without afffecting or conflicting anything existing project.

Is it good idea to install only Medical app or complete project?

The medical module should be its own custom app. I’m not sure how to break these up, as I’ve only made the app & repo first and then filled it with the customizations. one possible way is to create a new custom app and make a repo for it, then transfer all of the customizations to it. Then you can install and update without effecting the ERPNext & Frappe apps.

I think you need to create a new bench and install it in this new bench to test it.

Thanks @cpurbaugh to push this thread next level !!

Yes, It is completely independent of Core ERPNext. They just merge important changes made to core ERPNext with their repo. I mean, just look at their repo, that are already new custom app as @cpurbaugh said.

However, easy to install on independent server. But, afraid to implement it to existing server.

This would be a concern, I have to implement it on existing server only. Any precious idea or suggestion?

@chdecultot Are you currently working on Medical Project, also you mentioned about GitHub - ESS-LLP/erpnext-healthcare: Open Source ERP built for the Web. Uses Python, MariaDB. repo. You suggested that “need to create a new bench”.

Dumb question is here: A server contains another bench? hhaha. I mean, I’m not really in mood to purchase another server either for test or production, there are still another world which has to be explored with ERPNext.

If possible on existing server, please help me, how success can be achieved.

Actually, @rmehta confirms, it’s possible, here > Installing multiple erpnext in multiple bench setup - #3 by Hafees_Kazhunkil

But, looks like thread gone lost without a correct answer. also, this thread might useful or give a fruitful idea, How to setup a production and a development site next to each other - #12 by James_Robertson

Now, seems like, it’s possible. But, authenticity required. What correct process has to be followed, what not. How Production bench can be safe without affecting anything.

@revant_one any help please?

Two benches can be setup.

Just to be safe, backup and try it on a test server first.

One of a bench had two websites in it, one for demo and one for production.
Because both the sites are on same bench they share same app branch for demo as well as production.

In case of testing and production sites, it will be useful for testing site to use testing branch and production site to use master branch of the app. For this, benches need to be separated.

What I did to separate benches.
Copied current bench

cp -R frappe-bench frappe-bench-test

Kept only one site on one bench, Initially frappe-bench had demo and prod. Now demo is moved to frappe-bench-test

in test bench edit sites/common_site_config.json and change ports for web to 8001, redises to 11001, 12001, 13001 and socketio 9001. (separate port from master bench) this can also be done using bench setup config

 "auto_update": false, 
 "background_workers": 1, 
 "frappe_user": "frappe", 
 "gunicorn_workers": 4, 
 "rebase_on_pull": false, 
 "redis_cache": "redis://localhost:13001", 
 "redis_queue": "redis://localhost:11001", 
 "redis_socketio": "redis://localhost:12001", 
 "release_bench": 0, 
 "restart_supervisor_on_update": true, 
 "serve_default_site": true, 
 "shallow_clone": true, 
 "socketio_port": 9001, 
 "update_bench_on_update": true, 
 "webserver_port": 8001

In test bench run

bench setup redis
bench setup socketio 
bench setup nginx
bench setup supervisor

create /etc/ links

sudo ln -s /home/frappe/frappe-bench-test/config/nginx.conf /etc/nginx/conf.d/frappe-bench-test.conf
sudo ln -s /home/frappe/frappe-bench-test/config/supervisor.conf /etc/supervisor/conf.d/frappe-bench-test.conf

restart nginx and supervisor

sudo service nginx restart
sudo service supervisor restart

memory consumption doubles
sudo supervisorctl status shows 2 benches running.

domain/subdomain names resloves to respective sites in separate benches.

instead of copying bench you can bench init


Hi @aaima,

Yes I already installed the Smarte Application at GitHub - ESS-LLP/smarte: smarteCare - Frappe modules for healthcare management to test it and it worked fine. It may not be completely up-to-date with ERPNext Medical tough.
It is a standard custom app and can be installed directly in your existing bench next to you erpnext instance with:
bench get-app smarte and then bench use site your-site bench install-app smarte`

ERPNext Medical GitHub - ESS-LLP/erpnext-healthcare: Open Source ERP built for the Web. Uses Python, MariaDB. is another problem to install since it is a fork of ERPNext.
In this case you need to create a second bench on your existing instance, because you cannot install the same app twice in the same bench.

Go to the parent folder of your current bench folder and do bench init new-bench
Then you can create a new site, get the app as described above and install it on your site to get it up and running.

EDIT: Thanks @revant_one for the complete explanation :slight_smile:


Thanks alot @revant_one and @chdecultot !! Sorry for activating older query again.

I’m ready as information furnished by @revant_one sir. But, still there is a confusion to merge or migrate(I don’t know actual term) between ERPNext and Forked ERPNext installation.

Yes, If I prefer easy install to setup server, this automatically adds ERPNext as main app. while forked app contains a lot of change. Now, I had tried various methods like:

git remote add upstream https://github-repo-link
git remote add origin https://github-repo-link
& doing bench migrate as well.

But still, I doubt because actually it still installing ERPNext main repo instead of Forked Repo. Please guide me, is upstream & origin link should be same as forked repo or upstream should be bench repo i.e. GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps so that bench commands can work, and origin contains Forked Repo link. I really doubts on this. I to use forked ERPNext repo instead of main repo.

ESS-LLP installs just like a fresh install of ERPNext would do.
If I understand what you are asking:

From your second_bench folder drop all sites
delete /second_bench/apps/erpnext
bench get-app erpnext GitHub - ESS-LLP/erpnext-healthcare: Open Source ERP built for the Web. Uses Python, MariaDB.
bench new-site
bench --site install-app erpnext

Then go to and go through the initial ERPNext/ESS-LLP setup wizard.


As @System19 explains above, the forked version of ERPNext needs to be installed manually like any custom app.
You can install a new bench folder, install Frappe and then install directly ERPNext-Medical instead of ERPNext.
Then create a new site and follow the install wizard.

1 Like

Please refer Multi Bench Setup · frappe/bench Wiki · GitHub

Let me know if you got any issue.

For frappe fork use command
bench init --frappe-path frappe-fork-path frappe-bench

For erpnext fork
bench get-app erpnext

Also feel free to edit wiki page if you find something is missing, it will help others.