A simple and automatic script to obtain free SSL certificates from Letβs Encrypt using acme.sh on Linux servers without the need for a web server.
- Automatic installation and setup of acme.sh
- Issue SSL certificates using standalone mode (no web server required)
- Saves private key and certificate with
.pemextension under/root/cert/yourdomain/ - Colorful terminal messages for better user experience
- Operating System: Ubuntu or other Linux distributions
- Root access
- Port 80 must be free and not used by any other service
-
Download the script directly:
curl -4 -O https://raw.githubusercontent.com/monhacer/AutoSSL/main/AutoSSL.shor
wget -4 https://raw.githubusercontent.com/monhacer/AutoSSL/main/AutoSSL.sh -
Make it executable:
chmod +x AutoSSL.sh -
Run the script with root permissions:
sudo ./AutoSSL.sh -
Enter your domain and email when prompted.
-
Your private key and certificate will be saved in
/root/cert/yourdomain/.
acme.sh automatically sets up a cron job for certificate renewal.
To view cron jobs, run:
crontab -l
wget -4 https://raw.githubusercontent.com/monhacer/AutoSSL/main/AutoSSL.sh
chmod +x AutoSSL.sh
sudo ./AutoSSL.sh
- Make sure port 80 is open and not occupied by any other service.
- This script only obtains and saves certificates; installing them on your services is your responsibility.
This project is licensed under the MIT License.
For questions or suggestions, please visit my GitHub profile: aioexp