CloudLinux.ro
Databases

How to install Redis and use it as a cache

Updated 7/20/2026

Redis is an in-memory data store used as a cache, message broker or fast database. A few milliseconds of latency make the difference for busy apps.

1. Install

apt-get update -y
apt-get install -y redis-server
systemctl enable --now redis-server

2. Secure it

In /etc/redis/redis.conf, set a password and bind Redis to localhost only:

requirepass strong_password
bind 127.0.0.1
systemctl restart redis-server

3. Test

redis-cli
AUTH strong_password
SET test "works"
GET test

4. Use as a cache

Most frameworks (Laravel, Django, Node) have native support for Redis as a cache and for sessions. You just configure the host (127.0.0.1), port (6379) and password in your app.

Or install it with one click

Pick Redis from the app catalog for a ready-configured install.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials