🚀 Set Up Redis with RedisInsight Using Docker for Local Development
Redis is a high-performance in-memory data store, widely used for caching, pub/sub, queues, and more. When working locally, inspecting what’s happening inside Redis can be difficult without a user-friendly UI.
That’s where RedisInsight comes in — an official Redis GUI that helps you visualize and manage your Redis instance.
In this tutorial, we’ll use Docker Compose to spin up a Redis container and a RedisInsight UI side-by-side for your local development setup.
✅ Prerequisites
Make sure you have the following tools installed:
- Docker
- Docker Compose
These work across Linux, macOS, and Windows.
🛠 Step-by-Step Setup
📁 Step 1: Create a project directory
Open your terminal and run:
mkdir redis-docker-setup
cd redis-docker-setup
📝 Step 2: Create the docker-compose.yml
file
Now, inside this folder, create a file named docker-compose.yml
and paste the following content:
services:
#redis
redis:
image: redis:alpine
container_name: redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- redis-network
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
#redis-insight
redis-insight:
image: redis/redisinsight:latest
container_name: redis-insight
restart: unless-stopped
ports:
- "5540:5540"
volumes:
- redis-insight-data:/data
networks:
- redis-network
depends_on:
- redis
volumes:
redis-data:
driver: local
redis-insight-data:
driver: local
networks:
redis-network:
driver: bridge
🚀 Step 3: Run the containers
In your terminal, execute:
docker compose up -d
Docker will pull the latest Redis and RedisInsight images and start both containers.
✅ Step 4: Open RedisInsight in your browser
Once the containers are running, navigate to:
http://localhost:5540
Check the recommended settings and also check the terms & conditions switch, and then hit the “Submit” button.
RedisInsight will launch in your browser. It may ask you to add a Redis database. Just enter and then hit Add Database:
-
Host:
redis
-
Port:
6379
RedisInsight will connect to your Redis instance running in Docker.
🔄 More: Redis Persistence
We’ve enabled persistence in Redis using:
command: \["redis-server", "--appendonly", "yes"\]
This ensures that Redis data is stored on disk (in the redis-data
volume), not just in-memory, which is perfect for dev environments where data loss during restarts is a concern.
🧼 Step 5: Tear down the containers (optional)
To stop and remove the containers and associated volumes:
docker compose down
🔚 Conclusion
GitHub Link: https://github.com/rafi021/redis-redisinsight-docker-compose
Youtube: https://youtu.be/C7c08gENGLI
Using Docker Compose, you can set up a complete Redis stack with RedisInsight in seconds — no local installation, no config headaches. This is ideal for developers working with caching layers, pub/sub systems, or simply learning Redis.
If you found this article helpful, feel free to bookmark it or share it with your team!
Would you like a similar setup tutorial for RabbitMQ, MongoDB Compass, or PostgreSQL with Adminer? Let me know!
Top comments (0)