Skip to content

Commit 327cb37

Browse files
pshankinclarkeMickLeskCrazyWolf13
authored
Add auth via requirepass to Valkey (#9570)
* Add auth via requirepass to Valkey * Refactor notes in valkey.json for clarity Updated notes structure to include detailed login instructions. * Remove password saving message from installation script Removed message indicating Valkey password saving. * Fix JSON syntax error in valkey.json * Update valkey.json * refactor --------- Co-authored-by: CanbiZ <[email protected]> Co-authored-by: Tobias <[email protected]>
1 parent d2f8699 commit 327cb37

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

frontend/public/json/valkey.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,10 @@
3131
"username": null,
3232
"password": null
3333
},
34-
"notes": []
34+
"notes": [
35+
{
36+
"text": "Show Login Credentials, type `cat ~/valkey.creds` in the LXC console",
37+
"type": "info"
38+
}
39+
]
3540
}

install/valkey-install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ update_os
1515

1616
msg_info "Installing Valkey"
1717
$STD apt update
18-
$STD apt install -y valkey
18+
$STD apt install -y valkey openssl
1919
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
20+
PASS="$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c32)"
21+
echo "requirepass $PASS" >> /etc/valkey/valkey.conf
22+
echo "$PASS" >~/valkey.creds
23+
chmod 600 ~/valkey.creds
2024
systemctl enable -q --now valkey-server
2125
systemctl restart valkey-server
2226
msg_ok "Installed Valkey"

0 commit comments

Comments
 (0)