Redis answers NOAUTH Authentication required when the server has a password or ACL user configured and your connection sent a command before authenticating. The server is up and reachable. Your client just did not present credentials, or presented them in a way the server did not receive.
127.0.0.1:6379> GET mykey
(error) NOAUTH Authentication required.
In applications it appears as ReplyError: NOAUTH Authentication required (node), redis.exceptions.AuthenticationError or ResponseError (Python), or a failed health check in a framework. Closely related messages look similar but need different fixes, so compare them below.
Step 1: authenticate from the command line
With the legacy single password (requirepass):
redis-cli -h 127.0.0.1 -p 6379
127.0.0.1:6379> AUTH your-password
OK
Redis 6.0 and newer have ACL users. Authenticate with a username and password:
redis-cli --user appuser --pass 'your-password' ping
127.0.0.1:6379> AUTH appuser your-password
Passing -a on the command line works, but prints a warning that it is insecure because the password is visible in the process list. A safer way is the REDISCLI_AUTH environment variable:
export REDISCLI_AUTH='your-password'
redis-cli ping
If PING returns PONG, authentication works and the problem is in your application.
Step 2: pass the password in your client
Most libraries accept a URL or an option. The scheme is redis://[user]:password@host:port/db. Use rediss:// for TLS.
redis://:your-password@10.0.0.7:6379/0
redis://appuser:your-password@10.0.0.7:6379/0
Special characters in the password (@, :, /, #, %) break URL parsing and result in the wrong password or the wrong host. Percent-encode the password with the URL Encoder/Decoder, or use separate fields.
// node-redis
const client = createClient({ url: 'redis://:pw@10.0.0.7:6379' });
// ioredis
const redis = new Redis({ host: '10.0.0.7', port: 6379, username: 'appuser', password: process.env.REDIS_PASSWORD });
r = redis.Redis(host="10.0.0.7", port=6379, username="appuser", password=os.environ["REDIS_PASSWORD"])
Common application mistakes:
- The environment variable is empty in production, or only set in your shell and not in the service unit, container or deployment.
- The password is configured for the primary, but a replica, Sentinel or cluster node needs its own settings (
masterauthfor replicas;sentinel auth-passfor Sentinel). - A framework setting such as a Laravel
REDIS_PASSWORDor a RailsREDIS_URLpoints at the wrong instance. - A connection pooler or proxy does not forward
AUTH.
Step 3: check what the server requires
On the server, using an already authenticated session or the config file:
redis-cli CONFIG GET requirepass
sudo grep -E "^(requirepass|user |aclfile|protected-mode|bind)" /etc/redis/redis.conf
redis-cli ACL LIST
redis-cli ACL WHOAMI
In redis.conf:
requirepass a-long-random-secret
user appuser on >a-long-random-secret ~app:* +@read +@write
The user line creates an ACL user that is on, with a password, allowed keys matching app:*, and read and write command categories. Changing redis.conf needs a restart, or use CONFIG SET requirepass ... and ACL SETUSER at runtime. Use CONFIG REWRITE to persist.
Look-alike errors
| Message | Meaning |
|---|---|
NOAUTH Authentication required. | Server wants credentials, none sent yet. |
WRONGPASS invalid username-password pair or user is disabled. | Credentials were sent but are wrong, or the user is off. Fix the password or username. |
ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? | Your client sends a password, but the server has none. Remove it from the client, or set requirepass. |
NOPERM this user has no permissions to run the 'x' command | Auth worked, but the ACL forbids that command or key. Adjust with ACL SETUSER. |
DENIED Redis is running in protected mode... | No password set and a non-local client connected. Set a password or bind correctly. |
Security note
An unauthenticated Redis that is reachable from the internet is a serious risk, because attackers scan for it and can read or write all data. If you were seeing no auth error before and now do, someone may have enabled a password for good reason. Do not disable authentication to make the error go away.
- Bind to private interfaces only:
bind 127.0.0.1 10.0.0.7. - Firewall port 6379 to your app servers. Verify what is open with the Port Checker and find your allow-list address with What Is My IP.
- Use long random passwords and ACL users with limited commands.
- Use TLS (
tls-port) when traffic crosses untrusted networks.
Verify
redis-cli --user appuser --pass "$REDIS_PASSWORD" -h 10.0.0.7 ping
Expect PONG. Restart the app so it picks up new environment variables, then test the user-facing path with the Website Health Check and keep an Uptime Monitor running on a page that depends on Redis sessions or cache.
Next steps
- Writes rejected? See MISCONF unable to persist.
- Memory cap errors: OOM command not allowed.
- Connection problems from Node: ECONNREFUSED and ECONNRESET.
- Compare with database logins in PostgreSQL password authentication failed.
FAQ
What is the difference between NOAUTH and WRONGPASS?
NOAUTH means you sent no credentials before a command. WRONGPASS means you sent credentials and they were rejected.
Does Redis have usernames?
From Redis 6.0, yes, through ACLs. Older versions only have the single requirepass password, which maps to the default user in newer ones.
Why does redis-cli -a print a warning?
Because the password can be seen in the process list. Use REDISCLI_AUTH or interactive AUTH instead.
Can I turn authentication off?
Yes, by removing requirepass and relying on binding and firewalls, but that is risky on any shared or public network.
Get notified when this fix updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.