From 873533604d668a2d9b514f3391ae6995a2d7117d Mon Sep 17 00:00:00 2001 From: pshankinclarke Date: Mon, 1 Dec 2025 16:32:20 -0800 Subject: [PATCH 1/6] Add auth via requirepass to Valkey --- frontend/public/json/valkey.json | 2 +- install/valkey-install.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/public/json/valkey.json b/frontend/public/json/valkey.json index f94e6b9a047..5aac0eb3639 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_pass.txt inside the container`." ] } diff --git a/install/valkey-install.sh b/install/valkey-install.sh index 6a0a1441f79..a3d121ebec5 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -15,11 +15,16 @@ 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)" +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 From 49160d249d4d0193e46b6c1336edef2018c50800 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 2 Dec 2025 08:25:46 +0100 Subject: [PATCH 2/6] Refactor notes in valkey.json for clarity Updated notes structure to include detailed login instructions. --- frontend/public/json/valkey.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/public/json/valkey.json b/frontend/public/json/valkey.json index 5aac0eb3639..eb557d17afd 100644 --- a/frontend/public/json/valkey.json +++ b/frontend/public/json/valkey.json @@ -31,5 +31,10 @@ "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`." ] + "notes": [ + { + "text": "Show Login Credentials, type `cat /root/.valkey_pass.txt` in the LXC console", + "type": "info" + }, + ] } From 5e9e4c3c03857fcca74f3ab0b287b5ba38e88eb3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 2 Dec 2025 08:26:08 +0100 Subject: [PATCH 3/6] Remove password saving message from installation script Removed message indicating Valkey password saving. --- install/valkey-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/valkey-install.sh b/install/valkey-install.sh index a3d121ebec5..cef2b862beb 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -24,7 +24,6 @@ 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 From 5e8f3c95da4fef09c3b5b944d3a0675db6a97110 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 2 Dec 2025 08:44:49 +0100 Subject: [PATCH 4/6] Fix JSON syntax error in valkey.json --- 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 eb557d17afd..994cd0929f4 100644 --- a/frontend/public/json/valkey.json +++ b/frontend/public/json/valkey.json @@ -35,6 +35,6 @@ { "text": "Show Login Credentials, type `cat /root/.valkey_pass.txt` in the LXC console", "type": "info" - }, + } ] } From e181be7b7bddf30dbece7b5e34cafb87c6180d95 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:48:15 +0100 Subject: [PATCH 5/6] Update valkey.json --- 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 994cd0929f4..91149fb42a4 100644 --- a/frontend/public/json/valkey.json +++ b/frontend/public/json/valkey.json @@ -33,7 +33,7 @@ }, "notes": [ { - "text": "Show Login Credentials, type `cat /root/.valkey_pass.txt` in the LXC console", + "text": "Show Login Credentials, type `cat ~/valkey.creds` in the LXC console", "type": "info" } ] From 6d05a826590786cb3bc1c5e9695996b38ff2be18 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:49:16 +0100 Subject: [PATCH 6/6] refactor --- install/valkey-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/valkey-install.sh b/install/valkey-install.sh index cef2b862beb..3d1be73fb50 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -19,8 +19,8 @@ $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 +echo "$PASS" >~/valkey.creds +chmod 600 ~/valkey.creds systemctl enable -q --now valkey-server systemctl restart valkey-server msg_ok "Installed Valkey"