(**) Translated with www.DeepL.com/Translator
Redis is a service is an extremely powerful key-value database management system. article wikipedia. I use it for storing Nextcloud PHP sessions.
Installation
Connected root :
apt update
sudo apt install redis-server
Configuration
Generate a password, which will allow customers to authenticate themselves. You can use the package “apg” (apt install apg
). This password will have to be provided to all customers requiring access to this service.
Modify the configuration file : /etc/redis/redis.conf
[...]
supervised systemd
# I want this service to listen on all network interfaces
# Remplace this line : bind 127.0.0.1 ::1
# with
bind *
# Add this line
requirepass [Generated password]
[...]
Restart the service : systemctl restart redis
Functional test
Redis has a “redis-cli” command line client
redis-cli
127.0.0.1:6379> auth [Generated password]
OK
## Add key/value
127.0.0.1:6379> set test 1
OK
## Read key
127.0.0.1:6379> get test
"1"
127.0.0.1:6379> quit
The service is working properly.
If your server has a firewall, open port TCP/6379
Information to be provided to customers
- HOST : [server IP address]
- PORT: 6379 (default) You can change this value by modifying the configuration file /etc/redis/redis.conf, attribut : “port”
- PASSWORD : [Generated password]