swiftops-backend / docs /dev /intergrations /REDIS_CLOUD_VISUAL_GUIDE.md
kamau1's picture
chore: migrate to useast organize the docs, delete redundant migrations
c4f7e3e

Redis Cloud - Visual Setup Guide

🎯 Your Mission: Get Redis URL in 5 Minutes


πŸ“‹ What You'll Get

At the end, you'll have this:

redis://default:abc123xyz@redis-12345.c1.us-east-1.ec2.cloud.redislabs.com:12345

πŸš€ Step 1: Sign Up (2 minutes)

Go to: https://redis.com/try-free/

You'll see:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Redis Cloud - Try Free            β”‚
β”‚                                     β”‚
β”‚  [Sign up with Google]              β”‚
β”‚  [Sign up with GitHub]              β”‚
β”‚                                     β”‚
β”‚  Or use email:                      β”‚
β”‚  Email: [________________]          β”‚
β”‚  Password: [________________]       β”‚
β”‚                                     β”‚
β”‚  [Create Free Account]              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Click: "Create Free Account" or use Google/GitHub

βœ… No credit card needed!


πŸ—„οΈ Step 2: Create Database (2 minutes)

After login, you'll see dashboard:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Redis Cloud Dashboard                      β”‚
β”‚                                             β”‚
β”‚  [+ New Database]                           β”‚
β”‚                                             β”‚
β”‚  Your Databases:                            β”‚
β”‚  (empty - let's create one!)                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Click: "+ New Database"


Choose Plan:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Select Your Plan                           β”‚
β”‚                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
β”‚  β”‚ FREE            β”‚  ← Choose this!       β”‚
β”‚  β”‚ $0/month        β”‚                       β”‚
β”‚  β”‚ 30MB storage    β”‚                       β”‚
β”‚  β”‚ 30 connections  β”‚                       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
β”‚                                             β”‚
β”‚  [Continue]                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Click: "FREE" then "Continue"


Configure Database:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Database Configuration                     β”‚
β”‚                                             β”‚
β”‚  Name: [swiftops-otp___________]           β”‚
β”‚                                             β”‚
β”‚  Cloud: [AWS β–Ό]                            β”‚
β”‚  Region: [US East (N. Virginia) β–Ό]        β”‚
β”‚                                             β”‚
β”‚  βœ“ Auto-generate password                  β”‚
β”‚                                             β”‚
β”‚  [Activate Database]                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Fill in:

  • Name: swiftops-otp (or anything you like)
  • Cloud: AWS (or any)
  • Region: US East (or closest to you)

Click: "Activate Database"

⏳ Wait 30-60 seconds...


πŸ”‘ Step 3: Get Connection Details (1 minute)

Database is ready! You'll see:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  swiftops-otp                               β”‚
β”‚  Status: ● Active                           β”‚
β”‚                                             β”‚
β”‚  Public endpoint:                           β”‚
β”‚  redis-15438-c212.ap-south-1.ec2...        β”‚
β”‚                                             β”‚
β”‚  [Connect using Redis CLI, Client...]      β”‚
β”‚                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Click: "Connect" button

A popup will show:

Option A - Full URL (easiest):

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Connection String:                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ redis://default:abc123xyz@redis-... β”‚   β”‚
β”‚  β”‚                          [Copy]     β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Just click Copy! βœ…

Option B - Separate Fields:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Host: redis-15438-c212.ap-south-1...      β”‚
β”‚  Port: 15438                                β”‚
β”‚  Username: default                          β”‚
β”‚  Password: abc123xyz456                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Build URL manually:

redis://USERNAME:PASSWORD@HOST:PORT

Example from your database:

redis://default:abc123xyz456@redis-15438-c212.ap-south-1.ec2.cloud.redislabs.com:15438

βœ… Copy this entire URL!


πŸ€— Step 4: Add to HuggingFace (1 minute)

Go to your Space:

https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE

Click "Settings" tab:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  [Files] [Settings] [Community]             β”‚
β”‚                                             β”‚
β”‚  Variables and secrets                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ [+ New secret]                      β”‚   β”‚
β”‚  β”‚                                     β”‚   β”‚
β”‚  β”‚ Existing secrets:                   β”‚   β”‚
β”‚  β”‚ β€’ DATABASE_URL                      β”‚   β”‚
β”‚  β”‚ β€’ CLOUDINARY_URL                    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Click: "+ New secret"


Add Redis URL:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Add a new secret                           β”‚
β”‚                                             β”‚
β”‚  Name:                                      β”‚
β”‚  [REDIS_URL_________________]               β”‚
β”‚                                             β”‚
β”‚  Value:                                     β”‚
β”‚  [redis://default:abc123xyz@redis-12345...] β”‚
β”‚                                             β”‚
β”‚  [Cancel]  [Save]                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Fill in:

  • Name: REDIS_URL (exactly like this!)
  • Value: Your full Redis URL from Step 3

Click: "Save"


βœ… Step 5: Verify (30 seconds)

Restart your Space:

  • Click "Factory reboot" or push new code
  • Wait for Space to start

Check logs for:

βœ… OTP Service using Redis storage (redis://default:***@redis-12345...)

Test health endpoint:

https://YOUR_SPACE.hf.space/health

Should show:

{
  "components": {
    "redis": {
      "status": "connected",
      "storage_type": "redis",
      "memory": "2.5M / 30M"
    }
  }
}

πŸŽ‰ Done!

Your OTP service is now using Redis Cloud!

What you have:

  • βœ… Free Redis database (30MB)
  • βœ… 99.99% uptime
  • βœ… Automatic backups
  • βœ… SSL encryption
  • βœ… No maintenance needed

Cost: $0 forever
Setup time: 5 minutes
Maintenance: None


πŸ†˜ Troubleshooting

"Connection refused"

Check:

  1. Is password correct? (no spaces, exact copy)
  2. Is endpoint correct? (full domain name)
  3. Is port correct? (usually 5 digits)

Test locally:

redis-cli -u "YOUR_REDIS_URL" ping
# Should return: PONG

"Still using memory storage"

Check:

  1. Did you name it exactly REDIS_URL? (case-sensitive!)
  2. Did you restart the Space after adding secret?
  3. Check Space logs for error messages

"Authentication failed"

Fix:

  • Username should be default (not your email)
  • Password should be from Redis Cloud dashboard
  • Format: redis://default:PASSWORD@HOST:PORT

πŸ“ž Need Help?

Redis Cloud:

HuggingFace:


Happy coding! πŸš€