Home Featured Setting up Multi-tenancy in ERPNext

Setting up Multi-tenancy in ERPNext

by karani

In Software, multi-tenancy is an architecture in which a single instance of a software application serves multiple customers, who are called tenants. The application can be offered as a service or as a platform.

Companies today are leveraging software as a service, or SaaS, to provide data protection in a package that results in superior security, better economics and reduced overhead. One of the ways we do this is through multi-tenant architecture.

In today’s video, we will loon at how to implement multi-tenancy in ERPNext and the Frappe Framework.

Steps needed

bench config dns_multitenant on

bench new-site first.site

bench setup nginx

sudo service nginx reload

bench –site first.site install-app erpnext

After this is successful, navigate to /etc/hosts and make the following changes.

Please take into account the name of your sites. You will need to add a route for every site you add.

Add routes: first.site second.site

You may also like


Gilbert K October 1, 2021 - 11:26 pm

I created a second site with bench new-site a.example.com then proceeded to update the nginx and restart it. The second site is up and running but then my first site stops loading. before the install of the new site it was working.

If I continue to make more sub domain sites with bench they will work except for my main site

Installing SSL Certificate on your ERPNext Instance - Code with Karani September 8, 2021 - 10:13 am

[…] You need to have a┬áDNS Multitenant Setup […]

Leave a Comment