Redis › Redis Security & ACL
How do you set a password to require authentication before clients can execute commands on a Redis instance?
BeginnerAnswer
You set the requirepass configuration option to a strong password value, after which any client attempting to connect must first successfully authenticate using the AUTH command with that exact password before it will be allowed to run any other commands against the server.
CONFIG SET requirepass 'a_very_strong_password'
-- Clients must then authenticate first
AUTH a_very_strong_passwordReal-world example A company enables password authentication on their Redis instance before deploying it to production, ensuring anyone who somehow gains network access still cannot read or modify data without knowing the correct password.