mitai-jinkendo/nginx/certbot-setup.sh
Lars Stommer 89b6c0b072
Some checks are pending
Deploy to Raspberry Pi / deploy (push) Waiting to run
Build Test / build-frontend (push) Waiting to run
Build Test / lint-backend (push) Waiting to run
feat: initial commit – Mitai Jinkendo v9a
2026-03-16 13:35:11 +01:00

35 lines
876 B
Bash

#!/bin/bash
# Let's Encrypt Setup für mitai.jinkendo.de
# Voraussetzungen:
# - nginx läuft
# - Port 80 ist von außen erreichbar (DynDNS/MyFRITZ!)
# - mitai.jinkendo.de zeigt auf diese IP
DOMAIN="mitai.jinkendo.de"
EMAIL="lars@stommer.de" # Für Let's Encrypt Benachrichtigungen
echo "=== Let's Encrypt Setup für $DOMAIN ==="
# Certbot installieren
sudo apt-get update
sudo apt-get install -y certbot python3-certbot-nginx
# Zertifikat holen
sudo certbot --nginx \
-d $DOMAIN \
--email $EMAIL \
--agree-tos \
--non-interactive \
--redirect
echo ""
echo "=== Auto-Renewal einrichten ==="
# Certbot richtet automatisch einen systemd-Timer ein
# Prüfen mit:
sudo systemctl status certbot.timer
echo ""
echo "=== Fertig! ==="
echo "Zertifikat läuft 90 Tage, erneuert sich automatisch alle 60 Tage."
echo "Prüfen mit: sudo certbot renew --dry-run"