Support Online
Skip to main content

Managing Redis Configuration Settings from the Command Line

What will you learn in this guide?

This guide explains how to manage Redis configuration without shutting down the service.
It clarifies the differences between instant setting changes and permanent writing.
Explains CONFIG SET, GET and REWRITE commands with practical examples.

🧠 Technical Summary

Main topic: Redis runtime configuration management
Solved problem: Need to update settings without stopping the service
Steps: Setting change → persistent write → configuration query


1. Update Redis Settings

The config set command instantly changes Redis behavior.
These changes are valid until reboot.

Opening the Configuration File Manually

sudo nano /etc/redis/redis.conf
  • This command opens the Redis configuration file for editing.

Changing Settings at Run


config set dbfilename genixnode_yedek.rdb
  • This command instantly changes the name of the dump file.

⚠️ Warning:

  • Redis may work unstable if the config set is used incorrectly.
  • It should be used with caution in the production environment.

2. Making Changes Permanent

  1. config set does not write the settings to the file.
  2. Config rewrite is required to make it permanent.

config rewrite
  • This command writes the active settings to the redis.conf file. File structure and comments are preserved.

3. Query Current Configuration

  1. config get is used to see the current settings of Redis.

-Listing Specific Settings


config get repl*
  • This command lists replication settings.

Viewing All Settings


config get *
  • This command returns all modifiable configurations.

Frequently Asked Questions (FAQ)

1. Can all Redis settings be changed at runtime? No. Some security settings, such as requirepass, are changed from the file.

2. Does config rewrite delete comments in the file? No. It only updates the changed parameters.

3. Does it work on managed Redis services? Mostly no. Configuration access is restricted.

4. Why might the command return an error? The parameter may be read-only or the data type is incompatible.


Result

Redis configuration can be managed without stopping the service. Temporary and permanent settings must be separated correctly. Controlled use in production is critical.

You can immediately try high-performance Redis infrastructures on the GenixNode platform.