This quickstart guide will help you start a Redis server, connect to it, and run your first commands.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/redis/redis/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
This guide assumes you have Redis installed. If you haven’t installed Redis yet, see the installation guide.The fastest way to get started is using Docker:
Start the Redis server
Navigate to the Redis directory
If you built Redis from source, navigate to your Redis installation directory:Replace
<version> with your Redis version (e.g., 8.0.0).Start the server
Launch Redis server with the default configuration:For a Redis instance with all data structures enabled:You should see output indicating Redis is running:
Connect with redis-cli
redis-cli is Redis’ command line interface, available as part of all Redis installations.
Open a new terminal
Keep your Redis server running in the original terminal and open a new terminal window.
Launch redis-cli
Navigate to the Redis source directory and start the CLI:You’ll see the Redis prompt:
Run basic commands
Now that you’re connected, let’s try some fundamental Redis operations.Store and retrieve data
UseSET to store a value and GET to retrieve it:
Work with counters
Redis excels at atomic operations like incrementing counters withINCR:
Store multiple values
Set multiple key-value pairs at once withMSET:
Work with expiration
Set a key with an expiration time usingSETEX:
Explore data structures
Lists
Use lists for queues and stacks:Sets
Track unique items with sets:Hashes
Store objects as hashes:Sorted Sets
Build leaderboards with sorted sets:Configuration options
Redis can be configured via the command line or using a configuration file.The default Redis configuration binds to
127.0.0.1 -::1 (localhost only) for security. To accept connections from other hosts, you’ll need to modify the bind directive in redis.conf.Test your installation
After building Redis from source, it’s recommended to run the test suite:Alternative tools
Redis Insight
For a more visual experience, use Redis Insight—a tool that lets you explore data, design, and optimize your applications. Redis Insight integrates Redis Copilot, a natural language AI assistant.Client libraries
Connect your application to Redis using client libraries in your preferred language:- Python (redis-py)
- JavaScript (node-redis)
- Java (Jedis)
- Go (go-redis)
- C#/.NET (NRedisStack)
- Full list of client libraries
Next steps
Introduction to Redis data types
Learn about all available data types
Full command reference
Explore the complete Redis command set
Redis for AI
Use Redis for AI and ML applications
Starter projects
Browse language-specific starter projects