Report this

What is the reason for this report?

Use Certbot Standalone Mode to Retrieve Let's Encrypt SSL Certificates

Posted on June 25, 2020

Hi,

I am following the instructions in the link below [1] to install an SSL certificate for my domain and I get an error:

#sudo certbot certonly --standalone --preferred-challenges http -d example.com
usage: 
  certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...

Certbot can obtain and install HTTPS/TLS/SSL certificates.  By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. 
certbot: error: Unexpected line 0 in /etc/letsencrypt/cli.ini: ≈# Because we are using logrotate for greater flexibility, disable the
root@webstore-mongodb:/var/www# 

What am I doing wrong?

Thanks.

How To Use Certbot Standalone Mode to Retrieve Let’s Encrypt SSL Certificates on Ubuntu 16.04



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

The error indicates that there is an unexpected line in the /etc/letsencrypt/cli.ini configuration file. This might have happened due to a syntax error or some unexpected characters present in the file.

Have you made any changes to the file? If you have, I’ll recommend following these steps

  1. Open the cli.ini file in a text editor such as nano or vi. You need sudo privileges to edit this file. You can use the following command to open the file:
sudo nano /etc/letsencrypt/cli.ini
  1. Check the first line of the file, which is pointed out in the error message. The line reads:
≈# Because we are using logrotate for greater flexibility, disable the

This line looks like a comment because it starts with #, but the symbol at the beginning may be causing the issue. It’s not a valid character for the certbot configuration file.

  1. Modify this line by removing the symbol. The corrected line should look like this:
# Because we are using logrotate for greater flexibility, disable the
  1. Save and close the file (if you’re using nano, you can do this by pressing Ctrl+X to close, and then Y to confirm saving changes).

  2. Now, try running the certbot command again:

sudo certbot certonly --standalone --preferred-challenges http -d example.com

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.