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 pricingRelated tutorials
How to secure MongoDB with authentication
By default, MongoDB runs without a password. Here is how to enable authentication and create an admin user.
Updated 7/20/2026DatabasesHow to migrate a database between servers
Move a MySQL or PostgreSQL database to a new server with minimal downtime, using dump and restore.
Updated 7/20/2026DatabasesHow to connect an app to a remote database
Allow access to a database from another server, securely: bind address, dedicated user and firewall.
Updated 7/20/2026