linkedin insight
Omax Tech

Loading...

Running Redis on Windows: Setting Up with WSL

Running Redis on Windows: Setting Up with WSL

Cloud/DevOps
Sep 4, 2024
3-4 min

Share blog

Introduction

As a developer working on a Spring Boot project for a school management system, I quickly realized the need for a fast and efficient caching solution to optimize our application’s performance. Redis, with its reputation as a powerful in-memory data store, was the ideal choice. However, there was a small hitch—I was developing on a Windows machine, and Redis is primarily designed to run on Linux. I needed a way to run Redis on my local development environment without switching to a Linux machine or setting up a virtual machine.

That’s when I discovered the Windows Subsystem for Linux (WSL). WSL allows you to run a Linux environment directly on Windows, enabling you to install and use Linux-based tools, such as Redis, without needing separate hardware or a VM. It seemed like the perfect solution to bridge the gap between my Windows setup and the Linux-native Redis.

Configuring Windows Subsystem for Linux (WSL) for Spring Boot

Here’s how I set up Redis on my Windows machine using WSL:

1. Enable WSL: The first step was to enable WSL on my Windows machine. This was straightforward. I opened PowerShell with administrative privileges and ran the command:

javascript
1wsl --install

This command installs WSL and sets up Ubuntu as the default Linux distribution, providing a fully functional Linux environment right inside Windows.

2. Install Ubuntu: Once WSL was installed, the next step was to download Ubuntu from the Microsoft Store. This installation gave me access to the Ubuntu terminal, where I could run Linux commands and install software packages just like on any other Linux system.

3. Install Redis on Ubuntu (WSL): With Ubuntu up and running in WSL, I proceeded to install Redis. This was a breeze, thanks to the simplicity of Linux package management. I opened the Ubuntu terminal and ran the following commands:

javascript
1sudo apt update
2sudo apt install redis-server

4. Start Redis: After installation, I started the Redis server using:

javascript
1sudo service redis-server start

5. Connect Redis to Spring Boot: With Redis running on WSL, I could connect it to my Spring Boot application just like I would on a native Linux machine. The application.properties configuration remained the same, pointing to the Redis instance running on localhost.

javascript
1spring.redis.host=localhost
2spring.redis.port=6379

Final Thoughts

Setting up Redis on Windows using WSL is a great way to take advantage of Linux-based tools and environments without leaving the comfort of your Windows machine. This approach not only allows you to run Redis natively but also opens up a world of possibilities for using other Linux-based tools and services.

While the initial setup might seem daunting if you’re not familiar with WSL, once you have it configured, running Redis becomes straightforward and efficient. The performance benefits of Redis combined with the flexibility of WSL make this a powerful combination for development and testing purposes on a Windows machine.

I hope this helped you understand how to set up Redis on Windows using WSL. Whether you’re using Redis for caching, session management, or other purposes, having it run smoothly on your development machine can significantly improve your workflow. If you have any questions or run into issues, feel free to reach out—I’m here to help! Happy coding!

References

You can checkout the following documentation by microsoft and redis for a more indepth details:

https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-windows/https://learn.microsoft.com/en-us/windows/wsl/install

Blogs

Discover the latest insights and trends in technology with the Omax Tech Blog.

View All Blogs
Responsive web development illustration showing cross-device software design on laptop, tablet, and mobile screens.
6-8 min
April 20, 2026

Our Proven Web Development Process That Delivers Real Results

In software development, success does not come from coding alone. Real results come from understanding business needs, planning the right workflow, building user-friendly designs...

Read More
Secure AWS Systems Manager connectivity illustration showing private cloud access to servers and databases without SSH exposure.
6-8 min
April 20, 2026

Secure AWS Connectivity Using AWS Systems Manager (SSM)

In traditional cloud architectures, secure access to private resources such as databases and internal servers often relies on...

Read More
Cloud upload architecture illustration showing secure multi-account AWS infrastructure for enterprise environments.
6-10 min
April 19, 2026

Building a Secure Multi-Account AWS Architecture for Enterprise Environments (Dev, STG, UAT, Prod)

In today’s cloud-first world, scalability and speed are no longer enough security, governance, and cost control are equally critical...

Read More
Friendly AI assistant robot beside a smartphone, representing adaptive AI agents for modern workflows.
6-8 min
April 15, 2026

Why You Should Use AI Agents Over Single Prompts: Unlocking the Power of Adaptive AI for Complex Workflows

In the world of artificial intelligence (AI), one of the biggest advancements has been the rise of AI agents that adapt dynamically to real-time data and complex workflows...

Read More
Data operations dashboard showing production quality checks, performance trends, and incident alerts across stores.
8-10 min
April 09, 2026

Production Ready ( Quality, performance, and the lessons learned shipping to 150 stores )

We chose dbt over custom scripts, built observability, optimized performance, and shipped to production...

Read More
Scalable data pipeline diagram highlighting dbt macros, reusable models, and multi-store analytics flow.
8-10 min
April 08, 2026

Scaling from 15 to 150 Stores ( When copy-paste becomes technical debt, macros become salvation )

We built a pipeline with observability, incremental models for performance, and snapshots for history. Our 15-store deployment ran smoothly...

Read More
Observability dashboard tracking source freshness, pipeline status, and real-time data quality alerts.
8-10 min
April 07, 2026

Keeping Your Data Fresh: ( The wake-up call at 3am that taught us about observability )

That morning taught us a crucial lesson: a successful dbt run doesn't mean your data is fresh, accurate, or complete. You need observability.

Read More
Retail data architecture visual showing fragmented store databases consolidated into a unified analytics pipeline.
8-10 min
April 06, 2026

Retail Data Chaos: How We Found Our Way Out ( When spreadsheets fail and databases multiply, where do you turn? )

Picture this: You're managing data for a growing retail chain. Store after store opens New York, San Francisco, Los Angeles—each with its own MySQL database...

Read More
Secure AI access workflow showing authentication, authorization, and protected enterprise operations.
8-10 min
April 07, 2026

Securing Your AI-Powered Future (How Authorization Ensures Safe and Appropriate Access)

Discover how authorization in MCP ensures secure, role-based access for AI-powered business workflows...

Read More

Get In Touch

Build Your Next Big Idea with Us

From MVPs to full-scale applications, we help you bring your vision to life on time and within budget. Our expert team delivers scalable, high-quality software tailored to your business goals.