From 01d2df1834d55b8e08b36149770e96d8ba596a72 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sun, 14 Dec 2025 16:02:37 +0100 Subject: [PATCH 01/13] feat: add kutt --- ct/kutt.sh | 65 ++++++++++++++++++++++++++++++++++ frontend/public/json/kutt.json | 40 +++++++++++++++++++++ install/kutt-install.sh | 57 +++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 ct/kutt.sh create mode 100644 frontend/public/json/kutt.json create mode 100644 install/kutt-install.sh diff --git a/ct/kutt.sh b/ct/kutt.sh new file mode 100644 index 000000000..20e916553 --- /dev/null +++ b/ct/kutt.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tomfrenzel/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tomfrenzel +# License: MIT | https://github.com/tomfrenzel/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/thedevs-network/kutt + +APP="Kutt" +var_tags="${var_tags:-sharing}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-2}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d $APP_DIR ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "kutt" "thedevs-network/kutt"; then + msg_info "Stopping services" + systemctl stop kutt + msg_ok "Stopped services" + + msg_info "Updating packages" + $STD apt-get update + $STD apt-get dist-upgrade + msg_ok "Updated packages" + + fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball" "latest" + + msg_info "Configuring Kutt" + cd /opt/kutt + npm install + npm run migrate + msg_ok "Configured Kutt" + + msg_info "Starting services" + systemctl start kutt + msg_ok "Started services" + msg_ok "Updated successfully" + fi + exit +} + +start +build_container +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}:3000${CL}" diff --git a/frontend/public/json/kutt.json b/frontend/public/json/kutt.json new file mode 100644 index 000000000..09e72940c --- /dev/null +++ b/frontend/public/json/kutt.json @@ -0,0 +1,40 @@ +{ + "name": "Kutt", + "slug": "kutt", + "categories": [ + 21 + ], + "date_created": "2025-12-14", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://github.com/thedevs-network/kutt/", + "config_path": "/etc/kutt-data/.env", + "website": "https://kutt.it", + "logo": "https://kutt.it/images/favicon-196x196.png", + "description": "Kutt is a modern URL shortener with support for custom domains. Create and edit links, view statistics, manage users, and more.", + "install_methods": [ + { + "type": "default", + "script": "ct/kutt.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 2, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "A valid TLS certificate is **REQUIRED**", + "type": "warning" + } + ] +} diff --git a/install/kutt-install.sh b/install/kutt-install.sh new file mode 100644 index 000000000..28a03af05 --- /dev/null +++ b/install/kutt-install.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tomfrenzel +# License: MIT | https://github.com/tomfrenzel/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/thedevs-network/kutt + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +read -r -p "${TAB3}Enter the hostname of your Kutt instance (eg kutt.domain.tld): " kutt_host +if [[ "$kutt_host" ]]; then + KUTT_HOST="$kutt_host" +fi + +NODE_VERSION="22" setup_nodejs + +fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball" + +msg_info "Configuring Kutt" +cd /opt/kutt +cp .example.env ".env" +sed -i "s|DEFAULT_DOMAIN=localhost:3000|DEFAULT_DOMAIN=${KUTT_HOST}|g" ".env" +sed -i "s|JWT_SECRET=|JWT_SECRET=$(openssl rand -base64 32)|g" ".env" +npm install +npm run migrate + +cat </etc/systemd/system/kutt.service +[Unit] +Description=Kutt server +After=network-online.target + +[Service] +Type=simple +WorkingDirectory=/opt/kutt +ExecStart=/usr/bin/node server/server.js --production +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now kutt.service +msg_ok "Configured Kutt" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 5e069246045776927a44c38313e91528ff538326 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sun, 14 Dec 2025 16:56:15 +0100 Subject: [PATCH 02/13] renaming --- ct/kutt.sh | 4 ++-- install/kutt-install.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/kutt.sh b/ct/kutt.sh index 20e916553..b955a3774 100644 --- a/ct/kutt.sh +++ b/ct/kutt.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tomfrenzel/ProxmoxVED/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: tomfrenzel -# License: MIT | https://github.com/tomfrenzel/ProxmoxVED/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://github.com/thedevs-network/kutt APP="Kutt" diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 28a03af05..42e501f9a 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -2,7 +2,7 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: tomfrenzel -# License: MIT | https://github.com/tomfrenzel/ProxmoxVED/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://github.com/thedevs-network/kutt source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" From 95426e1e1ebf43cb19f7e7470ed4d3cbc2d626c2 Mon Sep 17 00:00:00 2001 From: Tom Frenzel <40773830+tomfrenzel@users.noreply.github.com> Date: Sun, 14 Dec 2025 17:09:37 +0100 Subject: [PATCH 03/13] Update install/kutt-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/kutt-install.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 42e501f9a..35be25b74 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -49,9 +49,4 @@ msg_ok "Configured Kutt" motd_ssh customize - -# Cleanup -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" +cleanup_lxc From 5af193b759e8919ce7e05b14cbed6418cd515ff5 Mon Sep 17 00:00:00 2001 From: Tom Frenzel <40773830+tomfrenzel@users.noreply.github.com> Date: Sun, 14 Dec 2025 17:09:44 +0100 Subject: [PATCH 04/13] Update ct/kutt.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- ct/kutt.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ct/kutt.sh b/ct/kutt.sh index b955a3774..8845d6a5b 100644 --- a/ct/kutt.sh +++ b/ct/kutt.sh @@ -34,10 +34,6 @@ function update_script() { systemctl stop kutt msg_ok "Stopped services" - msg_info "Updating packages" - $STD apt-get update - $STD apt-get dist-upgrade - msg_ok "Updated packages" fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball" "latest" From f4ef536425b2eba0efaffb9fabb7ae377f36b863 Mon Sep 17 00:00:00 2001 From: Tom Frenzel <40773830+tomfrenzel@users.noreply.github.com> Date: Sun, 14 Dec 2025 17:12:28 +0100 Subject: [PATCH 05/13] Update install/kutt-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- 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 35be25b74..c22a6b473 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -44,7 +44,7 @@ Restart=always [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now kutt.service +systemctl enable -q --now kutt msg_ok "Configured Kutt" motd_ssh From 924a67a69c5b05c923765249712f96e703171c54 Mon Sep 17 00:00:00 2001 From: Tom Frenzel <40773830+tomfrenzel@users.noreply.github.com> Date: Sun, 14 Dec 2025 17:19:29 +0100 Subject: [PATCH 06/13] Update install/kutt-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/kutt-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/kutt-install.sh b/install/kutt-install.sh index c22a6b473..05235c469 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -19,7 +19,6 @@ if [[ "$kutt_host" ]]; then fi NODE_VERSION="22" setup_nodejs - fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball" msg_info "Configuring Kutt" From 227b7fa88d185af1e0fb77102cfe4ff9d828ad81 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sun, 14 Dec 2025 17:25:10 +0100 Subject: [PATCH 07/13] apply requested changes --- ct/kutt.sh | 5 ++--- install/kutt-install.sh | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ct/kutt.sh b/ct/kutt.sh index 8845d6a5b..d3b843318 100644 --- a/ct/kutt.sh +++ b/ct/kutt.sh @@ -34,13 +34,12 @@ function update_script() { systemctl stop kutt msg_ok "Stopped services" - fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball" "latest" msg_info "Configuring Kutt" cd /opt/kutt - npm install - npm run migrate + $STD npm install + $STD npm run migrate msg_ok "Configured Kutt" msg_info "Starting services" diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 05235c469..102b49e34 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -26,8 +26,8 @@ cd /opt/kutt cp .example.env ".env" sed -i "s|DEFAULT_DOMAIN=localhost:3000|DEFAULT_DOMAIN=${KUTT_HOST}|g" ".env" sed -i "s|JWT_SECRET=|JWT_SECRET=$(openssl rand -base64 32)|g" ".env" -npm install -npm run migrate +$STD npm install +$STD npm run migrate cat </etc/systemd/system/kutt.service [Unit] From a8cc22c149c7a56b567d256a87a979444402093d Mon Sep 17 00:00:00 2001 From: Tom Frenzel <40773830+tomfrenzel@users.noreply.github.com> Date: Sun, 14 Dec 2025 18:10:59 +0100 Subject: [PATCH 08/13] update icon --- frontend/public/json/kutt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/kutt.json b/frontend/public/json/kutt.json index 09e72940c..032f3d770 100644 --- a/frontend/public/json/kutt.json +++ b/frontend/public/json/kutt.json @@ -12,7 +12,7 @@ "documentation": "https://github.com/thedevs-network/kutt/", "config_path": "/etc/kutt-data/.env", "website": "https://kutt.it", - "logo": "https://kutt.it/images/favicon-196x196.png", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/kutt.webp", "description": "Kutt is a modern URL shortener with support for custom domains. Create and edit links, view statistics, manage users, and more.", "install_methods": [ { From 32fda4e1dbe334169ba26f5a1b11e7c9b85e95cd Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Mon, 15 Dec 2025 19:12:40 +0100 Subject: [PATCH 09/13] update ssl warning --- frontend/public/json/kutt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/kutt.json b/frontend/public/json/kutt.json index 032f3d770..d2637f7f1 100644 --- a/frontend/public/json/kutt.json +++ b/frontend/public/json/kutt.json @@ -33,7 +33,7 @@ }, "notes": [ { - "text": "A valid TLS certificate is **REQUIRED**", + "text": "A reverse proxy that serves an SSL certificate is required. Otherwise the login will not work.", "type": "warning" } ] From 3fe25cd0aa31800f5fe396960fbf416862f45d67 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sat, 3 Jan 2026 14:52:07 +0100 Subject: [PATCH 10/13] remove custom domain configuration --- install/kutt-install.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 102b49e34..1926e63cc 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -13,18 +13,12 @@ setting_up_container network_check update_os -read -r -p "${TAB3}Enter the hostname of your Kutt instance (eg kutt.domain.tld): " kutt_host -if [[ "$kutt_host" ]]; then - KUTT_HOST="$kutt_host" -fi - NODE_VERSION="22" setup_nodejs fetch_and_deploy_gh_release "kutt" "thedevs-network/kutt" "tarball" msg_info "Configuring Kutt" cd /opt/kutt cp .example.env ".env" -sed -i "s|DEFAULT_DOMAIN=localhost:3000|DEFAULT_DOMAIN=${KUTT_HOST}|g" ".env" sed -i "s|JWT_SECRET=|JWT_SECRET=$(openssl rand -base64 32)|g" ".env" $STD npm install $STD npm run migrate From 714320a75417578324188497e50a4490fa9eabee Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sat, 3 Jan 2026 15:25:27 +0100 Subject: [PATCH 11/13] add caddy for ssl termination --- frontend/public/json/kutt.json | 7 +------ install/kutt-install.sh | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 8 deletions(-) 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 From a5f8709fb72f371753c8e90ce778c765077f0bc0 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sat, 3 Jan 2026 16:26:33 +0100 Subject: [PATCH 12/13] use standardized ip retrieval --- 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 3ebd09422..b446125f4 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -29,9 +29,9 @@ $STD npm run migrate msg_ok "Configured Kutt" msg_info "Configuring SSL" -LXCIP=$(hostname -I | awk '{print $1}') +import_local_ip cat </etc/caddy/Caddyfile -$LXCIP { +$LOCAL_IP { reverse_proxy localhost:3000 } EOF From 2bd92fb05a606f12d4e4955fb20c37d3737421e7 Mon Sep 17 00:00:00 2001 From: Tom Frenzel Date: Sat, 3 Jan 2026 17:41:49 +0100 Subject: [PATCH 13/13] move ip retrieval call --- 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 b446125f4..89d06fcba 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -19,6 +19,7 @@ msg_ok "Installed Dependencies" 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 @@ -29,7 +30,6 @@ $STD npm run migrate msg_ok "Configured Kutt" msg_info "Configuring SSL" -import_local_ip cat </etc/caddy/Caddyfile $LOCAL_IP { reverse_proxy localhost:3000