🔴 Setup Redis — In-Memory Data Store

Deploy Redis on Ubuntu with Docker — the ultra-fast in-memory database used for caching, session storage, queues, and pub/sub messaging. Auto-generates a secure password.

⚠️ This script is provided for demo and testing purposes only. Not intended for production use.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install script — auto-generates a secure Redis password.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/databases/redis/redis-ubuntu.sh
chmod +x redis-ubuntu.sh
sudo bash redis-ubuntu.sh

Tutorial Steps

1 Download & Run the Script

The script installs Docker if needed, generates a secure random password, and starts Redis with authentication enabled.

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/databases/redis/redis-ubuntu.sh
chmod +x redis-ubuntu.sh
sudo bash redis-ubuntu.sh

2 Save Your Generated Password

At the end of the script, your auto-generated Redis password is displayed. Save it now — you'll need it to connect.

3 Connect with redis-cli

redis-cli -h <server-ip> -p 6379 -a <generated-password>

4 Test the Connection

Once connected, run a quick test:

PING
# Expected response: PONG

SET mykey "hello"
GET mykey
# Expected response: "hello"

Ports Used

PortPurpose
6379Redis