One installer sets up Let's Encrypt on a Debian or Ubuntu server, keeps every certificate renewed, and tells you on Telegram when something needs attention.
bash <(curl -fsSL https://github.com/Plus98ir/Auto_SSL/releases/latest/download/install-ssl-manager.sh)www added only when it resolves) or wildcard. Picks nginx or standalone mode on its own..crt, .key and optionally .pfx for panels like x-ui and Marzban./etc/letsencrypt in one file, and puts it back just as easily.Skip this if you only want the terminal menu.
/newbot and choose a display name.bot, for example MySSLManagerBot./start to @userinfobot. Repeat for every admin./revoke and run the installer again.On a Debian or Ubuntu server, as root:
bash <(curl -fsSL https://github.com/Plus98ir/Auto_SSL/releases/latest/download/install-ssl-manager.sh)
The installer asks for:
It then installs the packages, writes the config, the renewal hook, the daily expiry check and the bot service, and opens the menu.
systemctl disable --now ssl-bot first, so two listeners never poll the same token.Type ssl at any time.
| Option | What it does |
|---|---|
| 1 New certificate | Standard or wildcard, with an optional dry run first. |
| 2 Renew one | Pick a domain from the list and force-renew it. |
| 3 Renew all | Renews everything that is due, or tests it with a dry run. |
| 4 Status of all | Full certbot output plus days left for each domain. |
| 5 Status of one | Details for a single certificate. |
| 6 Delete or revoke | Deletes locally, or revokes at Let's Encrypt too. Removes the matching nginx vhost. |
| 7 Export | Writes .crt / .key / .pfx to /root/ssl-exports/. |
| 8 Backup or restore | Archives to /root/ssl-backups/, or restores from an archive. |
| 9 Settings | Post-renew command, copy-to folder, and a Telegram test message. |
| 10 Uninstall | Removes SSL Manager. Certificates are kept. |
Only the admin IDs you entered get a reply. Everyone else is ignored.
| Command | What it does |
|---|---|
/start | Opens the button menu. |
/status | Pick a domain to see its details and days left. |
/renew | Pick a domain to renew now. |
/newcert example.com | Checks DNS and port 80, issues the certificate and sends the files. |
/download | Pick a domain to receive its certificate files. |
/backup | Creates a backup on the server, and sends it if key sending is on. |
SEND_KEYS="no" the bot sends only fullchain.pem and tells you where the private key is on the server. Anything sent through Telegram stays on Telegram's servers.You don't need to do anything once a certificate is issued.
certbot.timer handles renewals.certbot renew twice a day with the proxy set./etc/letsencrypt/renewal-hooks/deploy/ reloads nginx, copies the files if you set a folder, runs your command, and messages the admins.Everything lives in /etc/ssl-manager/config (mode 600). Menu option 9 edits the common settings for you.
| Setting | Default | Meaning |
|---|---|---|
EMAIL | — | Address for Let's Encrypt notices. |
PROXY_URL | empty | For example http://user:[email protected]:8080. Leave empty for a direct connection. |
BOT_TOKEN | — | Token from BotFather. |
ADMIN_IDS | — | Numeric IDs, comma separated. |
SEND_KEYS | no | Whether the bot may send private keys and backups. |
POST_RENEW_CMD | empty | Run after each renewal, for example systemctl restart xray. |
COPY_TO_DIR | empty | Copy fullchain.pem and privkey.pem here after each renewal. |
EXPIRY_WARN_DAYS | 20 | Report certificates with this many days or fewer left. |
| Path | Purpose |
|---|---|
/etc/ssl-manager/config | Settings and secrets. |
/usr/local/bin/ssl | Terminal menu. |
/usr/local/bin/ssl-bot.sh | Telegram bot, run by the ssl-bot service. |
/usr/local/bin/ssl-lib.sh | Shared helpers. |
/usr/local/bin/ssl-expiry-check.sh | Daily expiry report. |
/etc/letsencrypt/renewal-hooks/deploy/00-ssl-manager.sh | Runs after every renewal. |
/var/log/ssl-manager.log | Issues, renewals and warnings. |
/root/ssl-backups/ | Backup archives. |
/root/ssl-exports/ | Exported certificate files. |
600).700.@ or # work.Only if the server can't reach acme-v02.api.letsencrypt.org or api.telegram.org directly. Servers outside Iran should leave it empty.
The proxy has to be reachable from the server itself. 127.0.0.1 means the server, not your own computer. Check it with:
ss -ltnp | grep <port>
curl -x http://127.0.0.1:<port> -I https://api.telegram.org| Symptom | Cause and fix |
|---|---|
| The bot doesn't answer | Check systemctl status ssl-bot and journalctl -u ssl-bot -f. Make sure an old v1 listener isn't using the same token, and that your ID is in ADMIN_IDS. |
| Domain does not resolve | The A record is missing or hasn't propagated. Fix DNS and try again. |
| Port 80 is busy | Another service (Apache, HAProxy, Xray) holds port 80. Stop it for issuing, or put nginx in front. |
| Too many failed authorizations | Let's Encrypt rate limit. Wait an hour and use a dry run until it passes. |
| Wildcard didn't renew | It was issued in manual mode. Reissue it in Cloudflare mode. |
| Renewed, but the site shows the old certificate | The service using it wasn't restarted. Set POST_RENEW_CMD. |
| No renewal messages on Telegram | Use menu option 9 to send a test message. If it fails, check the token and the proxy. |