Issue Setting Up LetsEncrypt SSL

I’m probably just an idiot, but I seem to be missing some information about how to complete the documented LetsEncrypt SSL process. I followed the step and ran

sudo bench setup lets-encrypt [site-name]

I went to my sites directory and found only site1.local and therefore tried the command

sudo bench setup lets-encrypt site1.local.

This obviously failed. Can someone point to the correct procedures somewhere? Is there a way of determining the correct value to add for the site name? Thanks.

Run the command from the frappe-bench folder, and not the sites folder

Are you saying that from the frappe-bench folder I should run the command as such?

sudo bench setup lets-encrypt site1.local

If I don’t know the site name, is there a way of finding it?

I tried running the line above and got the following:

WARNING: The standalone specific supported challenges flag is deprecated. Please use the --preferred challenges flag instead. Saving the debug log to /var/log/letsencrypt/letsencrypt.log

Obtaining a new certificate. An unexpected error occurred: The request message was malformed :: Name does not end in a public suffix. Please see the log files in /var/log/letsencrypt for more details. There was a problem trying to setup SSL for your site.

This is because site1.local is not a public DNS name.

Instead of “.local” try to use “.com” I know there is an option to specify a domain for a site but I don’t have acces to my frappe installation

Thanks…I was able to resolve the issue. The renaming of the site1.local folder to the FQDN works. Needed to do:

Create an A record for “erp”. Tested that erp.mydomain.com resolved to server IP. Then rename the folder. Do

mv /home/frappe/frappe-bench/sites/site1.local /home/frappe/frappe-bench/sites/erp.mydomain.com

after renaming the site1.local folder you can run the bench command as

sudo bench setup lets-encrypt erp.mydomain.com

After the folder is correctly named, it works perfectly.

2 Likes

like the post. just what does “FQDN” stand for?

Fully qualified domain name. It’s just the domain name

2 Likes

one addition

replace site1.local with erp.mydomain.com in ~/frappe-bench/sites/currentsite.txt

otherwise i.e. the bench mariadb command will not work anymore because it is looking for site1.local.

1 Like