diff --git a/ct/caddy.sh b/ct/caddy.sh index e8fa01b4..96246a79 100644 --- a/ct/caddy.sh +++ b/ct/caddy.sh @@ -10,7 +10,7 @@ APP="Caddy" var_tags="webserver" var_cpu="1" var_ram="512" -var_disk="2" +var_disk="4" var_os="debian" var_version="12" var_unprivileged="1" @@ -46,4 +46,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:80${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:80${CL}" diff --git a/install/caddy-install.sh b/install/caddy-install.sh index 56a8fbd8..8490b970 100644 --- a/install/caddy-install.sh +++ b/install/caddy-install.sh @@ -1,9 +1,8 @@ #!/usr/bin/env bash # Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -14,7 +13,14 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y {debian-keyring,debian-archive-keyring,apt-transport-https,gpg,curl,sudo,mc} +$STD apt-get install -y \ + debian-keyring \ + debian-archive-keyring \ + apt-transport-https \ + gpg \ + curl \ + sudo \ + mc msg_ok "Installed Dependencies" msg_info "Installing Caddy" @@ -24,6 +30,29 @@ $STD apt-get update $STD apt-get install -y caddy msg_ok "Installed Caddy" +read -r -p "Would you like to install xCaddy Addon? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Golang" + cd /opt + set +o pipefail + GOLANG=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1) + wget -q https://golang.org/dl/$GOLANG + tar -xzf $GOLANG -C /usr/local + ln -s /usr/local/go/bin/go /usr/local/bin/go + set -o pipefail + rm -rf /opt/go* + msg_ok "Installed Golang" + + msg_info "Setup xCaddy" + cd /opt + RELEASE=$(curl -s https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + wget -q https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb + $STD dpkg -i xcaddy_${RELEASE:1}_linux_amd64.deb + rm -rf /opt/xcaddy* + $STD xcaddy build + msg_ok "Setup xCaddy" +fi + motd_ssh customize diff --git a/json/caddy.json b/json/caddy.json index 9530b030..bb53fd0d 100644 --- a/json/caddy.json +++ b/json/caddy.json @@ -20,7 +20,7 @@ "resources": { "cpu": 1, "ram": 512, - "hdd": 2, + "hdd": 4, "os": "debian", "version": "12" } @@ -30,5 +30,14 @@ "username": null, "password": null }, - "notes": [] -} \ No newline at end of file + "notes": [ + { + "text": "if you need an internal module run: `caddy add-package PACKAGENAME`", + "type": "info" + }, + { + "text": "if you need an external module run: `xcaddy build --with github.com/caddy-dns/cloudflare`", + "type": "info" + } + ] +}