NOAUTH
RedisERRORCriticalSecurityHIGH confidence

Authentication required

Production Risk

Medium. Indicates a critical misconfiguration, but the server is correctly protecting itself.

What this means

This error means the client is trying to execute a command on a password-protected Redis server without first authenticating. Redis requires the AUTH command to be the first command sent after connecting.

Why it happens
  1. 1The client did not send the AUTH command with the correct password.
  2. 2The client is configured without a password, but the server requires one.
  3. 3A network proxy or load balancer is dropping the initial AUTH command.
How to reproduce

A new client connects to a password-protected Redis server and immediately sends a PING command.

trigger — this will error
trigger — this will error
# Assuming server has 'requirepass mypassword'
PING

expected output

(error) NOAUTH Authentication required.

Fix 1

Authenticate before sending other commands

WHEN Immediately after connecting

Authenticate before sending other commands
AUTH mypassword
PING

Why this works

Sending the AUTH command with the correct password authenticates the client's session, allowing subsequent commands to be processed.

Fix 2

Configure the password in your client library

WHEN When initializing the Redis client in your application

Configure the password in your client library
// Example for node-redis
const client = createClient({
  url: 'redis://:mypassword@my.redis.server:6379'
});

Why this works

All official Redis client libraries provide a standard way to configure the password during initialization, ensuring the AUTH command is sent automatically upon connection.

What not to do

Disable password protection on the server to fix the client

This is a major security risk. It exposes your Redis instance to unauthorized access. Always fix the client-side configuration, not weaken the server's security.

Sources
Official documentation ↗

Authentication and authorization subsystem

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All Redis errors