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 <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
parent
d2f86996db
commit
327cb37a55
@ -31,5 +31,10 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "Show Login Credentials, type `cat ~/valkey.creds` in the LXC console",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,8 +15,12 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Valkey"
|
msg_info "Installing Valkey"
|
||||||
$STD apt update
|
$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
|
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" >~/valkey.creds
|
||||||
|
chmod 600 ~/valkey.creds
|
||||||
systemctl enable -q --now valkey-server
|
systemctl enable -q --now valkey-server
|
||||||
systemctl restart valkey-server
|
systemctl restart valkey-server
|
||||||
msg_ok "Installed Valkey"
|
msg_ok "Installed Valkey"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user