Multi-tenant Setup Guide - Required

with reference to Multitenancy only the below steps are required by assuming port-based,

bench config dns_multitenant off

bench new-site site2name
bench set-nginx-port site2name 82

bench setup nginx
sudo service nginx reload

but I can see for Manual Setup the below steps,

  • Step #1
# Add apps to bench
bench get-app [app-name] [app-link]
  • Step #2
# Install apps on a particular site
bench --site [site-name] install-app [app-name]

Please correct if I’m wrong,
Step #1 supposed to be for installing frappe and erpnext on the entire bench.
Step #2 is to assign that apps to particular site (if needed)

based on the above, apps will be installed on site1.local by default but will not be installed on site2.local and site3.local etc unless Step #2 takes place.

Please advise,

Frappe is framework, it is mandatory and default installed for any given bench installation on machine.

ERPNext is app built on top of Frappe Framework, so obviously if someone is going to use ERPNext it first has to be installed, then assigned and configured with particular site.

site1.local is also default site setup for you when you use easy install method, if you don’t use easy install method you will need to manually create site and while creating site in manual setup or post easy install you must also chose what app you need to install along with frappe for that particular site. Apps assigned to site can be installed anytime later or also possible to be uninstalled or removed from bench altogether.

<------------------ Bench1 ------------------>
Frappe (default app) <–> site1.local <–> ERPNext (additional app)
Frappe (default app) <–> site2.local <–> Custom Frappe App/Module (additional app)
Frappe (default app) <–> site3.local <–> ERPNext + Custom Frappe App/Module (additional app)
<------------------ Bench2 ------------------>

<------------------ BenchN ------------------>

Frappe (default app) <–> siteN.ext <–> ERPNext + Custom Frappe App/Module (additional app)

In any given case above, there will be no duplicate copies of apps will be created for any number of sites in that matter.

Now Bench is tool which does helps Server Admin to make and break things easily when it comes to Frappe/ERPNext ecosystem apps.

One Bench can host only one copy of App (be it Frappe, ERPNext, etc.) but any number sites under same bench can host any combinations of apps, as long as they are installed/available under same bench.

Bench allows you to setup nginx to support port based sites by default, where your hostname and port will play important role and each site will be assigned with unique port.

If someone dont want unique ports to be assigned for public use case, example: when you want your Frappe site instance to be available on 80 and 443 standard ports. Then you can turn on use DNS Multi Tenant feature which will allow you to have unique hostnames for each site under bench by keeping 80/443 port standard across all sites.

Once DNS Multi Tenant is turned on its better not use mess up with port based setup to avoid further complication with config files, unless you know what you are doing and an export user.

I hope it helps

1 Like

Well, I give it a try for v12 but that’s what I got finally!!!

Logged in as Administrator and yet nothing can be found to enable modules!
Can you please let me know what’s going on?!! and why?!!! Thanks

As i can see logo and favicon i believe you didn’t install erpnext app yet so other module missing at your dasboard.

well, that’s possible, but here’s the content of erpnext directory.
I have checked out the installation log and nothing were shown as failed, but log file now deleted after reboot.

go to sites directory and check apps.txt file.
if there is not mention erpnext then install erpnext in your site using this command.
bench --site sitename install-app erpnext

/home/USER/frappe-bench/sites/apps.txt contains


apps should works,
running this command again would override and fix the issue?

bench --site sitename install-app erpnext

I have examined the above reported issue and it have been found that,
system works normally after installation and setup wizard continues at the first login (i.e. site1.local ).

But, the above shown interface appears for Multi-tenant installations (i.e. site2.local, site3.local etc) at which setup wizard skip choosing sector (retail, services etc) and company name, bank account etc which led to only bench installation as framework without apps.

Please advise.

it is because you are looking at site1.local only, due to some reason your site2.local and others sites have not taken effective maybe due to you have confusion with multi tenant setup itself and missed some steps.

Read my previous comment.