Redis Config Generator

Generate redis.conf files tailored for pure caching, session storage, or durable persistence with AOF and RDB.

Redis Version

Network & Connection

Use 127.0.0.1 for local, or specific private IPs. Do NOT use 0.0.0.0 without a firewall.

Security & TLS

Plaintext password. If left blank, it's highly recommended to inject via ENV vars instead.

Memory Management

e.g., 2gb. If empty, Redis will consume all available system RAM.

Persistence (RDB & AOF)

Format: 'seconds changes'. E.g. '3600 1' saves every hour if 1 key changed. Leave blank to disable RDB.

Where AOF/RDB files are stored. E.g., /var/lib/redis.

redis.conf
1

Overview

Redis is an incredibly fast, in-memory key-value store. Because it operates in memory, its configuration primarily revolves around two critical questions: what happens when memory runs out (Eviction), and what happens if the server crashes (Persistence)?

Memory Policies

Configure maxmemory and eviction algorithms (LRU/LFU) to prevent out-of-memory crashes.

Persistence

Tune AOF fsync intervals and RDB snapshot schedules to balance speed and data durability.

Security

Ensure protected mode is active and set up bind addresses to prevent unauthorized access.

Production Checklist

  • Never Expose to the Internet: Redis was not designed to be exposed directly to the internet. Bind to a private network IP or localhost.
  • Set maxmemory: Always set a maxmemory limit. Without it, Redis will continue allocating memory until the Linux OOM Killer abruptly terminates the process.
  • Disable Persistence for Cache: If using Redis strictly as a transient cache (data can be regenerated from a primary database), disable RDB and AOF to maximize IO performance.
  • Use TLS: If your architecture requires Redis to communicate across different data centers or VPCs, enable TLS natively in redis.conf.