From 425a865b339e8803e2b380fcaf4efdf6cbd158a4 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Fri, 6 Oct 2023 11:36:26 +0800 Subject: [PATCH] add caddy-install.sh --- caddy-install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 caddy-install.sh diff --git a/caddy-install.sh b/caddy-install.sh new file mode 100644 index 0000000..c5f19d6 --- /dev/null +++ b/caddy-install.sh @@ -0,0 +1,10 @@ +echo Installing this package automatically starts and runs Caddy as a systemd service named caddy. It also comes with an optional caddy-api service which is not enabled by default, but should be used if you primarily configure Caddy via its API instead of config files. + +sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list +sudo apt update +sudo apt install caddy + +echo Certificates will be saved automatically in ~/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/ +echo Systemctl's caddy config file: /etc/caddy/Caddyfile