Install Redis on Ubuntu 20.04

sudo apt install redis-server

Configure Redis

sudo nano /etc/redis/redis.conf

find the line specifying the supervised directive. By default, this line is set to no. However, to manage Redis as a service, set the supervised directive to systemd (Ubuntu’s init system).

Secure Redis

sudo nano /etc/redis/redis.conf

locate the requirepass directive under the SECURITY section and uncomment it (by removing #).Once you have uncommented the line, replace foobared with the password of your choice.

sudo systemctl restart redis.service

References
https://phoenixnap.com/kb/install-redis-on-ubuntu-20-04