From be669ffdce65daade5d5633e2c1d851b0fa9c313 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sun, 4 Jan 2026 12:04:44 +0100 Subject: [PATCH 1/5] kutt: custom hostname option --- ct/kutt.sh | 2 +- frontend/public/json/kutt.json | 7 +++++- install/kutt-install.sh | 39 +++++++++++++++++++++++----------- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/ct/kutt.sh b/ct/kutt.sh index 09f0a3efe..69da55bc1 100644 --- a/ct/kutt.sh +++ b/ct/kutt.sh @@ -71,4 +71,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}https://${IP}${CL}" +echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:3000 or https://${CL}" diff --git a/frontend/public/json/kutt.json b/frontend/public/json/kutt.json index d93424b33..a62e198d7 100644 --- a/frontend/public/json/kutt.json +++ b/frontend/public/json/kutt.json @@ -31,5 +31,10 @@ "username": null, "password": null }, - "notes": [] + "notes": [ + { + "text": "Kutt needs so be served with an SSL certificate for its login to work. During install, you will be prompted to choose if you want to have Caddy installed for SSL termination, or if you want to use your own reverse proxy. You can also skip SSL termination during install and configure it later.", + "type": "info" + } + ] } diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 5bd99cb57..c741c478f 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -13,28 +13,43 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt install -y caddy -msg_ok "Installed Dependencies" +echo "${TAB3}How would you like to handle SSL termination?" +echo "${TAB3}[i]-Internal (self-signed SSL Certificate) [e]-External (use your own reverse proxy)" +read -rp "${TAB3}Enter your choice (default: i): " ssl_choice +ssl_choice=${ssl_choice:-i} +case "${ssl_choice,,}" in +i) + import_local_ip + DEFAULT_HOST="$LOCAL_IP:3000" + + msg_info "Confiuring Caddy" + $STD apt install -y caddy + cat </etc/caddy/Caddyfile +:3000 { + reverse_proxy localhost:3000 +} +EOF + systemctl restart caddy + msg_ok "Installed Caddy" + ;; +e) + read -r -p "${TAB3}Enter the hostname you want to use for Kutt (eg. kutt.example.com)" custom_host + if [[ "$custom_host" ]]; then + DEFAULT_HOST="$custom_host" + fi + ;; +esac NODE_VERSION="22" setup_nodejs fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball" -import_local_ip msg_info "Configuring Kutt" cd /opt/kutt cp .example.env ".env" sed -i "s|JWT_SECRET=|JWT_SECRET=$(openssl rand -base64 32)|g" ".env" -sed -i "s|DEFAULT_DOMAIN=.*|DEFAULT_DOMAIN=https://$LOCAL_IP|g" ".env" +sed -i "s|DEFAULT_HOST=.*|DEFAULT_HOST=https://$DEFAULT_HOST|g" ".env" $STD npm install $STD npm run migrate - -cat </etc/caddy/Caddyfile -$LOCAL_IP { - reverse_proxy localhost:3000 -} -EOF -systemctl restart caddy msg_ok "Configured Kutt" msg_info "Creating Services" From 121478d4df19d1b3f1c93a3da6345fed62d8b7b9 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sun, 4 Jan 2026 13:04:41 +0100 Subject: [PATCH 2/5] kutt: use port 443 --- ct/kutt.sh | 2 +- frontend/public/json/kutt.json | 4 ++-- install/kutt-install.sh | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/kutt.sh b/ct/kutt.sh index 69da55bc1..fb791b457 100644 --- a/ct/kutt.sh +++ b/ct/kutt.sh @@ -71,4 +71,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}https://${IP}:3000 or https://${CL}" +echo -e "${TAB}${GATEWAY}${BGN}https://${IP} or https://${CL}" diff --git a/frontend/public/json/kutt.json b/frontend/public/json/kutt.json index a62e198d7..f4c8186c7 100644 --- a/frontend/public/json/kutt.json +++ b/frontend/public/json/kutt.json @@ -8,7 +8,7 @@ "type": "ct", "updateable": true, "privileged": false, - "interface_port": 3000, + "interface_port": 443, "documentation": "https://github.com/thedevs-network/kutt/", "config_path": "/etc/kutt-data/.env", "website": "https://kutt.it", @@ -33,7 +33,7 @@ }, "notes": [ { - "text": "Kutt needs so be served with an SSL certificate for its login to work. During install, you will be prompted to choose if you want to have Caddy installed for SSL termination, or if you want to use your own reverse proxy. You can also skip SSL termination during install and configure it later.", + "text": "Kutt needs so be served with an SSL certificate for its login to work. During install, you will be prompted to choose if you want to have Caddy installed for SSL termination or if you want to use your own reverse proxy (in that case point your reverse porxy to port 3000).", "type": "info" } ] diff --git a/install/kutt-install.sh b/install/kutt-install.sh index c741c478f..43b2aa684 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -20,17 +20,17 @@ ssl_choice=${ssl_choice:-i} case "${ssl_choice,,}" in i) import_local_ip - DEFAULT_HOST="$LOCAL_IP:3000" + DEFAULT_HOST="$LOCAL_IP:443" msg_info "Confiuring Caddy" $STD apt install -y caddy cat </etc/caddy/Caddyfile -:3000 { +:443 { reverse_proxy localhost:3000 } EOF systemctl restart caddy - msg_ok "Installed Caddy" + msg_ok "Configured Caddy" ;; e) read -r -p "${TAB3}Enter the hostname you want to use for Kutt (eg. kutt.example.com)" custom_host From 6c80eedc97f22cbf6932eedb30d824482bb43aa4 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sun, 4 Jan 2026 13:06:45 +0100 Subject: [PATCH 3/5] kutt: fix typo --- install/kutt-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 43b2aa684..9ce877fed 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -22,7 +22,7 @@ i) import_local_ip DEFAULT_HOST="$LOCAL_IP:443" - msg_info "Confiuring Caddy" + msg_info "Configuring Caddy" $STD apt install -y caddy cat </etc/caddy/Caddyfile :443 { @@ -33,7 +33,7 @@ EOF msg_ok "Configured Caddy" ;; e) - read -r -p "${TAB3}Enter the hostname you want to use for Kutt (eg. kutt.example.com)" custom_host + read -r -p "${TAB3}Enter the hostname you want to use for Kutt (eg. kutt.example.com): " custom_host if [[ "$custom_host" ]]; then DEFAULT_HOST="$custom_host" fi @@ -47,7 +47,7 @@ msg_info "Configuring Kutt" cd /opt/kutt cp .example.env ".env" sed -i "s|JWT_SECRET=|JWT_SECRET=$(openssl rand -base64 32)|g" ".env" -sed -i "s|DEFAULT_HOST=.*|DEFAULT_HOST=https://$DEFAULT_HOST|g" ".env" +sed -i "s|DEFAULT_DOMAIN=.*|DEFAULT_DOMAIN=https://$DEFAULT_HOST|g" ".env" $STD npm install $STD npm run migrate msg_ok "Configured Kutt" From 16934033116f36812999a185f34bf98ef35426df Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sun, 4 Jan 2026 13:29:55 +0100 Subject: [PATCH 4/5] kutt: fix Caddyfile --- install/kutt-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 9ce877fed..4e28b9132 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -25,8 +25,8 @@ i) msg_info "Configuring Caddy" $STD apt install -y caddy cat </etc/caddy/Caddyfile -:443 { - reverse_proxy localhost:3000 +$LOCAL_IP { + reverse_proxy localhost:3000 } EOF systemctl restart caddy From 1d1fdc7d46a90a1298b684f6e85f286dca814c49 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sun, 4 Jan 2026 13:42:23 +0100 Subject: [PATCH 5/5] kutt: remove unnecessary port fom default host --- install/kutt-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 4e28b9132..04efd100b 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -20,7 +20,7 @@ ssl_choice=${ssl_choice:-i} case "${ssl_choice,,}" in i) import_local_ip - DEFAULT_HOST="$LOCAL_IP:443" + DEFAULT_HOST="$LOCAL_IP" msg_info "Configuring Caddy" $STD apt install -y caddy