Search code examples
redisstartupredis-server

Can redis-server executable can be used with .conf file as well as -- cmd line option?


I have an requirement to pass a default .conf file to redis-server executable while starting redis and at the same time i want to override some config param while runnng redis-server executable without touching .conf file


Solution

  • You can just pass the configuration as an argument to the process and then override each one of the properties with -- flag arg.

    e.g.

    redis-server myredis.conf --requirepass "hello world"