mirror of
https://github.com/serverhype1/caddy-install.git
synced 2026-05-26 06:43:51 +00:00
No description
- Shell 100%
| Install.sh | ||
| README.md | ||
Caddy Install Script
An interactive installation script that automatically installs Caddy as a reverse proxy on Debian-based systems — including an optional update script with a scheduled cronjob.
Featuressd
- Automatic Caddy installation via the official Caddy repository
- Optional update script that handles system updates (
apt update,apt upgrade,apt dist-upgrade,apt autoremove) - Automatic updates — sets up a cronjob that runs every day at 03:00 AM
- Smart detection: skips creation if the update script or cronjob already exists
Quick Start (One-Liner)
Download and run the script directly:
Via Forgejo:
curl -sSL test https://forgejo.serverhype.org/serverhype/caddy-install/raw/branch/main/Install.sh | bash
Via GitHub:
curl -sSL https://raw.githubusercontent.com/serverhype1/caddy-install/refs/heads/main/Install.sh | bash
Installation via Git Clone
Alternatively, clone the repository and run it locally:
Via Forgejo:
git clone https://forgejo.serverhype.org/serverhype/caddy-install.git
cd caddy-install
chmod +x Install.sh
./Install.sh
Via GitHub:
git clone https://github.com/serverhype1/caddy-install.git
cd caddy-install
chmod +x Install.sh
./Install.sh
What the Script Does
- Installs Caddy — adds the official Caddy GPG key and repository, then installs Caddy via
apt - Asks about the update script — prompts whether to create an automatic update script
- If yes:
- Creates
/root/.scripts/update.sh(or appends to it if it already exists) - The update script performs system updates
- Sets up a cronjob (
0 3 * * *) to run the update script daily at 03:00 AM
- Creates
Notes
- The script requires root privileges (
sudo) - The update script is stored at
/root/.scripts/update.sh - If the update script or cronjob already exists, no duplicate entries will be created
Caddy Install Script (Deutsch)
Ein interaktives Installationsskript, das Caddy als Reverse Proxy auf Debian-basierten Systemen automatisch installiert — inklusive optionalem Update-Skript mit geplantem Cronjob.
Features
- Automatische Caddy-Installation über das offizielle Caddy-Repository
- Optionales Update-Skript, das System-Updates übernimmt (
apt update,apt upgrade,apt dist-upgrade,apt autoremove) - Automatische Updates — richtet einen Cronjob ein, der täglich um 03:00 Uhr ausgeführt wird
- Intelligente Erkennung: überspringt die Erstellung, wenn das Update-Skript oder der Cronjob bereits existiert
Schnellstart (One-Liner)
Das Skript direkt herunterladen und ausführen:
Über Forgejo:
curl -sSL https://forgejo.serverhype.org/serverhype/caddy-install/raw/branch/main/Install.sh | bash
Über GitHub:
curl -sSL https://raw.githubusercontent.com/serverhype1/caddy-install/refs/heads/main/Install.sh | bash
Installation via Git Clone
Alternativ das Repository klonen und lokal ausführen:
Über Forgejo:
git clone https://forgejo.serverhype.org/serverhype/caddy-install.git
cd caddy-install
chmod +x Install.sh
./Install.sh
Über GitHub:
git clone https://github.com/serverhype1/caddy-install.git
cd caddy-install
chmod +x Install.sh
./Install.sh
Was das Skript macht
- Installiert Caddy — fügt den offiziellen Caddy-GPG-Key und das Repository hinzu und installiert Caddy via
apt - Fragt nach dem Update-Skript — der Benutzer wird gefragt, ob ein automatisches Update-Skript erstellt werden soll
- Falls ja:
- Erstellt
/root/.scripts/update.sh(oder ergänzt es, falls es bereits existiert) - Das Update-Skript führt System-Updates durch
- Richtet einen Cronjob (
0 3 * * *) ein, der das Update-Skript täglich um 03:00 Uhr ausführt
- Erstellt
Hinweise
- Das Skript benötigt Root-Rechte (
sudo) - Das Update-Skript wird unter
/root/.scripts/update.shgespeichert - Falls das Update-Skript oder der Cronjob bereits existiert, werden keine doppelten Einträge erstellt