Memurai for Windows is compatible with the Redis API version 5. This includes compatibility with the Redis 5 configuration file syntax, with a few differences as described below. The configuration file is a text file that contains one keyword per line followed by one or multiple values:
keyword arg1 arg2 ... argN
Values can contain spaces if they are enclosed in double or single quotes:
logfile "C:\logs\memurai log.txt"
Since Memurai maintains compatibility with Redis, values that represent a file or folder path can use either backslash
\ or forward-slash
logfile "C:/logs/memurai log.txt"
A common way to run Memurai is as a Windows service using a configuration file, but Memurai can also be executed as a standalone application with or without a configuration file. When running Memurai without a configuration file, a default built-in configuration is used. To start the server without a configuration file, run:
memurai.exe doesn't have write access to its installation folder (e.g.
C:\Program Files\Memurai\) unless it is executed with administrator privileges, so it is recommended to launch the application from a working directory where the current user has read-write access. Read-write access to the working directory is needed when data persistence is enabled or to persist changes to the configuration file.
Note: when running Memurai as a standalone application, by default it uses the same port number
6379 that is used by the Memurai instance that runs as a Windows service (unless the default Windows service port number was changed or the Memurai Windows service install option was not chosen).
Therefore, make sure to run
memurai.exe passing a different port number or stop the Memurai Windows service instance if it's running.
To start Memurai with a custom configuration file, you can copy the provided default configuration file from the Memurai installation folder to a folder where the current user has read-write access, and make the desired changes there. To start the server, run:
Memurai also supports passing configuration arguments from the command line. All the configuration settings available in the configuration file can be passed as command line arguments by simply prefixing the corresponding keywords with a double dash
For example, to overwrite the default
logfile settings without passing a configuration file:
C:\Users\<username>\memurai>memurai.exe --port 8000 --logfile "C:\logs\memurai-log.txt"
If a configuration file is specified, it must be the first command line argument. Any additional arguments will override the corresponding settings in the configuration file. Example:
C:\Users\<username>\memurai>memurai.exe memurai.conf --port 8000 --logfile "my-memurai-log.txt"
Configuration files can be nested using the
include keyword. If a flag is present in multiple files, the value in the included configuration file will override the value in the including configuration file.
Multiple instances of Memurai can be run at the same time, as long as they use different port numbers, log files and data files.
Changing configuration flags at runtime
Using the Memurai client
memurai-cli.exe, it's possible to change most configuration flags. The rules are the same as in Redis 5.
Differences with Redis Configuration Flags
Memurai supports all the Redis API version 5 flags, with exception for these flags:
If any of these flags are present in a configuration file, they are simply ignored.
Memurai doesn't use any flags that are not supported by the Redis API version 5.