How do I run Redis on Windows?
Solution 1
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.
Solution 2
Update
If you have Windows Subsystem for Linux (WSL)
, natively on Windows 10 and Windows Server 2019 you can do it per
Ogglas answer
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, we can operate it from Service manager
Solution 3
If you want to install MSOpenTech's latest port of Redis, on a Windows server, watched over by a Windows Service, without having to build anything yourself, read on.
MSOpenTech's seems to be the only port that is actively trying to keep up with the latest and greatest Redis. They claim it is production-ready, but they haven't exactly packaged it up neatly for installation on a server, especially if you want to run their RedisWatcher service to keep an eye on it, which is recommended. (I tried building RedisWatcher myself per their instructions, but the required Wix Toolset managed to mess up my system pretty good. I won't go into it.) Fortunately they've provided all the binaries you need, just not all in one place. From the README:
So far the RedisWatcher is not carried over to 2.6. However this should not be affected by the Redis version, and the code in the 2.4 branch should work with the Redis 2.6 binaries.
So you'll need to download binaries from 2 branches in order to get all the necessary bits. Without further ado, here are the steps:
- Download and extract the Redis binaries from the 2.6 branch
- Copy all extracted binaries to c:\redis\bin
- Create another folder at c:\redis\inst1
- Download and extract the RedisWatcher binaries from the 2.4 branch
- Run InstallWatcher.msi. This should create a Windows service called Redis watcher.
- Open up the Windows Services console and start the Redis watcher service.
- (optional) RedisWatcher should have installed to C:\Program Files (x86)\RedisWatcher. There you'll find a config file called watcher.conf, which you can edit to set up additional instances, use different paths than I specified in steps 2 & 3, etc. You will not need to restart the service for changes to take effect.
Solution 4
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.
Solution 5
To install Redis for Windows
You can choose either from these sources
Personally I preferred the first option
- Download Redis-x64-2.8.2104.zip
Extract the zip to prepared directory
run
redis-server.exe
orredis-server.exe --maxheap 2gb
- then run
redis-cli.exe
You can start using Redis now, please refer for commands
DaveHeller
Updated on February 21, 2022Comments
-
DaveHeller about 2 years
How do I run Redis on Windows? The Redis download page just seems to offer *nix options.
Can I run Redis natively on Windows?
-
Salvador Dali over 10 yearsKeep in mind that the most upvoted answer links to outdated repo with very old version of redis. If you need much newer version check my answer link
-
Todd Menier about 10 yearsMSOpenTech just announced a production-ready build of Redis 2.8.4. It looks like my instructions for gathering up all the bits are still relevant though.
-
SSED over 8 yearsfor local development setup - geekindulgence.com/…
-
Cihan B. about 7 yearsI recommend using Docker on Windows with redis. few repos: - the official redis repo: hub.docker.com/_/redis - the redis-enterprise repo (clustered redis running Redis Cloud by Redis Labs): hub.docker.com/r/redislabs/redis
-
Todd Menier about 6 yearsPay attention to the DATES of the answers (and comments), which is more important than upvotes for this particular question. MOST answers (including mine) are now outdated. Microsoft's native port appears to be discontinued. If you have the latest Windows 10, running Redis on Ubuntu on Windows appears to be quite possibly the best option. See here.
-
jinglesthula almost 6 yearsIt looks like the MSFT port hasn't been updated since 2016.
-
Alexis Campailla almost 5 yearsMost answers are outdated and point to projects that are now abandoned. The MSOpenTech port was discontinued in 2016. See my answer for a solution that is up-to-date with the latest Redis (Redis 5, at the time of this writing).
-
Karthik P over 4 yearsI suggest using WSL for windows, redislabs.com/blog/redis-on-windows-10
-
Somnath Singh over 3 yearsall these versions are outdated where can found 6.0 version for windows. And why is they so difficult to find even when the Redis is used in almost all big projects?
-
Md. Alim Ul Karim over 3 years# Redis Installation Link for Windows github.com/tporadowski/redis/releases
-
user63898 about 2 yearsyou can use it compiled in cygwin see this instructions: github.com/meiry/redis5_compiled_for_windows10
-
-
desperateCoder almost 11 yearsWasn't one click for me. I've run the executable and still not sure how to get it to run
-
solublefish almost 11 yearsAfter running the installer, I had to manually put a redis.conf file in c:\Program Files\Redis, as described in the readme. I just copied c:\program files\Redis\conf\redis-dist.conf. Then I could start the service from the services control panel (or 'net start redis' from a command line)
-
Ingo Kegel almost 11 yearsI had to edit the service and change the account to "local system", otherwise the service would not start. I did not have to copy any config files.
-
Todd Menier over 10 yearsStraightforward if just want to run the exe, which I'd never do in a production environment without the watcher service, and they haven't provided binaries for that in the 2.6 branch for whatever reason. Fortunately the 2.4 version of the service is compatible with the 2.6 version of the exe - see my answer to get it all up an running.
-
Salvador Dali over 10 years@ToddMenier most probably no one would run exe in production environment, because people would use some linux system for this. This is how to set up redis to be able to play with it and to learn (and I do not see why would I need to run multiple instances of redis here)
-
Todd Menier over 10 yearsI'm running it in production and it works great. That said, all else being equal you are right, Linux is the way to go. But we're a small Windows shop without much *nix expertise to speak of.
-
MartyIX about 10 yearsgithub.com/MSOpenTech/redis/tree/2.8.4_msopen/bin/release - There are some binaries now.
-
Royi Namir about 10 years+1 ( for the img trick) . ps - how can I make my windows run the redis server without user login ? is there any service version for redis server executable ? for example - there server was reset , and now the logon window appear. but I want redis server - at that point - to be running.
-
Christiaan Westerbeek almost 10 yearsYou'll be happy to try this one. It works (on my Windows 2008 R2 64bit server at least). Takes you 5 minutes.
-
ducu almost 10 yearsCurrent release (redis-2.8.12.zip) only works for x64 Windows. Try 2.6 branch for the x86 release, but this one doesn't run as a service: github.com/MSOpenTech/redis/tree/2.6/bin/release
-
Stephen Patten over 9 yearsHow to you access Redis once the vm boots? by IP?
-
Stephen Patten over 9 yearsOnce vagrant has got the box up and running, how do you access redis? I think the latest build did not compile redis correctly. This would be vagrant on windows 64bit
-
Stephen Patten over 9 yearsHumm, I see in the commands that are executed that the redis port was forwarded :) So I assume it means localhost:6379 is where I use redis from
-
Stephen Patten over 9 yearsI think the port gets forwarded if I'm not mistaken
-
maurits over 9 years@StephenPatten: Yeah, you should be able to access it at
localhost:6379
. -
Stephen Patten over 9 yearsYeah, the redis build failed :(
-
tfont over 9 yearsI receive a nice error when running InstallWatcher.msi: There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.
-
Ryan Shripat about 9 yearsAt the end, if you want to know that it's installed and working fine, you can download the Redis Desktop Manager (github.com/uglide/RedisDesktopManager or via Chocolatey). By default, the Host is localhost running on port 6379.
-
godimedia about 9 yearsIs this method valid for 2.8?
-
godimedia about 9 yearsDo we need to install Visual Studio, just for installing Redis on Windows? How stupid. :|
-
JesseBuesking almost 9 years@arun I just checked and it works. Maybe there was a hiccup or github is blocked for you?
-
arun almost 9 yearsHmm, I even logged in. Still doesn't work for me. But I am using Salvador Dali's solution now.
-
Igor Kudrin almost 9 yearsBinaries were moved to Releases page github.com/MSOpenTech/redis/releases
-
bbrown almost 9 yearsThanks, Igor! I've updated the introductory paragraph above to reflect that change.
-
rtfminc almost 9 yearsAlso at this site is a way to run Redis w/o vagrant. In windows 8 I had it running in 2 minutes.
-
PreguntonCojoneroCabrón over 8 yearsChocolatey for install it : geekindulgence.com/… Useful for development machine IMHO. For server, I'm confused it.
-
khaosdoctor over 8 yearsDid this but the port command did not work, só I just tried: redis-server --service-install --service-name Redis And it worked
-
user64141 over 8 yearsThanks, Salvador. This was just what I was looking for. To show my gratitude, I just gave you double credit. One upvote for the correct answer, and one upvote for pointing me away from the outdated, yet most upvoted answer.
-
Lu Roman over 8 yearsThis worked for me (zip), i tried with the msi that is listed on the same link but didn't work.
-
Bhargav Rao about 8 yearsWhilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
-
Dhrumil Bhankhar almost 8 yearsPlease note that you might get behavior that you click on "redis-server.exe" and nothing happens. Actually, you need to run that exe from command prompt and supply "--maxheap" param. Something like... "redis-server --maxheap 1024M"
-
Tom over 7 yearsYep, best solution even though I upvoted a solution above. This one does not require to start redis-server.exe to use it.
-
BaltoStar over 6 yearslooks like work stopped at 3.2 pre-release but redis is now on 4.0
-
sherdim over 6 yearsredis 2.6.12 is the last version that works on Windows Server 2003.
-
sherdim over 6 yearsTo get most recent variant of this nice solution that still works on Windows Server 2003 you should: 1. Install as is + tune permissions if you set another user to run service with 2. Change exe files to ones w version 2.6.12 from Todd's solution (see next) 3. Remove strings in \conf\redis.conf from ###### VIRTUAL MEMORY #### to the end
-
r3wt about 6 yearshow do you create a service with it? some of us are not experienced in these areas
-
Kentative about 6 yearsRunning as a service/server: $ src/redis-server --from the site: redis.io/download
-
Pyrejkee about 6 yearsThe most simple way to get an instance of redise under the windows.
-
MAZux almost 6 yearsI got
The operation could not be completed
-
jinglesthula almost 6 yearsAs a note, I installed Ubuntu 18 from the Windows store and had to
sudo apt install gcc make
before I could get Redis installed and built. Ran into this one as well ;) stackoverflow.com/questions/37103054/… -
War over 5 yearsEh? "here are my instructions to install redis on windows" ... bunch of linux commands run in linux using "Windows Subsystem" ... :facepalm:
-
Kentative over 5 yearsWar - this is using Window but via Windows Subsystem for Linux --I find this to be the best solution.
-
neslekkiM over 5 yearsHow do you access this install from windows?
-
awebartisan over 5 yearsyou access it from Bash. and if you are running an application like Laravel you just need to setup the variables in environment file and redis will be available in your project. Because of its port 6379
-
J. Allen over 5 yearsMan it would be nice if someone just wrote down what was in the video. Not everyone can youtube at work.
-
MortenB about 5 yearsThis answer is outdated havent been built new releases since 2016. latest recommendation is on windows10 to install under WSL
-
MortenB about 5 yearsPersistant services under WSL is not supported. Its a downer to run
sudo service redis-server start
everytime the win10 box is restarted. better to use a docker container -
Maxim Mandrik about 5 yearsIn the downloaded zip archive, there is an instruction file in docx. Its copy in txt is also here: raw.githubusercontent.com/MSOpenTech/redis/3.0/… on github.com/MicrosoftArchive/redis under the heading "How to configure and deploy Redis on Windows ".
-
Urasquirrel almost 5 yearsThis was helpful! Thanks!
-
raddevus almost 5 yearsThis is the definitive answer. Easiest most reliable way to get "official" redis on windows. thx
-
Cristiana Chavez almost 5 yearsPlease note: just get the latest release. Happy coding!
-
Ahmed Aboud almost 5 yearsgithub.com/microsoftarchive/redis/releases/tag/win-3.2.100 download the msi installer and install and cd to the installed directory and typ 'ping' to test and thats it
-
Ramesh over 4 yearsif you have not connected with redis For windows from Command Prompt, cd C:\Program Files\Redis and then redis-server
-
airstrike about 4 yearsAs much as I appreciate your efforts, that EULA is a no-no. Pass.
-
airstrike about 4 yearsgithub.com/tporadowski/redis has carried on with updating MS Open Tech to the ~latest versions of redis
-
TamusJRoyce about 4 yearscygwin handles registry changes poorly. msys2 is a better method of compiling redis.
-
JLi almost 4 yearsI had tried the instruction in link 2, it did not work for me but this did: redislabs.com/blog/redis-on-windows-10, with ubuntu 18.04
-
JLi almost 4 yearsA note- the newest version for ubuntu in the store did not work for me. Had to uninstall and install the 18.04 version instead for redis to work.
-
np8 almost 4 yearsThis is the most up-to-date way to use Redis on Windows 10.
-
np8 almost 4 yearsThe versions in github.com/MSOpenTech/redis/releases are outdated. Current recommendation is to use WSL.
-
np8 almost 4 yearsThese versions are out of date years ago. The current recommendation is to use WSL.
-
np8 almost 4 yearsThis is the way to go (WSL), but the details are missing (are behind links). @Ogglas 's answer is the same but with the installation instructions.
-
jbernardo almost 4 yearsI think using this is the more up to date way to natively run Redis on Windows.
-
1UC1F3R616 almost 4 yearsYep, for windows :)
-
borjab almost 4 yearsHere is the official blog with this solution: redislabs.com/blog/redis-on-windows-10
-
Tiago B almost 4 yearsIf you try it today, you get the error
Unable to find package 'redis-64'.
-
Carsten over 3 yearsAs per @JLI's comment above, there is a known issue with Ubuntu 20.04 in combination with WLS. Using 18.04 is easier than any of the fixes offered on the corresponding issue: github.com/microsoft/WSL/issues/4898
-
Tushar over 3 yearsIs there an open source edition or a limited feature production edition available ?
-
Alexis Campailla over 3 years@Tushar there is no open source or free production edition. However we have pricing plans that accommodate different (eg small startup) needs, so I recommend you reach out at memurai.com/contact
-
Rickless over 3 yearsI'm using Debian via WLS and it's working just fine
-
Md. Alim Ul Karim over 3 yearsLoved your solution
-
Marcus Vinicius Campos over 3 yearsI'm using Win 10.0.18363.1198 + WSL 1 (confirmed using PS 'wsl -l -v') and Ubuntu 20.04 here without issues. Redis is running fine and receiving commands. This is not a production environment, but for dev+test all seems in order.
-
Smart Manoj over 3 yearsexe not in v6.0.9
-
Shashikant Pandit about 3 yearsI followed the same steps and it worked. Before renning the redis-cli make sure to run redis-server.
-
johnny 5 about 3 yearsI have it running and working with a program, but how do I access the webpage, I tried navigating to localhost:6379 but nothings there
-
pepe450 about 3 yearsBoth of those options are now very old and out of date versions of Redis. Getting the latest Docker version or using WSL are better options.
-
Irfandy Jip almost 3 yearsShould be accepted as the right answer. Just wanted to confirm what @TomDibble has said, I tried using Ubuntu 20.04. There's a bit moment of stuck when I ran
sudo apt-get upgrade
, but I pressedCTRL + C
which I thought would abort the operation, but then it sets up the downloaded package. I thought I have to install Ubuntu 18.04, but I continue with the redis installation first. And well, the rest of the command just works. Will update if I finally have to change back to 18.04. -
Sobhan over 2 yearsthe most helpful post for this issue, thank you @Ogglas
-
nrion over 2 years@TamusJRoyce hi! how would one compile redis on msys2?
-
TamusJRoyce over 2 yearsgithub.com/redis/redis - follow the steps in the readme. Make sure when you install msys2 and mingw, you include the dependencies in the msys2 installer. Recently, also I highly recommend wsl (I like wsl 1 over 2, as 1 uses windows kernel without cpu virtualization & this app is in-memory - disk is slower in wsl1, but either works). Using Ubuntu on Windows. Works great for me in wsl1 ubuntu using apt-get and .bash-rc startup!
-
M_Farahmand over 2 years@DevWL Microsoft archive doesn't support newer version of redis, but in this address (github.com/tporadowski/redis/releases ) exists up to version 5 .
-
Benedetto about 2 yearsRedis from MicrosoftArchive is old, unsopported and full of bugs. I would not recommend it for any use. Running Redis with WSL is not recommended for production use last time I checked.
-
Jason about 2 yearsI prefer this method myself. +1
-
Awshaf Ishtiaque almost 2 yearsI was wondering how this will translate to when we, for example, decide to host our application on a cloud? How will we instruct the cloud server to do these task, like starting
redis-server.exe
? -
Cristiana Chavez almost 2 years@AwshafIshtiaque this is just for local setup, there are a lot of options you can use redis in cloud, you can use fully manage in memory service like uptash redis vercel, elasticcache AWS,or host it to your nginx server for cloud. digitalocean.com/community/tutorial_collections/…