################################# GENERAL ##################################### # By default Redis does not run as a daemon. Use 'yes' if you need it. daemonize yes # When running daemonized, Redis writes a pid file here. pidfile /var/run/redis/redis-server.pid # Accept connections on the specified port, default is 6379. port 6379 # Bind to loopback to prevent unauthorized external access. bind 127.0.0.1 -::1 # Close the connection after a client is idle for N seconds (0 to disable) timeout 0 ################################# SECURITY #################################### # Require clients to issue a password before executing any other commands. requirepass "YOUR_SECURE_LONG_PASSWORD_HERE" ################################ PERSISTENCE ################################## # Save the DB on disk: # In 3600 seconds if at least 1 change occurred save 3600 1 # In 300 seconds if at least 10 changes occurred save 300 10 # In 60 seconds if at least 10000 changes occurred save 60 10000 # Compress string objects using LZF when dump .rdb databases? rdbcompression yes # Enable Append Only File (AOF) for better durability against data loss. appendonly yes # The fsync policy tells the OS how to write data to disk (everysec is balanced). appendfsync everysec ############################ MEMORY MANAGEMENT ################################ # Set a memory limit. Uncomment and modify to fit your machine's resources. # maxmemory 4gb # Eviction policy when maxmemory is reached (volatile-lru is recommended for caches). # maxmemory-policy volatile-lru