How to fix NOAUTH Authentication required in Redis

RedisINTERMEDIATEMEDIUMUpdated Dec 25, 2025ยท 392 views

Redis is configured to require password authentication, but your client connected without providing credentials. This error occurs when the requirepass directive is set on the server and clients attempt to execute commands without first authenticating with the AUTH command.

Quick fix

Fixes NOAUTH Authentication required

redis-cli -h 127.0.0.1 -p 6379 -a your-password
  1. Use redis-cli with the password flag
  2. Authenticate using the AUTH command
  3. Update your application connection string
  4. Verify your Redis configuration
redis โ€” error
redis-cli -h 127.0.0.1 -p 6379 -a your-password
NOAUTH Authentication required

What this error means

The NOAUTH Authentication required error indicates that your Redis server has password protection enabled via the requirepass directive, but your client has not provided authentication credentials. Redis refuses to execute any command from unauthenticated clients when authentication is enforced. This is a security feature that prevents unauthorized access to your Redis instance.

Typical symptoms

  • Connection succeeds but any Redis command fails with NOAUTH error
  • Redis CLI commands fail unless using the -a flag with password
  • Application fails to read/write data to Redis after connecting
  • Error appears immediately when attempting the first command after connection

Common causes

  1. Redis server has requirepass configured but client is not sending the AUTH command
  2. Client connection string or configuration is missing the password parameter
  3. Password provided by client does not match the requirepass value on server
  4. Client library is not configured to authenticate before executing commands
  5. Upgrading Redis or cloud provider (like AWS ElastiCache) automatically enabled authentication

How to fix "NOAUTH Authentication required"

1Use redis-cli with the password flag

Connect to Redis using redis-cli with the -a flag to provide authentication:

bash
redis-cli -h 127.0.0.1 -p 6379 -a your-password

Replace your-password with your actual Redis password.

2Authenticate using the AUTH command

If you are already connected to Redis, you can authenticate mid-session using the AUTH command:

bash
AUTH your-password

After successful authentication, you can execute any Redis command.

3Update your application connection string

For most Redis client libraries, include the password in the connection URL:

Node.js (node-redis):

javascript
const redis = require('redis');
const client = redis.createClient({
  url: 'redis://:your-password@127.0.0.1:6379'
});
await client.connect();

Python (redis-py):

python
import redis
r = redis.Redis(host='127.0.0.1', port=6379, password='your-password')

Java (Jedis):

java
Jedis jedis = new Jedis("127.0.0.1", 6379);
jedis.auth("your-password");

Go (go-redis):

go
rdb := redis.NewClient(&redis.Options{
    Addr:     "127.0.0.1:6379",
    Password: "your-password",
})
4Verify your Redis configuration

Check that the Redis server has requirepass configured in /etc/redis/redis.conf:

bash
grep requirepass /etc/redis/redis.conf

The output should show something like:

bash
requirepass your-password

If requirepass is commented out or absent, no authentication is required. If the password on the server differs from what you are using in your client, update one to match the other.

5Ensure the password is correct and secure

If changing the password, use a strong, randomly generated password. You can generate one with openssl:

bash
openssl rand -base64 32

Update the requirepass setting in redis.conf and restart Redis:

bash
sudo systemctl restart redis-server

Then verify connection with the new password.

Advanced notes

In Redis 6.0+, you can use ACLs (Access Control Lists) for more granular authentication with multiple users. While the traditional password-only AUTH still works, ACLs provide better security for multi-tenant or microservices environments. For cloud-hosted Redis (AWS ElastiCache, Azure Cache, Upstash, etc.), authentication is usually enabled by default. Ensure your connection parameters match the provider's format. Some cloud providers require SSL/TLS connections in addition to password authentication. If you accidentally set requirepass and then reset your server, you may need to remove the requirepass line from redis.conf and restart Redis to regain access.

Frequently asked questions

What does "NOAUTH Authentication required" mean?
The NOAUTH Authentication required error indicates that your Redis server has password protection enabled via the requirepass directive, but your client has not provided authentication credentials. Redis refuses to execute any command from unauthenticated clients when authentication is enforced. This is a security feature that prevents unauthorized access to your Redis instance.
How do I fix "NOAUTH Authentication required"?
Redis is configured to require password authentication, but your client connected without providing credentials. This error occurs when the requirepass directive is set on the server and clients attempt to execute commands without first authenticating with the AUTH command.
What causes "NOAUTH Authentication required"?
Redis server has requirepass configured but client is not sending the AUTH command Client connection string or configuration is missing the password parameter Password provided by client does not match the requirepass value on server
Is the "NOAUTH Authentication required" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading