BRIX On-Premises > Prepare BRIX On-Premises infrastructure > Databases > Prepare external databases / Valkey

Valkey

Valkey is a high-performance NoSQL database management system designed based on Redis for modern cloud and distributed systems.

начало внимание

Valkey version 7.2.8 or higher is required for proper system operation.

конец внимание

This article describes how to install Valkey 8.1.1 on Ubuntu Linux 22.04 and 24.04. You can obtain Valkey installation files for your OS from:

For detailed instructions, refer to the official Valkey documentation.

To replace Redis with Valkey, see the Migrate from Redis to Valkey article.

Valkey deployment steps:

    1. Valkey installation.
    2. Valkey configuration.
    3. Connection to Valkey.

Step 1: Valkey installation

  1. Install the packages:

sudo apt install -y apt-transport-https ca-certificates curl

  1. Import the keys:

sudo curl -fsSL https://repo.elma365.tech/deb/elma365-keyring.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/elma365-keyring.gpg

  1. Add the repository:

echo "deb [arch=amd64] https://repo.elma365.tech/deb $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/elma365.list
sudo apt update

  1. Install Valkey:

sudo apt install elma365-valkey-server

Step 2: Valkey configuration

начало примечание

Note

The password can contain the following characters:

  • Uppercase Latin letters: A to Z
  • Lowercase Latin letters: a to z
  • Digits: 0 to 9
  • Symbols: -_

Reserved (invalid) characters:

! * ' ( ) ; : @ & = + $ , / ? % # [ ]

конец примечание

Configure the database management system installed:

  1. Enable connection to the Valkey server. To do it, edit the /etc/Valkey/Valkey.conf configuration file by adding the IP address of the server, e. g. 192.168.10.10:

sudo nano /etc/valkey/valkey.conf
bind 127.0.0.1 ::1 192.168.10.10

Enable TLS/SSL in Valkey

  1. Increase the maximum number of clients by setting the maxclients parameter to 20000. Uncomment the line by removing the # sign:

maxclients 20000

  1. Set the key eviction policy by setting the maxmemory-policy parameter to allkeys-lfu. Uncomment the line by removing the # sign:

maxmemory-policy allkeys-lfu

  1. Disable creation of snapshots by setting the save parameter to null. Uncomment the line by removing the # sign:

save ""

  1. Disable the AOF (Append Only File) to prevent saving of Valkey data in a file. To do it, set the appendonly parameter to no. Uncomment the line by removing the # sign:

appendonly no

  1. Disable the protected mode if the bind 0.0.0.0 parameter is used or the requirepass option is not set:

protected-mode no

  1. Restart Valkey:

sudo systemctl restart valkey-server

Step 3: Connection to Valkey

Connection string for Valkey:

redis://<valkey-server-address>:6379/0

Connection string for Valkey with TLS/SSL:

rediss://<valkey-server-address>:6379/0