For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to install Redis on Ubuntu

Looking to speed up your applications? Redis is a powerful in-memory data store used for caching, sessions, queues, and real-time features. In this guide, we’ll install and configure Redis step by step.


What Redis Is Used For

  • Cache database queries (faster websites)

  • Store user sessions

  • Build real-time features (chat, notifications)

  • Handle background jobs (queues)

  • Temporary storage (carts, game states)


Requirements

  • Linux VPS (Ubuntu 20.04+ recommended)

  • SSH access with sudo privileges

  • ~10 minutes


Step 1: Update Your System

sudo apt update

(Optional)


Step 2: Install Redis

Ubuntu / Debian

CentOS / RHEL 8+

CentOS / RHEL 7


Step 3: Start and Enable Redis


Step 4: Test Redis

Expected output:


Step 5: Secure and Configure Redis

Recommended changes:


Step 6: Restart Redis


Done 🎉

Redis is now ready to use.

Last updated