From b745fd01b261c54c408c1ececb79befbfbd18ea3 Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 24 Nov 2025 17:53:31 -0800 Subject: [PATCH 1/2] Add Valkey LXC --- ct/valkey.sh | 45 ++++++++++++++++++++++++++++++++ frontend/public/json/valkey.json | 35 +++++++++++++++++++++++++ install/valkey-install.sh | 44 +++++++++++++++++++++++++++++++ 3 files changed, 124 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..0829fb3b9 --- /dev/null +++ b/ct/valkey.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# 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 ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + $STD apt update + $STD apt -y upgrade + msg_ok "Updated $APP 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 IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}${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..b0d23e573 --- /dev/null +++ b/install/valkey-install.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# 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 Dependencies" +$STD apt install -y \ + apt-transport-https \ + lsb-release +msg_ok "Installed Dependencies" + +DEB_VER="$(cat /etc/debian_version)" + +if [[ "$DEB_VER" =~ ^([0-9]+) ]]; then + MAJOR="${BASH_REMATCH[1]}" + if (( MAJOR < 13 )); then + msg_error "Unsupported Debian version." + exit 1 + fi +else + msg_error "Unable to determine Debian version." + exit 1 +fi + +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 +msg_ok "Installed Valkey" + +motd_ssh +customize +cleanup_lxc From 03592b99464a5cdb19f86985f073b50d35fa39ba Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Tue, 25 Nov 2025 17:09:55 -0800 Subject: [PATCH 2/2] Address CrazyWolf13 review --- ct/valkey.sh | 16 ++++++++-------- install/valkey-install.sh | 23 ++--------------------- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/ct/valkey.sh b/ct/valkey.sh index 0829fb3b9..cf6ae8077 100644 --- a/ct/valkey.sh +++ b/ct/valkey.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) +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/ @@ -24,13 +24,13 @@ function update_script() { check_container_storage check_container_resources if [[ ! -f /lib/systemd/system/valkey-server.service ]]; then - msg_error "No ${APP} Installation Found!" + msg_error "No Valkey Installation Found!" exit fi - msg_info "Updating $APP LXC" + msg_info "Updating Valkey LXC" $STD apt update $STD apt -y upgrade - msg_ok "Updated $APP LXC" + msg_ok "Updated Valkey LXC" msg_ok "Updated successfully!" exit } @@ -41,5 +41,5 @@ 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 IP:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}${IP}:6379${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6379${CL}" diff --git a/install/valkey-install.sh b/install/valkey-install.sh index b0d23e573..6ca1f4349 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) +# 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/ @@ -13,25 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt install -y \ - apt-transport-https \ - lsb-release -msg_ok "Installed Dependencies" - -DEB_VER="$(cat /etc/debian_version)" - -if [[ "$DEB_VER" =~ ^([0-9]+) ]]; then - MAJOR="${BASH_REMATCH[1]}" - if (( MAJOR < 13 )); then - msg_error "Unsupported Debian version." - exit 1 - fi -else - msg_error "Unable to determine Debian version." - exit 1 -fi - msg_info "Installing Valkey" $STD apt update $STD apt install -y valkey