From 6ec244c99c7555f24639c09c274e2d57a968e27d Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 16:13:42 -0800 Subject: [PATCH 01/18] copy valkey scripts from ProxmoxVE/main --- ct/valkey.sh | 45 ++++++++++++++++++++++++++++++++ frontend/public/json/valkey.json | 35 +++++++++++++++++++++++++ install/valkey-install.sh | 26 ++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 ct/valkey.sh create mode 100644 frontend/public/json/valkey.json create mode 100644 install/valkey-install.sh diff --git a/ct/valkey.sh b/ct/valkey.sh new file mode 100644 index 000000000..6e6039f30 --- /dev/null +++ b/ct/valkey.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: pshankinclarke (lazarillo) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://valkey.io/ + +APP="Valkey" +var_tags="${var_tags:-database}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-4}" +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 [[ ! -f /lib/systemd/system/valkey-server.service ]]; then + msg_error "No Valkey Installation Found!" + exit + fi + msg_info "Updating Valkey LXC" + $STD apt update + $STD apt -y upgrade + msg_ok "Updated Valkey LXC" + msg_ok "Updated successfully!" + 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}:6379${CL}" diff --git a/frontend/public/json/valkey.json b/frontend/public/json/valkey.json new file mode 100644 index 000000000..bafe38af8 --- /dev/null +++ b/frontend/public/json/valkey.json @@ -0,0 +1,35 @@ +{ + "name": "Valkey", + "slug": "valkey", + "categories": [ + 9 + ], + "date_created": "2025-11-24", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 6379, + "documentation": "https://valkey.io/docs/", + "config_path": "/etc/valkey/valkey.conf", + "website": "https://valkey.io/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/valkey.webp", + "description": "Valkey is an open source (BSD) high-performance key/value datastore that supports a variety of workloads such as caching, message queues, and can act as a primary database. The project is backed by the Linux Foundation, ensuring it will remain open source forever.", + "install_methods": [ + { + "type": "default", + "script": "ct/valkey.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/install/valkey-install.sh b/install/valkey-install.sh new file mode 100644 index 000000000..6a0a1441f --- /dev/null +++ b/install/valkey-install.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: pshankinclarke (lazarillo) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://valkey.io/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Valkey" +$STD apt update +$STD apt install -y valkey +sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf +systemctl enable -q --now valkey-server +systemctl restart valkey-server +msg_ok "Installed Valkey" + +motd_ssh +customize +cleanup_lxc From 7f789ea4c4a823a1915eb2c1d8d11aaaeb5eb347 Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 12:04:58 -0800 Subject: [PATCH 02/18] test auth --- ct/valkey.sh | 2 +- install/valkey-install.sh | 4 +++- misc/build.func | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ct/valkey.sh b/ct/valkey.sh index 6e6039f30..99825e1df 100644 --- a/ct/valkey.sh +++ b/ct/valkey.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-bind-fix/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: pshankinclarke (lazarillo) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE diff --git a/install/valkey-install.sh b/install/valkey-install.sh index 6a0a1441f..9ae758351 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -15,8 +15,10 @@ update_os msg_info "Installing Valkey" $STD apt update -$STD apt install -y valkey +$STD apt install -y valkey openssl sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf +PASS="$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c32)" +sed -ri "s|(# *)?requirepass .*|requirepass $PASS|" /etc/valkey/valkey.conf systemctl enable -q --now valkey-server systemctl restart valkey-server msg_ok "Installed Valkey" diff --git a/misc/build.func b/misc/build.func index e3ef6b1f8..2ef7806cc 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2825,7 +2825,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-bind-fix/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -2909,7 +2909,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-bind-fix/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) From 237517e986231e950d149feb83e54022615c935e Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 13:36:08 -0800 Subject: [PATCH 03/18] fix urls, simplify auth --- ct/valkey.sh | 2 +- install/valkey-install.sh | 2 +- misc/build.func | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/valkey.sh b/ct/valkey.sh index 99825e1df..5c766cc58 100644 --- a/ct/valkey.sh +++ b/ct/valkey.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-bind-fix/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-auth/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: pshankinclarke (lazarillo) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE diff --git a/install/valkey-install.sh b/install/valkey-install.sh index 9ae758351..a7d275b00 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -18,7 +18,7 @@ $STD apt update $STD apt install -y valkey openssl sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf PASS="$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c32)" -sed -ri "s|(# *)?requirepass .*|requirepass $PASS|" /etc/valkey/valkey.conf +echo "requirepass $PASS" >> /etc/valkey/valkey.conf systemctl enable -q --now valkey-server systemctl restart valkey-server msg_ok "Installed Valkey" diff --git a/misc/build.func b/misc/build.func index 2ef7806cc..25a6e2d18 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2825,7 +2825,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-bind-fix/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-auth/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -2909,7 +2909,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-bind-fix/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-auth/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) From be610fe0c09ae77a328a3a02c4fdf39a27643581 Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 13:51:50 -0800 Subject: [PATCH 04/18] save db pass to file, disable protected mode, user msg --- install/valkey-install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install/valkey-install.sh b/install/valkey-install.sh index a7d275b00..ca9488fe5 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -19,9 +19,13 @@ $STD apt install -y valkey openssl sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf PASS="$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c32)" echo "requirepass $PASS" >> /etc/valkey/valkey.conf +echo "$PASS" >/root/valkey_pass.txt +chmod 600 /root/valkey_pass.txt +sed -i 's/^protected-mode .*/protected-mode no/' /etc/valkey/valkey.conf systemctl enable -q --now valkey-server systemctl restart valkey-server msg_ok "Installed Valkey" +msg "Valkey password saved to /root/valkey_pass.txt" motd_ssh customize From a2015991387e619b2c435f70791e9deeb66f5f7c Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 14:00:30 -0800 Subject: [PATCH 05/18] fix msg --- install/valkey-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/valkey-install.sh b/install/valkey-install.sh index ca9488fe5..c6bf9f624 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -25,7 +25,7 @@ sed -i 's/^protected-mode .*/protected-mode no/' /etc/valkey/valkey.conf systemctl enable -q --now valkey-server systemctl restart valkey-server msg_ok "Installed Valkey" -msg "Valkey password saved to /root/valkey_pass.txt" +msg_info "Valkey password saved to /root/valkey_pass.txt" motd_ssh customize From 05169d52f5e16a486b28205742c6903b7760dfd0 Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 14:09:46 -0800 Subject: [PATCH 06/18] switch to msg_ok --- install/valkey-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/valkey-install.sh b/install/valkey-install.sh index c6bf9f624..4b2ef7e2c 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -25,7 +25,7 @@ sed -i 's/^protected-mode .*/protected-mode no/' /etc/valkey/valkey.conf systemctl enable -q --now valkey-server systemctl restart valkey-server msg_ok "Installed Valkey" -msg_info "Valkey password saved to /root/valkey_pass.txt" +msg_ok "Valkey password saved to /root/valkey_pass.txt" motd_ssh customize From 193e120fce36adfb50a44fbe895538fadcbb8bb5 Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 15:03:19 -0800 Subject: [PATCH 07/18] try w/ protected-mode enabled --- install/valkey-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/valkey-install.sh b/install/valkey-install.sh index 4b2ef7e2c..a3d121ebe 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -21,7 +21,6 @@ PASS="$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c32)" echo "requirepass $PASS" >> /etc/valkey/valkey.conf echo "$PASS" >/root/valkey_pass.txt chmod 600 /root/valkey_pass.txt -sed -i 's/^protected-mode .*/protected-mode no/' /etc/valkey/valkey.conf systemctl enable -q --now valkey-server systemctl restart valkey-server msg_ok "Installed Valkey" From 39a1b17b6569ddb45aa85f657af79289b45f3a3e Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 15:22:59 -0800 Subject: [PATCH 08/18] update doc --- frontend/public/json/valkey.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/valkey.json b/frontend/public/json/valkey.json index bafe38af8..f441a1148 100644 --- a/frontend/public/json/valkey.json +++ b/frontend/public/json/valkey.json @@ -31,5 +31,5 @@ "username": null, "password": null }, - "notes": [] + "notes": ["On first launch, a random password is set for the default user using `requirepass`; the generated password is stored in `/root/.valkey_password`." ] } From f6a1b9f9f8104ac95d58e805888d5b3cbfa66252 Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 15:29:50 -0800 Subject: [PATCH 09/18] fix typo --- frontend/public/json/valkey.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/valkey.json b/frontend/public/json/valkey.json index f441a1148..59e8059ed 100644 --- a/frontend/public/json/valkey.json +++ b/frontend/public/json/valkey.json @@ -31,5 +31,5 @@ "username": null, "password": null }, - "notes": ["On first launch, a random password is set for the default user using `requirepass`; the generated password is stored in `/root/.valkey_password`." ] + "notes": ["On first launch, a random password is set for the default user using `requirepass`; the generated password is stored in `/root/.valkey_pass.txt inside the container`." ] } From b856c223cda36b9d69958bd60cb73776df8cd5ba Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 15:38:41 -0800 Subject: [PATCH 10/18] revert urls to upstream --- ct/valkey.sh | 2 +- misc/build.func | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/valkey.sh b/ct/valkey.sh index 5c766cc58..6e6039f30 100644 --- a/ct/valkey.sh +++ b/ct/valkey.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-auth/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: pshankinclarke (lazarillo) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE diff --git a/misc/build.func b/misc/build.func index 25a6e2d18..e3ef6b1f8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2825,7 +2825,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-auth/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -2909,7 +2909,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-auth/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) From 70791715d53a2c5ea43b4034dda455445a91b83c Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 20:48:28 -0800 Subject: [PATCH 11/18] fork redis alpine scripts --- ct/alpine-valkey.sh | 72 ++++++++++++++++++++++++++++++++ install/alpine-valkey-install.sh | 24 +++++++++++ 2 files changed, 96 insertions(+) create mode 100644 ct/alpine-valkey.sh create mode 100644 install/alpine-valkey-install.sh diff --git a/ct/alpine-valkey.sh b/ct/alpine-valkey.sh new file mode 100644 index 000000000..a42216b9f --- /dev/null +++ b/ct/alpine-valkey.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://redis.io/ + +APP="Alpine-Redis" +var_tags="${var_tags:-alpine;database}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-1}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.22}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + if ! apk -e info newt >/dev/null 2>&1; then + apk add -q newt + fi + LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + while true; do + CHOICE=$( + whiptail --backtitle "Proxmox VE Helper Scripts" --title "Redis Management" --menu "Select option" 11 58 3 \ + "1" "Update Redis" \ + "2" "Allow 0.0.0.0 for listening" \ + "3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + msg_info "Updating Redis" + apk update && apk upgrade redis + rc-service redis restart + msg_ok "Updated successfully!" + exit + ;; + 2) + msg_info "Setting Redis to listen on all interfaces" + sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf + rc-service redis restart + msg_ok "Redis now listens on all interfaces!" + exit + ;; + 3) + msg_info "Setting Redis to listen only on ${LXCIP}" + sed -i "s/^bind .*/bind ${LXCIP}/" /etc/redis.conf + rc-service redis restart + msg_ok "Redis now listens only on ${LXCIP}!" + exit + ;; + esac + done +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable on port 6379. + ${BL}redis-cli -h ${IP} -p 6379${CL} \n" diff --git a/install/alpine-valkey-install.sh b/install/alpine-valkey-install.sh new file mode 100644 index 000000000..c04db58da --- /dev/null +++ b/install/alpine-valkey-install.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://redis.io/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Redis" +$STD apk add redis +$STD sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf +$STD rc-update add redis default +$STD rc-service redis start +msg_ok "Installed Redis" + +motd_ssh +customize From 7465fc10447a90d9bd08146c2b799721c311cf26 Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 21:41:21 -0800 Subject: [PATCH 12/18] Add Alpine-Valkey LXC support --- ct/alpine-valkey.sh | 36 ++++++++++++++++---------------- install/alpine-valkey-install.sh | 16 +++++++------- misc/build.func | 4 ++-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/ct/alpine-valkey.sh b/ct/alpine-valkey.sh index a42216b9f..6347b830d 100644 --- a/ct/alpine-valkey.sh +++ b/ct/alpine-valkey.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-alpine/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) +# Author: pshankinclarke (lazarillo) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://redis.io/ +# Source: https://valkey.io/ -APP="Alpine-Redis" +APP="Alpine-Valkey" var_tags="${var_tags:-alpine;database}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-256}" @@ -26,8 +26,8 @@ function update_script() { LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) while true; do CHOICE=$( - whiptail --backtitle "Proxmox VE Helper Scripts" --title "Redis Management" --menu "Select option" 11 58 3 \ - "1" "Update Redis" \ + whiptail --backtitle "Proxmox VE Helper Scripts" --title "Valkey Management" --menu "Select option" 11 58 3 \ + "1" "Update Valkey" \ "2" "Allow 0.0.0.0 for listening" \ "3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3 ) @@ -39,24 +39,24 @@ function update_script() { header_info case $CHOICE in 1) - msg_info "Updating Redis" - apk update && apk upgrade redis - rc-service redis restart + msg_info "Updating Valkey" + apk update && apk upgrade valkey + rc-service valkey restart msg_ok "Updated successfully!" exit ;; 2) - msg_info "Setting Redis to listen on all interfaces" - sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf - rc-service redis restart - msg_ok "Redis now listens on all interfaces!" + msg_info "Setting Valkey to listen on all interfaces" + sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf + rc-service valkey restart + msg_ok "Valkey now listens on all interfaces!" exit ;; 3) - msg_info "Setting Redis to listen only on ${LXCIP}" - sed -i "s/^bind .*/bind ${LXCIP}/" /etc/redis.conf - rc-service redis restart - msg_ok "Redis now listens only on ${LXCIP}!" + msg_info "Setting Valkey to listen only on ${LXCIP}" + sed -i "s/^bind .*/bind ${LXCIP}/" /etc/valkey/valkey.conf + rc-service valkey restart + msg_ok "Valkey now listens only on ${LXCIP}!" exit ;; esac @@ -69,4 +69,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable on port 6379. - ${BL}redis-cli -h ${IP} -p 6379${CL} \n" + ${BL}valkey-cli -h ${IP} -p 6379${CL} \n" diff --git a/install/alpine-valkey-install.sh b/install/alpine-valkey-install.sh index c04db58da..d4515d43b 100644 --- a/install/alpine-valkey-install.sh +++ b/install/alpine-valkey-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG -# Author: MickLesk (CanbiZ) +# Author: pshankinclarke (lazarillo) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://redis.io/ +# Source: https://valkey.io/ source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color @@ -13,12 +13,12 @@ setting_up_container network_check update_os -msg_info "Installing Redis" -$STD apk add redis -$STD sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf -$STD rc-update add redis default -$STD rc-service redis start -msg_ok "Installed Redis" +msg_info "Installing Valkey" +$STD apk add valkey valkey-openrc +$STD sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf +$STD rc-update add valkey default +$STD rc-service valkey start +msg_ok "Installed Valkey" motd_ssh customize diff --git a/misc/build.func b/misc/build.func index e3ef6b1f8..b694ec9cf 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2825,7 +2825,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-alpine/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -2909,7 +2909,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-alpine/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) From d7265db7088e2eb18ef278b6e35fe29acf314bbd Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 21:53:10 -0800 Subject: [PATCH 13/18] get valkey-cli --- install/alpine-valkey-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-valkey-install.sh b/install/alpine-valkey-install.sh index d4515d43b..bac37a357 100644 --- a/install/alpine-valkey-install.sh +++ b/install/alpine-valkey-install.sh @@ -14,7 +14,7 @@ network_check update_os msg_info "Installing Valkey" -$STD apk add valkey valkey-openrc +$STD apk add valkey valkey-openrc valkey-cli $STD sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf $STD rc-update add valkey default $STD rc-service valkey start From c8e5dba9c64f18780e40ece7aec11f3a387304e6 Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Tue, 2 Dec 2025 20:33:04 -0800 Subject: [PATCH 14/18] fix unbound variable issue --- install/alpine-valkey-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-valkey-install.sh b/install/alpine-valkey-install.sh index bac37a357..ce2083d96 100644 --- a/install/alpine-valkey-install.sh +++ b/install/alpine-valkey-install.sh @@ -5,6 +5,7 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://valkey.io/ +: "${IPV6_METHOD:=none}" source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 From 79a8b33d079480f7f08cf2a768f04e550d14600e Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Tue, 2 Dec 2025 21:06:18 -0800 Subject: [PATCH 15/18] revert urls to upstream --- misc/build.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index b694ec9cf..e3ef6b1f8 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2825,7 +2825,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-alpine/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -2909,7 +2909,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-alpine/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) From 9d1481232fcf65ecbb999338d840f0ed47a281fa Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Tue, 2 Dec 2025 21:09:07 -0800 Subject: [PATCH 16/18] cleanup --- ct/valkey.sh | 45 -------------------------------- frontend/public/json/valkey.json | 35 ------------------------- install/valkey-install.sh | 31 ---------------------- 3 files changed, 111 deletions(-) delete mode 100644 ct/valkey.sh delete mode 100644 frontend/public/json/valkey.json delete mode 100644 install/valkey-install.sh diff --git a/ct/valkey.sh b/ct/valkey.sh deleted file mode 100644 index 6e6039f30..000000000 --- a/ct/valkey.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: pshankinclarke (lazarillo) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://valkey.io/ - -APP="Valkey" -var_tags="${var_tags:-database}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-1024}" -var_disk="${var_disk:-4}" -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 [[ ! -f /lib/systemd/system/valkey-server.service ]]; then - msg_error "No Valkey Installation Found!" - exit - fi - msg_info "Updating Valkey LXC" - $STD apt update - $STD apt -y upgrade - msg_ok "Updated Valkey LXC" - msg_ok "Updated successfully!" - 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}:6379${CL}" diff --git a/frontend/public/json/valkey.json b/frontend/public/json/valkey.json deleted file mode 100644 index 59e8059ed..000000000 --- a/frontend/public/json/valkey.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "Valkey", - "slug": "valkey", - "categories": [ - 9 - ], - "date_created": "2025-11-24", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 6379, - "documentation": "https://valkey.io/docs/", - "config_path": "/etc/valkey/valkey.conf", - "website": "https://valkey.io/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/valkey.webp", - "description": "Valkey is an open source (BSD) high-performance key/value datastore that supports a variety of workloads such as caching, message queues, and can act as a primary database. The project is backed by the Linux Foundation, ensuring it will remain open source forever.", - "install_methods": [ - { - "type": "default", - "script": "ct/valkey.sh", - "resources": { - "cpu": 1, - "ram": 1024, - "hdd": 4, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": ["On first launch, a random password is set for the default user using `requirepass`; the generated password is stored in `/root/.valkey_pass.txt inside the container`." ] -} diff --git a/install/valkey-install.sh b/install/valkey-install.sh deleted file mode 100644 index a3d121ebe..000000000 --- a/install/valkey-install.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: pshankinclarke (lazarillo) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://valkey.io/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Valkey" -$STD apt update -$STD apt install -y valkey openssl -sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf -PASS="$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c32)" -echo "requirepass $PASS" >> /etc/valkey/valkey.conf -echo "$PASS" >/root/valkey_pass.txt -chmod 600 /root/valkey_pass.txt -systemctl enable -q --now valkey-server -systemctl restart valkey-server -msg_ok "Installed Valkey" -msg_ok "Valkey password saved to /root/valkey_pass.txt" - -motd_ssh -customize -cleanup_lxc From 5176ca7f829a0ce5a8c15541d6f1d39063f651f0 Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Wed, 3 Dec 2025 20:12:20 -0800 Subject: [PATCH 17/18] unbound variable issue should be fixed --- install/alpine-valkey-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/alpine-valkey-install.sh b/install/alpine-valkey-install.sh index ce2083d96..bac37a357 100644 --- a/install/alpine-valkey-install.sh +++ b/install/alpine-valkey-install.sh @@ -5,7 +5,6 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://valkey.io/ -: "${IPV6_METHOD:=none}" source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 From 32901cf7cfbe6e7a6afa7bcf4e48edf64cac728d Mon Sep 17 00:00:00 2001 From: Parker Shankin-Clarke <38367844+pshankinclarke@users.noreply.github.com> Date: Thu, 4 Dec 2025 12:53:10 -0800 Subject: [PATCH 18/18] Update source URL for build function --- ct/alpine-valkey.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-valkey.sh b/ct/alpine-valkey.sh index 6347b830d..1f7f96298 100644 --- a/ct/alpine-valkey.sh +++ b/ct/alpine-valkey.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/pshankinclarke/ProxmoxVED/refs/heads/valkey-alpine/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: pshankinclarke (lazarillo) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE