DaveHeller
DaveHeller

Reputation: 8059

How do I run Redis on Windows?

How do I run Redis on Windows? The Redis download page just seems to offer *nix options.

Can I run Redis natively on Windows?

Upvotes: 785

Views: 893333

Answers (30)

Zedrik Cayne
Zedrik Cayne

Reputation: 49

A co-worker of mine didn't like any of the options available. So I came up with something a little different.

A re-implementation of redis in Java. Runs on windows and macOSX. Haven't tried linux yet, but there's a perfectly suitable set of redisses (redissae?) that are easy to install and launch on osx and linux.

https://github.com/ZedrikCayne/gohorserace

You're going to need Java. (At least java 12, but anything better than that should make the magic go)

Image of how to install and run gohorserace
If you have java available:
git clone https://github.com/ZedrikCayne/gohorserace.git
gradlew build
gradlew run

If you just need redis for a semi-persistent cache to test your fancy new tool/website/microservice with, this might be your best (and smallest) bet to get working on windows.

Are there bugs? Probably, but I do run real software that is in the wild against it, and have been filling in all the other stuff I don't use as time permits. So far redis-cli, py-redis, jedis and lettuce all talk nicely with it and treat it like the real thing.

Upvotes: 0

hemn
hemn

Reputation: 383

There is no official ports on Windows. Developers do not want to support and provide links to any Windows binaries https://github.com/redis/redis/issues/12086.

You can build windows binaries with github action msys2/setup-msys2:

