Deployed a Google Cloud Instance of ERPNext. Looking for HTTPS

Hi Iam running the ERPNEXT from google cloud market place.
details
Operating system
Debian (9.9)
Software
Bench (4.1.0)
ERPNext (12.5.0)
Frappe (12.3.0)
Google-Fluentd (1.6.14)
MariaDB (10.2.31)
Nginx (1.10.3)
Node.js (8.17.0)
Redis (3.2.6)
Stackdriver-Agent (5.5.2)

Installed sucessfully and mapped to custom domain using A record. Not iam looking for HTTPs .

Requiring your help.

  1. Set DNS Multitenancy on by running sudo bench config dns_multitenant on
  2. Add custom domain by running
    sudo bench setup add-domain erp.example.com and enter site name when asked
  3. Setup letsecrypt by running sudo -H bench setup lets-encrypt erp.example.com
1 Like

@Suresh_Thakor

    1. Setup letsecrypt by running sudo -H bench setup lets-encrypt [erp.example.com] this didnt work
      but
      added this sudo -H bench setup lets-encrypt site1.local --custom-domain erp.example.com

But this too ended with following error.

IMPORTANT NOTES:

  • Congratulations! Your certificate and chain have been saved at:
    /etc/letsencrypt/live/sys.sapl.xyz/fullchain.pem
    Your key file has been saved at:
    /etc/letsencrypt/live/sys.sapl.xyz/privkey.pem
    Your cert will expire on 2020-12-10. To obtain a new or tweaked
    version of this certificate in the future, simply run certbot-auto
    again. To non-interactively renew all of your certificates, run
    “certbot-auto renew”
  • If you like Certbot, please consider supporting our work by:
    Donating to ISRG / Let’s Encrypt:
    Donating to EFF:
    nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
    $ sudo systemctl start nginx
    Job for nginx.service failed because the control process exited with error code.
    See “systemctl status nginx.service” and “journalctl -xe” for details.
    root@erpnext-sep-vm:/home/frappe/frappe-bench#

Do you have a valid domain name?
How did you configure the hostname in the DNS?

Yes valid domain name is there . sys.sapl.xyz (now the instance is removed, since it was not working)

Regarding DNS

Using A record to the server IP

A sys xx.xxx.xx.xx

Like this only

Is it right?

I have applied ssl on cname and working fine.

Hi i pointed the A record and its working fine.
But only issue is the https missing.

Can you try Ubuntu 18? That is what I use with Google Cloud.
How did you install ERPNext? Did you use Easy Install? For me, this is the fastest way.
Your MariaDB is 10.2 → the default is 10.3
Your prompt is root - which should not be.

hi thanks for your reply.
i am not techie . so install erpnext click to deploy in gcp.
any step by step tutorial video for the method you did…

Try searching Easy Install.
I recommend Ubuntu 18

@Suresh_Thakor hi first thank you

tried your step by step process.
install everything but end up in this screen as attached.

Your site is not installed yet.
Please check with your site name i.e

http://mytesterp.com/ or
mytesterp.com

till how much time to be waited. for the site to install.

Like it says, Don’t panic.
One trick is to use a powerful VM like 4 core, 16 G, during setup. Then, you can stop the VM and change it to a lower spec if you like

  • edit site_config.json to remove everything except the db name, db password, and encryption key strings. (make sure to delete the trailing comma after the last line and leave the last brace character)
  • then execute the following commands from frappe-bench directory:

bench config dns_multitenant off
bench setup nginx
sudo service restart nginx

  • At this point you shoudl be able to access the site by entering the ip address into the browser address bar. After you have confirmed this, then execute the remaining commands from the /frappe-bench directory:

bench config dns_multitenant on
bench setup add-domain --site site1.local your site.com
bench setup nginx
sudo service nginx restart
bench --site site1.local enable-scheduler

1 Like

In my case, I just do:

bench config dns_multitenant on
mv site1.local your.domain.com
bench setup nginx
sudo service nginx restart
bench --site your.domain.com enable-scheduler

The advantage is I always know which site is which

You can also include the site name as a parameter during Easy Install --site your.domain.com so that when installed, the site name is already there