SSL for frappe Site for Multibench setup

You can setup Lets Encrypt SSL certificate - You just need to follow the commands -

$ bench config dns_multitenant on

$ bench new-site

$ bench setup nginx

$ sudo service nginx reload

$ sudo -H bench setup lets-encrypt


When i enable dns multitenant on, i am not able to browse to my erpnext website using public domain. When i disable the multitenant, i am able to browse the erpnext website using public domain eg: i have use port 8090 and trying to install lets encrypt ssl certificate but i couldnt. Your help will be higly appreciate please.

Hi Can you explain me in details. Where you have hosted your site and all. I will try to help you for sure.

  1. I have a physical server machine and hosted two website (eg: and is hosted in windows server in physical machine and is hosted in ubuntu server in virtual machine using virtual box.
    i have installed Lets encrypted SSL certificate for and port forwarded port 443 to in my router and everything works fine.

i have used port 8090 ( and port forwarded port 8090 to from my router and work fine untill when multitenant is in off. i can even access from outside network to my But the problem is, after enabling multitenant on and installing ssl certificate, i am not able to browse my i have done bench setup nignix, sudo service nginx restart also.

Using port 443 in is working fine. but i cant forwards same port for two website. therefore, i want to used port 8090 for

Please help me. i have even installed ssl in using DNS as per video tutorial Create an SSL Certificate Without Ports 80 and 443 (Certbot/LetsEncrypt) ( but i am still not able to browse when multitenant is in on.
Thank you

Hi @Yongstars:

There are 2 multitenant modes: port based and DNS based.

Read this.

Anyway, as you said above … your frappe environment just host 1 site, the other one is hosted in your windows machine … so … there is no multitenant scenario here?

Maybe I missunderstand something.

Thank you for you prompt reply sir. With Port based multitenancy, i am able to browse my site with URL. i want to secure my web page with ssl. i tried to install ssl with “bench config dns_multitenant off” scenario. i am not able to detect my real domain name. Instead detected my site name/folder name Its should detect in other scenario “bench config dns_multitenant on” i am able to detect my site folder name and and i am able to install lets encrypted SSL in after installing SSL certificate and i tried to browse with URL:, but its not reachable. What would be the issue? any idea pleas.

Hi @Yongstars:

I guess, your router have some NAT rules:

443 → Your VM machine (frappe) local IP address
8090 → Your host (web server) local IP address

Domain DNS (for and records pointing to your public IP address.

Your frappe machine have NGINX running, and listening to 443 port, with SSL certificate for installed properly.

Your web server machine is running and listening on 8090 port, and ready to receive requests for

If this is correct … frappe-side NGINX is not managing 8090 traffic …