How to fix ERR This instance is not in cluster mode in Redis

RedisINTERMEDIATEMEDIUMUpdated Dec 29, 2025· 117 views

This error occurs when attempting to use Redis Cluster commands on a standalone Redis instance. Enable cluster mode in your redis.conf configuration file and restart the instance to resolve it.

Quick fix

Fixes ERR This instance is not in cluster mode

redis-cli CONFIG GET cluster-enabled
  1. Check the current Redis configuration
  2. Enable cluster mode in redis.conf
  3. Restart the Redis instance
  4. Create a cluster with multiple nodes (optional)
redis — error
redis-cli CONFIG GET cluster-enabled
ERR This instance is not in cluster mode

What this error means

Redis Cluster provides distributed data storage and automatic failover across multiple nodes. When you try to use cluster-specific commands (like CLUSTER, ASKING, or READONLY) on a non-clustered instance, Redis rejects the operation with this error. This typically happens when your application is configured for cluster mode but your Redis server is running as a standalone instance.

Typical symptoms

  • CLUSTER commands fail with "ERR This instance is not in cluster mode"
  • Application crashes when attempting cluster-aware operations
  • Client libraries expecting cluster support receive connection errors
  • Deployment scripts fail when initializing cluster topology

Common causes

  1. The redis.conf file does not have "cluster-enabled yes" configured
  2. Redis instance was started before cluster-enabled was set in configuration
  3. Incorrect Redis version deployed (cluster mode requires Redis 3.0+)
  4. Connection is pointing to a standalone replica in a cluster topology
  5. Using a managed Redis service (ElastiCache, Redis Cloud) that does not have cluster mode enabled

How to fix "ERR This instance is not in cluster mode"

1Check the current Redis configuration

Connect to your Redis instance and verify the cluster setting:

bash
redis-cli CONFIG GET cluster-enabled

If the response is (integer) 0, cluster mode is disabled.

2Enable cluster mode in redis.conf

Edit your redis.conf file and locate the cluster-enabled setting. Change it from no to yes:

conf
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes

The cluster-config-file specifies where Redis stores cluster state. The cluster-node-timeout is the maximum milliseconds a node can be unavailable before failover.

3Restart the Redis instance

Stop and restart Redis to apply the configuration changes:

bash
# If using systemd
sudo systemctl restart redis

# If running manually
pkill -f redis-server
redis-server /path/to/redis.conf
4Create a cluster with multiple nodes (optional)

If you need an actual cluster, set up the minimum 3 master nodes and use redis-cli to initialize:

bash
redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 --cluster-replicas 0

For production, Redis recommends at least 6 nodes (3 masters + 3 replicas).

5Update your application connection string

Ensure your Redis client is configured for cluster mode if needed. For example, in Node.js with ioredis:

javascript
const Redis = require("ioredis");

const cluster = new Redis.Cluster(
  [
    { host: "127.0.0.1", port: 7000 },
    { host: "127.0.0.1", port: 7001 },
    { host: "127.0.0.1", port: 7002 },
  ],
  { enableReadyCheck: false }
);

Advanced notes

If you do not actually need cluster mode (single-instance Redis), you can safely ignore this error by disabling cluster mode in your client library. For example, in some Redis clients, set forceClusterMode: false or similar. AWS ElastiCache and other managed services have different cluster mode configurations—check your provider's documentation to enable cluster mode if required. Note that switching between cluster-enabled and disabled requires stopping Redis and reconfiguring, as it changes the internal data structure.

Frequently asked questions

What does "ERR This instance is not in cluster mode" mean?
Redis Cluster provides distributed data storage and automatic failover across multiple nodes. When you try to use cluster-specific commands (like CLUSTER, ASKING, or READONLY) on a non-clustered instance, Redis rejects the operation with this error. This typically happens when your application is configured for cluster mode but your Redis server is running as a standalone instance.
How do I fix "ERR This instance is not in cluster mode"?
This error occurs when attempting to use Redis Cluster commands on a standalone Redis instance. Enable cluster mode in your redis.conf configuration file and restart the instance to resolve it.
What causes "ERR This instance is not in cluster mode"?
The redis.conf file does not have "cluster-enabled yes" configured Redis instance was started before cluster-enabled was set in configuration Incorrect Redis version deployed (cluster mode requires Redis 3.0+)
Is the "ERR This instance is not in cluster mode" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading