n8n is a source-available workflow automation platform for orchestrating APIs, agents, and data pipelines. It integrates with Redis to enable caching, session management, pub/sub messaging, and (starting in n8n v1.116) vector search and AI agent memory using the Redis Vector Store node.
This article covers Prerequisites, Step-by-Step Setup, Quick Fixes and Troubleshooting, and Security & Best Practices for connecting n8n with Redis Cloud or Redis Software.
Prerequisites
-
Redis Environment:
Redis Cloud database with Search & Query (Redis Search) enabled, or
Redis Software / Redis Stack with Redis Search module installed.
-
Credentials:
Host: Redis endpoint (for example,
redis-14664.c289.us-west-1-2.ec2.redns.redis-cloud.com)Port: numeric port (for example,
14664)Username:
default(or your custom ACL user)Password: Redis database password
Database number:
0unless otherwise specified
-
TLS support:
Free Essentials plans — no TLS
Paid Essentials / Pro — TLS enabled
-
IP allow list and n8n deployment
n8n Cloud does not guarantee static egress IPs. If your Redis Cloud database uses IP Access Rules, n8n Cloud may not be able to connect reliably.
For strict allow-list environments, use:
Self-hosted n8n in a network with a stable egress IP, or
A NAT gateway / proxy with a static IP that you can add to Redis Cloud’s allow list.
Quick Fix Table
| Symptom | Cause | Resolution |
|---|---|---|
| TLS errors | Free Essentials plan does not support TLS | Disable TLS in n8n or upgrade to Paid Essentials or Pro |
| ECONNREFUSED from n8n Cloud | Dynamic egress IPs from n8n Cloud are blocked by Redis Cloud IP Access Rules | Use self-hosted n8n or route traffic through a static-IP proxy and add it to the allow list |
| Too many clients errors | Connection limit reached on Essentials plan | Enable connection pooling or upgrade to Pro (no connection limit) |
| Redis Vector Store node missing | n8n version is earlier than 1.116 | Upgrade n8n to version 1.116 or later |
| NOPERM this user has no permissions to run the command | ACL user missing required command or key permissions | Update the Redis ACL to grant the required commands and key access for the n8n user |
Step-by-Step Setup
1. Install n8n
Docker example:
docker run -it --rm -p 5678:5678 n8nio/n8nor sign up for a managed instance at n8n.io.
2. Connect n8n to Redis
In n8n, add a new Redis credential.
-
Fill in the following fields:
Host: Redis endpoint (no port in this field)
Port: Your Redis port
Username:
default(or your ACL user)Password: Redis password
Database:
0SSL/TLS: Enable only if your plan supports it
Test the connection to confirm connectivity.
Tip: Including the port in the Host field (e.g.,
:14664) causes connection failures.
3. Use the Redis Vector Store Node (v1.116 and later)
Add the Redis Vector Store node to your workflow.
Configure your Redis credentials.
Specify the vector field dimension and distance metric (L2, Cosine, or Inner Product).
Use for RAG pipelines, semantic caching, and agent memory persistence.
Examples
Troubleshooting & Optimization
Connection Failures
Verify host and port fields are separate.
Confirm plan TLS support before enabling SSL.
Check IP Access Rules in Redis Cloud if using n8n Cloud.
Performance Degradation
Enable connection pooling or limit concurrent executions in n8n.
Use compact keys and value sizes for high-throughput caching and sessions.
-
For large vector datasets:
Prefer approximate indexes (e.g., HNSW‑style configurations) for speed.
Use FLAT (brute-force) only for small datasets or exact search requirements.
Version Mismatch
Ensure n8n ≥ 1.116 for native Redis Vector Store support.
Security & Best Practices
Credentials: Store securely within n8n’s credential manager; sanitize before exporting workflows.
Access Control: Use Redis ACLs with least privilege (
defaultuser or dedicated app user).Encryption: Enable TLS where supported; verify CA certificates for enterprise deployments.
Connection Pooling: Avoid exceeding Essentials plan connection limits.
Data Residency: Confirm data location for compliance when using managed services.
-
Network access (CIDR allow list)
On paid Essentials / Pro, configure CIDR allow list to restrict inbound DB access only to trusted IP ranges.
-
Remember:
n8n Cloud egress IPs are not static; CIDR allow list is a poor fit unless you front n8n Cloud with a static-IP proxy.
-
For production, prefer:
Self-hosted n8n in a VPC with private connectivity to Redis Cloud Pro (e.g., VPC peering, PrivateLink, etc.).
0 comments
Please sign in to leave a comment.