By default, Redis ships the
default user without any password configured, which is okay as long as you have Redis deployed in a private subnet behind a firewall. However, if you want to add or update the password there are two ways to do so.
From the CLI
Step 1. Login to your Redis CLI and run the following command:
CONFIG SET requirepass "<super_strong_password_here>"
Step 2. Test it.
Step 1. Open the redis.conf file which is found under the /etc/redis directory.
Step 2. Find and uncomment the following line:
# requirepass foobared
Step 3. Replace
foobared with your password by choice, save and close the config. For instance:
Step 4. Restart the Redis service.
systemctl restart redis-server
Step 5. Login to your Redis CLI and verify the password.