Operations 8 min read

Guide to Upgrading HTTP Sites to HTTPS Using acme.sh

This article explains why and how to upgrade an HTTP website to HTTPS, introduces the differences between the protocols, compares paid and free CA certificates, and provides a step‑by‑step tutorial for installing, issuing, installing, and automatically renewing certificates with the acme.sh script.

Architect's Tech Stack
Architect's Tech Stack
Architect's Tech Stack
Guide to Upgrading HTTP Sites to HTTPS Using acme.sh

Many site owners need to upgrade from HTTP to HTTPS for security and platform requirements.

HTTPS adds SSL/TLS on top of HTTP, requiring a CA certificate to authenticate the server and encrypt traffic.

Certificates can be purchased or obtained for free from Let’s Encrypt. The free option is suitable for small sites.

The script acme.sh automates obtaining and renewing Let’s Encrypt certificates using the ACME protocol.

Installation is a single command:

curl https://get.acme.sh | sh

After installation, the script resides in ~/.acme.sh/ and creates a cron job to check certificates daily.

Certificates can be issued via HTTP validation (placing a file in the webroot) or DNS validation (adding a TXT record). Example commands:

acme.sh --issue -d mydomain.com -d www.mydomain.com --webroot /home/wwwroot/mydomain.com/
acme.sh --issue -d mydomain.com --apache
acme.sh --issue -d mydomain.com --nginx
acme.sh --issue -d mydomain.com --standalone
acme.sh --issue --dns -d mydomain.com

After issuance, install the certificate to the desired location using --installcert with parameters for key, fullchain, and reload command, e.g.:

acme.sh --installcert -d <domain>.com \
--key-file /etc/nginx/ssl/<domain>.key \
--fullchain-file /etc/nginx/ssl/fullchain.cer \
--reloadcmd "service nginx force-reload"

Certificates auto‑renew after 60 days; the script can be upgraded with:

acme.sh --upgrade

Automatic upgrades can be enabled:

acme.sh --upgrade --auto-upgrade

For troubleshooting, add --debug or --debug 2 to the issue command.

automationcertificateHTTPSSSLacme.shletsencrypt
Architect's Tech Stack
Written by

Architect's Tech Stack

Java backend, microservices, distributed systems, containerized programming, and more.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.