diff --git a/frontend/public/json/kutt.json b/frontend/public/json/kutt.json index d2637f7f1..d93424b33 100644 --- a/frontend/public/json/kutt.json +++ b/frontend/public/json/kutt.json @@ -31,10 +31,5 @@ "username": null, "password": null }, - "notes": [ - { - "text": "A reverse proxy that serves an SSL certificate is required. Otherwise the login will not work.", - "type": "warning" - } - ] + "notes": [] } diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 1926e63cc..3ebd09422 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -13,6 +13,10 @@ setting_up_container network_check update_os +msg_info "Installing Dependencies" +$STD apt-get install -y caddy +msg_ok "Installed Dependencies" + NODE_VERSION="22" setup_nodejs fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball" @@ -22,7 +26,19 @@ cp .example.env ".env" sed -i "s|JWT_SECRET=|JWT_SECRET=$(openssl rand -base64 32)|g" ".env" $STD npm install $STD npm run migrate +msg_ok "Configured Kutt" +msg_info "Configuring SSL" +LXCIP=$(hostname -I | awk '{print $1}') +cat </etc/caddy/Caddyfile +$LXCIP { + reverse_proxy localhost:3000 +} +EOF +$STD systemctl restart caddy +msg_ok "Configured SSL" + +msg_info "Creating Services" cat </etc/systemd/system/kutt.service [Unit] Description=Kutt server @@ -37,8 +53,8 @@ Restart=always [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now kutt -msg_ok "Configured Kutt" +$STD systemctl enable -q --now kutt +msg_ok "Created Services" motd_ssh customize