Renewing my ssl

Keywords: Apache Guacamole - Linux - Technical issue - Secure Connections (SSL/HTTPS)
bnsupport ID: 79ff3710-5728-32d1-cc87-94a1417a4600
Description:
I was going to renew my certificate to keep my secure padlock going so I ran these commands but noticed that it showed an error. I have these two commands wrote down so every 90 days my reminder pops up to renew the ssl certificate so my website doesn’t show the unsecured padlock. Are there any other commands I can save to run that I should add to my list? Maybe a command to check how much longer my certificate is good for.

kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/letsencrypt/lego --tls --email="solarshadestinting@icloud.com" --domains=“solarshadestinting.com” --domains=“www.solarshadestinting.com” --path="/opt/bitnami/letsencrypt" run
2020/08/16 01:24:55 [INFO] [solarshadestinting.com, www.solarshadestinting.com] acme: Obtaining bundled SAN certificate
2020/08/16 01:24:55 [INFO] [solarshadestinting.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/6563607458
2020/08/16 01:24:55 [INFO] [www.solarshadestinting.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/6563607459
2020/08/16 01:24:55 [INFO] [solarshadestinting.com] acme: use tls-alpn-01 solver
2020/08/16 01:24:55 [INFO] [www.solarshadestinting.com] acme: use tls-alpn-01 solver
2020/08/16 01:24:55 [INFO] [solarshadestinting.com] acme: Trying to solve TLS-ALPN-01
2020/08/16 01:24:56 [INFO] [www.solarshadestinting.com] acme: Trying to solve TLS-ALPN-01
2020/08/16 01:24:56 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/6563607458
2020/08/16 01:24:56 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/6563607459
2020/08/16 01:24:56 Could not obtain certificates:
error: one or more domains had a problem:
[solarshadestinting.com] [solarshadestinting.com] acme: error presenting token: could not start HTTPS server for challenge: listen tcp :443: bind: address already in use
[www.solarshadestinting.com] [www.solarshadestinting.com] acme: error presenting token: could not start HTTPS server for challenge: listen tcp :443: bind: address already in use
kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/ctlscript.sh restart
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
/opt/bitnami/php/scripts/ctl.sh : php-fpm stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql started at port 3306
/opt/bitnami/php/scripts/ctl.sh : php-fpm started
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
kevinmatthew48@wordpress-1-vm:~$

Hi @kevinmatthew48,

Thanks for using Bitnami!. if you check the documentation you need to run the following command

sudo /opt/bitnami/ctlscript.sh stop
sudo /opt/bitnami/letsencrypt/lego --tlsemail="solarshadestinting@icloud.com" --domains="solarshadestinting.com" --domains="www.solarshadestinting.com" --path="/opt/bitnami/letsencrypt" renew --days 90
sudo /opt/bitnami/ctlscript.sh start

You are using run instead of renew.

I hope that helps you.
Ibone

After running those commands, now my web site doesn’t have a secure certificate.

Here are the commands:
kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/ctlscript.sh stop
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
/opt/bitnami/php/scripts/ctl.sh : php-fpm stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql stopped
kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/letsencrypt/lego --tlsemail="solarshadestinting@icloud.com" --domains=“solarshadestinting.com” --domains=“www.solarshadestinting.com” --path="/opt/bitnami/letsencrypt" renew --days 90
Incorrect Usage. flag provided but not defined: -tlsemail

NAME:
lego - Let’s Encrypt client written in Go

USAGE:
lego [global options] command [command options] [arguments…]

VERSION:
3.7.0

COMMANDS:
run Register an account, then create and install a certificate
revoke Revoke a certificate
renew Renew a certificate
dnshelp Shows additional help for the ‘–dns’ global option
list Display certificates and accounts information.
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
–domains value, -d value Add a domain to the process. Can be specified multiple times.
–server value, -s value CA hostname (and optionally :port). The server certificate must be trusted in order to avoid further modifications to the client. (default: “https://acme-v02.api.letsencrypt.org/directory”)
–accept-tos, -a By setting this flag to true you indicate that you accept the current Let’s Encrypt terms of service.
–email value, -m value Email used for registration and recovery contact.
–csr value, -c value Certificate signing request filename, if an external CSR is to be used.
–eab Use External Account Binding for account registration. Requires --kid and --hmac.
–kid value Key identifier from External CA. Used for External Account Binding.
–hmac value MAC key from External CA. Should be in Base64 URL Encoding without padding format. Used for External Account Binding.
–key-type value, -k value Key type to use for private keys. Supported: rsa2048, rsa4096, rsa8192, ec256, ec384. (default: “ec384”)
–filename value (deprecated) Filename of the generated certificate.
–path value Directory to use for storing the data. (default: “/home/kevinmatthew48/.lego”) [$LEGO_PATH]
–http Use the HTTP challenge to solve challenges. Can be mixed with other types of challenges. --http.port value Set the port and interface to use for HTTP based challenges to listen on.Supported: interface:port or :port. (default: “:80”)
–http.proxy-header value Validate against this HTTP header when solving HTTP based challenges behind a reverse proxy. (default: “Host”)
–http.webroot value Set the webroot folder to use for HTTP based challenges to write directly in a file in .well-known/acme-challenge. This disables the built-in server and expects the given directory to be publicly served with access to .well-known/acme-challenge
–http.memcached-host value Set the memcached host(s) to use for HTTP based challenges. Challenges will be written to all specified hosts.
–tls Use the TLS challenge to solve challenges. Can be mixed with other types of challenges.
–tls.port value Set the port and interface to use for TLS based challenges to listen on. Supported: interface:port or :port. (default: “:443”)
–dns value Solve a DNS challenge using the specified provider. Can be mixed with other types of challenges. Run ‘lego dnshelp’ for help on usage.
–dns.disable-cp By setting this flag to true, disables the need to wait the propagation of the TXT record to all authoritative name servers.
–dns.resolvers value Set the resolvers to use for performing recursive DNS queries. Supported: host:port. The default is to use the system resolvers, or Google’s DNS resolvers if the system’s cannot be determined.
–http-timeout value Set the HTTP timeout value to a specific value in seconds. (default: 0)
–dns-timeout value Set the DNS timeout value to a specific value in seconds. Used only when performing authoritative name servers queries. (default: 10)
–pem Generate a .pem file by concatenating the .key and .crt files together.
–cert.timeout value Set the certificate timeout value to a specific value in seconds. Only used when obtaining certificates. (default: 30)
–help, -h show help
–version, -v print the version
2020/08/24 02:35:55 flag provided but not defined: -tlsemail
kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/ctlscript.sh start
/opt/bitnami/mysql/scripts/ctl.sh : mysql started at port 3306
/opt/bitnami/php/scripts/ctl.sh : php-fpm started
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/letsencrypt/lego --tls --email="solarshadestinting@icloud.com" --domains=“solarshadestinting.com” --domains=“www.solarshadestinting.com” --path="/opt/bitnami/letsencrypt" run
2020/08/24 02:41:33 [INFO] [solarshadestinting.com, www.solarshadestinting.com] acme: Obtaining bundled SAN certificate
2020/08/24 02:41:34 [INFO] [solarshadestinting.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/6734827207
2020/08/24 02:41:34 [INFO] [www.solarshadestinting.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/6734827209
2020/08/24 02:41:34 [INFO] [solarshadestinting.com] acme: use tls-alpn-01 solver 2020/08/24 02:41:34 [INFO] [www.solarshadestinting.com] acme: use tls-alpn-01 solver
2020/08/24 02:41:34 [INFO] [solarshadestinting.com] acme: Trying to solve TLS-ALPN-01
2020/08/24 02:41:35 [INFO] [www.solarshadestinting.com] acme: Trying to solve TLS-ALPN-01
2020/08/24 02:41:35 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/6734827207
2020/08/24 02:41:36 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/6734827209
2020/08/24 02:41:36 Could not obtain certificates:
error: one or more domains had a problem:
[solarshadestinting.com] [solarshadestinting.com] acme: error presenting token: could not start HTTPS server for challenge: listen tcp :443: bind: address already in use
[www.solarshadestinting.com] [www.solarshadestinting.com] acme: error presenting token: could not start HTTPS server for challenge: listen tcp :443: bind: address already in use
kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/ctlscript.sh restart
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
/opt/bitnami/php/scripts/ctl.sh : php-fpm stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql started at port 3306
/opt/bitnami/php/scripts/ctl.sh : php-fpm started
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/ctlscript.sh stop
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
/opt/bitnami/php/scripts/ctl.sh : php-fpm stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql stopped
kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/letsencrypt/lego --tlsemail="solarshadestinting@icloud.com" --domains=“solarshadestinting.com” --domains=“www.solarshadestinting.com” --path="/opt/bitnami/letsencrypt" renew --days 90
Incorrect Usage. flag provided but not defined: -tlsemail

NAME:
lego - Let’s Encrypt client written in Go

USAGE:
lego [global options] command [command options] [arguments…]

VERSION:
3.7.0

COMMANDS:
run Register an account, then create and install a certificate
revoke Revoke a certificate
renew Renew a certificate
dnshelp Shows additional help for the ‘–dns’ global option
list Display certificates and accounts information.
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
–domains value, -d value Add a domain to the process. Can be specified multiple times.
–server value, -s value CA hostname (and optionally :port). The server certificate must be trusted in order to avoid further modifications to the client. (default: “https://acme-v02.api.letsencrypt.org/directory”)
–accept-tos, -a By setting this flag to true you indicate that you accept the current Let’s Encrypt terms of service.
–email value, -m value Email used for registration and recovery contact.
–csr value, -c value Certificate signing request filename, if an external CSR is to be used.
–eab Use External Account Binding for account registration. Requires --kid and --hmac.
–kid value Key identifier from External CA. Used for External Account Binding.
–hmac value MAC key from External CA. Should be in Base64 URL Encoding without padding format. Used for External Account Binding.
–key-type value, -k value Key type to use for private keys. Supported: rsa2048, rsa4096, rsa8192, ec256, ec384. (default: “ec384”)
–filename value (deprecated) Filename of the generated certificate.
–path value Directory to use for storing the data. (default: “/home/kevinmatthew48/.lego”) [$LEGO_PATH]
–http Use the HTTP challenge to solve challenges. Can be mixed with other types of challenges.
–http.port value Set the port and interface to use for HTTP based challenges to listen on.Supported: interface:port or :port. (default: “:80”)
–http.proxy-header value Validate against this HTTP header when solving HTTP based challenges behind a reverse proxy. (default: “Host”)
–http.webroot value Set the webroot folder to use for HTTP based challenges to write directly in a file in .well-known/acme-challenge. This disables the built-in server and expects the given directory to be publicly served with access to .well-known/acme-challenge
–http.memcached-host value Set the memcached host(s) to use for HTTP based challenges. Challenges will be written to all specified hosts.
–tls Use the TLS challenge to solve challenges. Can be mixed with other types of challenges.
–tls.port value Set the port and interface to use for TLS based challenges to listen on. Supported: interface:port or :port. (default: “:443”)
–dns value Solve a DNS challenge using the specified provider. Can be mixed with other types of challenges. Run ‘lego dnshelp’ for help on usage.
–dns.disable-cp By setting this flag to true, disables the need to wait the propagation of the TXT record to all authoritative name servers.
–dns.resolvers value Set the resolvers to use for performing recursive DNS queries. Supported: host:port. The default is to use the system resolvers, or Google’s DNS resolvers if the system’s cannot be determined.
–http-timeout value Set the HTTP timeout value to a specific value in seconds. (default: 0)
–dns-timeout value Set the DNS timeout value to a specific value in seconds. Used only when performing authoritative name servers queries. (default: 10)
–pem Generate a .pem file by concatenating the .key and .crt files together.
–cert.timeout value Set the certificate timeout value to a specific value in seconds. Only used when obtaining certificates. (default: 30)
–help, -h show help
–version, -v print the version
2020/08/24 02:48:34 flag provided but not defined: -tlsemail
kevinmatthew48@wordpress-1-vm:~$ sudo /opt/bitnami/ctlscript.sh start
/opt/bitnami/mysql/scripts/ctl.sh : mysql started at port 3306
/opt/bitnami/php/scripts/ctl.sh : php-fpm started
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80

nevermind I figured it out
thank you

can you tell me a command I can enter to check how much time until the certificate will expire. Also, how early can I use the renew command prior to 90 days?

Hi @kevinmatthew48,

You can take a look at the certificate information in the browser

You can also run the lego command to renew the certificate and it’ll skip the renew process if the certificate expires in more than 30 days

sudo /opt/bitnami/letsencrypt/lego --tls --email="solarshadestinting@icloud.com" --domains="solarshadestinting.com" --domains="www.solarshadestinting.com" --path="/opt/bitnami/letsencrypt" renew

Happy to help!


Was my answer helpful? Click on :heart:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.