I ran this command: sudo certbot certonly --standalone
It produced this output:
First time it hanged on ‘cleaning challenges…’ and I interrupted it by ctrl+c
And after that, every time I try to run the same command, after entering my email address, it says:
Obtaining a new certificate
An unexpected error occurred:
Error creating new order :: Cannot issue for "emran.bm@gmail.com": Invalid character in DNS name
Please see the logfiles in /var/log/letsencrypt for more details.
My web server is (include version): I’ve a fresh VPS and no webserver app yet.
The operating system my web server runs on is (include version): Ubuntu 16.04
My hosting provider, if applicable, is: haio.ir
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): 0.31.0
When you first run Certbot, it may ask you for your e-mail address in order to associate that with your new Let’s Encrypt account. (Let’s Encrypt uses this to send certificate expiration warnings and sometimes other important notices, like if a user is using an obsolete client application that will stop working in the future.)
However, that e-mail address is then saved and Certbot will not ask you for it again.
When you run Certbot after the account has been created, it only needs to know the Internet domain name or domain names that you want to request certificates for (in this case, probably dongap.ir and perhaps www.dongap.ir), not your e-mail address.
If you're going to install a webserver app later, --standalone might not be the best choice because the webserver app may conflict with Certbot during Certbot's renewal attempts. (The --standalone method creates its own temporary webserver listening on port 80, which won't work at renewal time if there's another webserver using that port, unless you temporarily shut down the other server.)
I see. But there going to be some standalone docker containers, not a direct web server.
Perhaps I should use those before/after hooks
However, thanks a lot for your reply