gcc make pkg-config libopenssl openssl-devel mingw-w64-x86_64-libc++`
make CFLAGS="-Wno-char-subscripts -O0"

Latest windows releases (for testing purpose only): https://github.com/redis-windows/redis-windows

Upvotes: 0

zangw
zangw

Reputation: 48336

Update

If you have Windows Subsystem for Linux (WSL), natively on Windows 10 and Windows Server 2019 you can do it per Ogglas answer

Or follow these instructions to run a Redis database on Microsoft Windows

    1. Turn on Windows Subsystem for Linux

    In Windows 10, Microsoft replaced Command Prompt with PowerShell as the default shell. Open PowerShell as Administrator and run this command to enable Windows Subsystem for Linux (WSL):

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    

    Reboot Windows after making the change — note that you only need to do this once.

    1. Launch Microsoft Windows Store
    start ms-windows-store:
    

    Then search for Ubuntu, or your preferred distribution of Linux, and download the latest version.

    1. Install Redis server

    Installing Redis is simple and straightforward. The following example works with Ubuntu (you'll need to wait for initialization and create a login upon first use):

    sudo apt-add-repository ppa:redislabs/redis
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install redis-server
    

    Please note that the sudo command might or mightn't be required based on the user configuration of your system.

    1. Restart the Redis server

    Restart the Redis server as follows:

    sudo service redis-server restart
    
    1. Verify if your Redis server is running

    Use the redis-cli command to test connectivity to the Redis database.

    $ redis-cli
    127.0.0.1:6379> set user:1 "Ben"
    127.0.0.1:6379> get user:1
    "Ben"
    

    Please note: By default, Redis has 0-15 indexes for databases, you can change that number of databases NUMBER in redis.conf.

    1. Stop the Redis Server
    sudo service redis-server stop
    

Source :How to Install Redis on Windows


I found one more simple way to install Redis under Windows

Download the latest Redis .msi file from

https://github.com/MSOpenTech/redis/releases

after installation. The Redis service is installed, and we can operate it from Service manager

enter image description here

Upvotes: 331

Robson Piere
Robson Piere

Reputation: 160

Today I know these 4 options:

The first is an open source fork that is on tporadowski/redis that offers compatibility with version 5 (version 6 in development).

The second is memurai (paid), compatible with version 5, has support and a free version for development.

The third is the zkteco-home/redis-windows recently, which offers compatibility with version 7, but is not open source.

There is also the option to run via WSL. But I don't recommend it in production environments.

Upvotes: 5

KUMAR HARSH
KUMAR HARSH

Reputation: 103

Installing Redis

Windows

Windows 8.1 and Earlier

  1. Download Redis (msi) from the link https://github.com/MicrosoftArchive/redis/releases

  2. Run the installer

  3. Open the folder where Redis has been installed and Start redis-server to check if redis is working by clicking on redis-server

  4. Stop Redis server by typing SHUTDOWN SAVE or force quit by CTRL + C

  5. Open Start

  6. Type Environment Variables and click on edit environment variables and path

  7. Inside System variables, click on path

  8. In the next window click on new.

  9. Add a new path

  10. C:\Program Files\{Your Redis Version} Where Redis Version is the Redis version installed on your system For e.g. C:\Program Files\Redis-x64-3.2.100

  11. Verify That Setup was Successful Check by typing redis-cli or redis-server

Windows 10

  1. Step Up WSL

a. Run Windows Powershell as Administrator

b. Run the following command

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

c. Reboot Windows after making the change

d. Download Ubuntu Distros from windows store from https://www.microsoft.com/en-us/p/ubuntu-1804/9n9tngvndl3q?activetab=pivot%3Aoverviewtab

  1. Install and Test Redis

a. Launch the downloaded distro and run the following commands

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server
redis-cli -v

Note: Incase of any errors with installation, refer this article.

Upvotes: 1

serg
serg

Reputation: 111255

Historically, Microsoft had a Windows port of redis, which was released as Redis-64, which offers a full distribution of redis for Windows.

The Microsoft port is now deprecated, but some alternatives have sprung up to fill that void:

  • Memurai is the alternative officially recommended on the Redis-64 deprecation page; it is a commercial offering with free developer tier, maintained by Janea Systems
  • redis-windows is another unofficial port, which also exists

This release includes the redis-server.exe (memurai.exe on Memurai) application that runs a Redis instance as a service on your windows machine, as well as redis-cli.exe (memurai-cli.exe on Memurai) which you can use to interact with any Redis instance.

The RGL repository has historically been listed as an alternative Windows port for Redis, but this repository has not been maintained for some time and implements an older version of Redis than the Microsoft port.

Upvotes: 521

DevWL
DevWL

Reputation: 18840

There are two ways. You can use MSI installation file or do it manually:

First download the msi or the zip file:

You can download both files from here:

https://github.com/MicrosoftArchive/redis/releases


Watch video tutorial (video covers example of both installations)

See this installation video tutorial: https://www.youtube.com/watch?v=ncFhlv-gBXQ



Instruction - for those who can not YT at work:

You can download a moderately out-of-date precompiled version of Redis for 32-bit and 64-bit Windows thanks to Dusan Majkic from his GitHub page: https://github.com/dmajkic/redis/downloads. Go ahead and do that now.

After you download Redis, you’ll need to extract the executables from the zip file. As long as you’re using a version of Windows more recent than Windows XP, you should be able to extract Redis without any additional software. Do that now.

After you’ve extracted either the 32- or 64-bit version of Redis to a location of your choice (depending on your platform and preferences; remember that 64-bit Windows can run 32- or 64-bit Redis, but 32-bit Windows can only run 32-bit Redis), you can start Redis by double-clicking on the redis-server executable. After Redis has started, you should see a window similar to figure A.1.

src: https://redis.com/ebook/appendix-a/a-3-installing-on-windows/a-3-2-installing-redis-on-window/

Upvotes: 26

ajeetraina
ajeetraina

Reputation: 78

You can install Redis on Windows 10 using Windows Subsystem for Linux(a.k.a WSL2). WSL2 is a compatibility layer for running Linux binary executables natively on Windows 10 and Windows Server 2019. WSL2 lets developers run a GNU/Linux environment(that includes command-line tools, utilities, and applications) directly on Windows.

Follow the link below to create Redis database on Microsoft Windows 10 https://developer.redislabs.com/create/windows

Upvotes: 2

user12938962
user12938962

Reputation:

To install Redis on Windows system follow the below steps:

  1. Visit one of the below link:

https://github.com/MSOpenTech/redis/releases (recommended) https://github.com/rgl/redis/downloads

  1. Download MSI file.
  2. Follow the installation Wizard and install the program on your system. (do not change the installation path that is "C:\Program Files\Redis")
  3. Search for "Edit system environment variable" on your start menu
  4. Click on "Environment Variable" button
  5. Select "Path" and click on "Edit"
  6. Now click on "New"
  7. Paste C:\Program Files\Redis (or the path in case you have changed while installing)
  8. Click on "Okay", "Okay" and "Okay"

Now open your Terminal (command prompt) and run redis-cli

Well I am getting some error to open redis-server (It was working fine till now but not sure what's wrong so figuring out and will update this answer)

Upvotes: 16

Tomasz Poradowski
Tomasz Poradowski

Reputation: 1380

Since MSOpenTech's port of Redis is no longer maintained - anyone interested in native port of Redis for Windows can now get the version 4.0.14 and 5.0.10 from here: https://github.com/tporadowski/redis/releases. This fork is a merge of latest 3.2.100 version from MSOpenTech and 4.0.14/5.0.10 from antirez/redis with a couple of bugfixes.

Upvotes: 23

I don't run redis on windows. There's too much hassle involved in keeping up with the ports, and they lag behind redis-stable by a version or two all the time.

Instead I run redis on a Vagrant virtual machine that runs redis for me. I've bundled up the whole thing into a simple github repo so everyone can get in on the fun without too much hassle. The whole thing is an automated build so there's no mess. I blogged about the details here.

Upvotes: 19

Duleepa Wickramasinghe
Duleepa Wickramasinghe

Reputation: 300

You can go through the below steps and get setup redis in windows.

  1. Download the Redis zip file. Click here!

  2. Extract the zip file to the prepared directory.

  3. Run redis-server.exe, you can either directly run redis-server.exe by clicking or run via command prompt.

enter image description here

  1. Run redis-cli.exe, after successfully running the redis-server. You can access it and test commands by running redis-cli.exe Test PING command is used to test if a connection is still alive.

enter image description here

Upvotes: 4

Ogglas
Ogglas

Reputation: 69918

If you have Windows Subsystem for Linux (WSL), natively on Windows 10 and Windows Server 2019 you can do it like this:

Set up WSL:

  1. To enable Windows Subsystem for Linux, follow the instructions on Microsoft Docs. The short version is: In Windows 10, Microsoft replaces Command Prompt with PowerShell as the default shell. Open PowerShell as Administrator and run this command to enable Windows Subsystem for Linux (WSL):

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    
  2. Reboot Windows after making the change—note that you only need to do this one time.

  3. Download and install one of the supported Linux distros from the Microsoft Store. Ubuntu works fine.
    Note that Ubuntu 20.04 LTS may give you some trouble because of a known issue with the realtime clock (as of August 2020). Choosing Ubuntu 18.04 LTS instead avoids that issue.

Install and Test Redis:

  1. Launch the installed distro from your Windows Store and then install redis-server. The following example works with Ubuntu (you’ll need to wait for initialization and create a login upon first use):

    > sudo apt-get update
    > sudo apt-get upgrade
    > sudo apt-get install redis-server
    > redis-cli -v
    
  2. Restart the Redis server to make sure it is running:

    > sudo service redis-server restart
    
  3. Execute a simple Redis command to verify your Redis server is running and available:

    $ redis-cli 
    127.0.0.1:6379> set user:1 "Oscar"
    127.0.0.1:6379> get user:1
    "Oscar"
    
  4. To stop your Redis server:

    > sudo service redis-server stop
    

Source:

https://redislabs.com/blog/redis-on-windows-10/

https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux

Upvotes: 58

Alexis Campailla
Alexis Campailla

Reputation: 1044

You can use Memurai for Windows, a Redis-compatible cache and datastore for Windows, currently compatible with Redis 5. Memurai aims to fulfill the need for a supported Redis-compatible datastore on the Windows platform. At its core, it’s based on Redis source code, ported to run natively on Windows, and it’s designed to provide the level of reliability and performance required for production environments. Memurai is free for development and testing. You can learn more and download Memurai at https://www.memurai.com.

Alexis Campailla
CEO, Memurai

Upvotes: 32

Karthik P
Karthik P

Reputation: 481

There is no native version of the Redis for windows.(Only some old versions are available)

But you can install latest versions using WSL(Windows Subsystem for Linux), Refer the following blog from the Redis Labs:

https://redislabs.com/blog/redis-on-windows-10

Upvotes: 2

Ash1
Ash1

Reputation: 91

after you downloaded and installed Redis, checkout the documentation doc in the Redis installation folder. you can find everything there in regard to how to start and stop redis-server.
If you installed Redis through the .exe file chances are you're already running it. to make sure whether the Redis server is running checkout the Task Manager -> services tab.

enter image description here

under status field you can see whether it's running or not. If it's stopped right click on it and start the service.

enter image description here

You can write Redis commands in redis-cli, and to open redis-cli in terminal type:

C:\Program Files\Redis\redis-cli.exe

for ease of access you can add the Redis installation directory as an environment variable.

Upvotes: 2

user63898
user63898

Reputation: 30885

i updated the way you can compile and run redis 5 on windows 10 using cygwin https://github.com/meiry/redis5_compiled_for_windows10

Upvotes: -1

Rahamath
Rahamath

Reputation: 531

The MSOpenTech-Redis project is no longer being actively maintained. If you are looking for a Windows version of Redis, you may want to check out Memurai. Please note that Microsoft is not officially endorsing this product in any way. More details in https://github.com/microsoftarchive/redis

To install & setup Redis Server on Windows 10 https://redislabs.com/blog/redis-on-windows-10

To install & setup Redis Server on macOS & Linux https://redis.io/download

Also, you may install & setup Redis Server on Linux via the package manager

For quick Redis Server Installation & Setup Guide for macOS https://github.com/rahamath18/Redis-on-MacOS

Upvotes: 3

buycanna.io
buycanna.io

Reputation: 1204

Using Windows 10?

https://learn.microsoft.com/en-us/windows/wsl/install-win10

/etc/apt/sources.list

(Debian 10 Buster/Bullseye)
Installs latest stable Redis (5.0.6 at time of posting)

deb https://deb.debian.org/debian bullseye main
deb https://deb.debian.org/debian bullseye-updates main
deb http://security.debian.org/debian-security/ buster/updates main
deb http://ftp.debian.org/debian bullseye-backports main
apt install redis-server

Upvotes: 5

Cristiana Chavez
Cristiana Chavez

Reputation: 11519

To install Redis for Windows

You can choose either from these sources

  1. https://github.com/MSOpenTech/redis/releases or
  2. https://github.com/rgl/redis/downloads

Personally I preferred the first option

  • Download Redis-x64-2.8.2104.zip
  • Extract the zip to prepared directory

  • run redis-server.exe or redis-server.exe --maxheap 2gb

enter image description here

  • then run redis-cli.exe

enter image description here

enter image description here

You can start using Redis now, please refer for commands

Upvotes: 127

Nux
Nux

Reputation: 7078

I am using Memurai which is Redis-compatible cache and datastore for Windows. It is also recommended by Microsoft open tech as it written on their former project here.

This project is no longer being actively maintained. If you are looking for a Windows version of Redis, you may want to check out Memurai. Please note that Microsoft is not officially endorsing this product in any way.

Upvotes: 7

Dherik
Dherik

Reputation: 19050

I think these is the two most simple ways to run Redis on Windows

1 - Native (and updated) port for Windows

As described here on Option 3) Running Microsoft's native port of Redis:

  1. Download the redis-latest.zip native 64bit Windows port of redis

wget https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip

  1. Extract redis64-latest.zip in any folder, e.g. in c:\redis

  2. Run the redis-server.exe using the local configuration

cd c:\redis

redis-server.exe redis.conf

  1. Run redis-cli.exe to connect to your redis instance

cd c:\redis

redis-cli.exe

2 - With Vagrant

You can use Redis on Windows with Vagrant, as described here:

  1. Install Vagrant on Windows

  2. Download the vagrant-redis.zip vagrant configuration

    wget https://raw.github.com/ServiceStack/redis-windows/master/downloads/vagrant-redis.zip

  3. Extract vagrant-redis.zip in any folder, e.g. in c:\vagrant-redis

  4. Launch the Virtual Box VM with vagrant up:

    cd c:\vagrant-redis

    vagrant up

This will launch a new Ubuntu VM instance inside Virtual Box that will automatically install and start the latest stable version of redis.

Upvotes: 14

JesseBuesking
JesseBuesking

Reputation: 6586

MS Open Tech recently made a version of Redis available for download on Github. They say that it isn't production ready yet, but keep an eye on it.

Github repo

Download releases as MSIs

Upvotes: 32

behzad babaei
behzad babaei

Reputation: 1161

you can install Redis by following this article: https://github.com/ServiceStack/redis-windows but for going straight, you can download it by this link: https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip after downloading, go to the directory which you like to put your files,then extract the zip file, then open a command prompt and go to the directory where you extracted your file, then type "redis-server" and hit enter(for opening redis-cli open command and route to redis directory, but instead of "redis-server" execute "redis-cli").

Upvotes: 6

Kentative
Kentative

Reputation: 105

Here are my steps to install Redis 4.0.8 on Windows 10 Pro (1709) via Windows Subsystem for Linux:

in home/user/
   01 wget http://download.redis.io/releases/redis-4.0.8.tar.gz
   02 tar xzf redis-4.0.8.tar.gz
   03 cd redis-4.0.8/
   04 sudo apt-get install make
   05 sudo apt-get update
   06 sudo apt-get install gcc
   07 cd deps
   08 make hiredis jemalloc linenoise lua geohash-int
   09 cd ..
   10 make

You can skip several steps if you have an up-to-date environment.

Upvotes: 3

Dzintars
Dzintars

Reputation: 1571

One of the most easy way to run Redis on windows host is to use Docker Redis container. Just fire up Hyper-V, Download Docker and run Redis

Upvotes: 9

Dan Nguyen
Dan Nguyen

Reputation: 1348

The redis version on windows was published by microsoft open tech team But recently this project has been archived to https://github.com/MicrosoftArchive/redis read-only and will not update. Has stopped development

Upvotes: 3

awebartisan
awebartisan

Reputation: 1514

Maybe its a little Late but, I was able to run Redis on Windows 10 Aniversary Update.
Windows 10 Aniversary Update Comes with Bash on Ubuntu on Windows, simply, it comes with bash.

Below are the two tutorial that I followed:

1- How to Install and Use the Linux Bash Shell on Windows 10
2- How To Install and Use Redis

Below is the image of running Redis.

Enjoy :)

Redis running on port 6379

Upvotes: 62

Viral Patel
Viral Patel

Reputation: 951

enter image description hereenter image description hereenter image description here

VARY EASY:(NO ANY CAMMAN OR NOT GOING TO ANY LINK,ONLY FOLLOW THIS STEP ,FOR ALL VERSION)   
             FIRST INSTALL REDIS 
                -->>AFTER OPEN TASKBAR
                -->>OPEN SERVICE(taskbar service)
                -->>CHOOSE REDIS 
                -->>RIGTH CLICK ON REDIS SERVICE AND OPEN SERVICE(VIEW IMAGES) 
                -->>CLICK ON START OR RESTART.(ALSO SET AUTOSTART)

Upvotes: -2

Salvador Dali
Salvador Dali

Reputation: 222441

The most updated (only few minor releases behind) version of Redis can be found here. This repository provides you with 3.2.100 version (current is 3.2) whereas the most upvoted answer gives you only 2.4.6 version and the last update to the repo was 2 years ago.

The installation is straightforward: just copy everything from the archive to any folder and run redis-server.exe to run the server and redis-cli.exe to connect to this server through the shell.

Upvotes: 171

Related Questions