Can I run redis on a windows server?

1.7k views Asked by At

I have designed an app in django using django channels with redis servers for websocket communication, but I have to host it on a windows server. I can run the redis server locally on my windows machine and it works well for testing on my localhost. I want to know if I can do the same for a windows server. Can I and how do I run redis servers for that application. Is there any alternative to this? The other answers that I've found are out-dated, and are about running redis on the local machine.

I am adding some details of my code as to how I'm using my redis servers for real time websockets communication.

CHANNEL_LAYERS = {
    'default': {
        'BACKEND': 'channels_redis.core.RedisChannelLayer',
        'CONFIG': {
            "hosts": [('peaceful-dusk-14195.herokuapp.com', 6379), ('127.0.0.1', 6379)],
        },
    },
}

I have installed channels-redis module for django to use the configurations of redis servers, as taught in the tutorials of the django channels documentation.

Now this code works perfectly if I run the redis server on my local machine. But since redis is a linux based server, I am having problems with hosting it on windows server. I have used the server.c file from this code inside the src folder to run my redis server: Download Redis 6.0.9

I run the C program in my Windows Subsystem for Linux (wsl) and the redis server becomes active. This is done in my testing environment.

Now my question is, can I do the same for the windows server where I will be hosting the application. Will I have to reconfigure something in my server to run the redis servers, or can I simply run the windows server without any modifications?

2

There are 2 answers

0
Andrii Gorokhovskyi On

As far as I know you can use Redis for Windows alternatives, such as Memurai.

It is fully Redis compatible. You can replicate data between Memurai and Redis.

0
Aage On

The Redis docs state the following:

Redis is not officially supported on Windows. However, you can install Redis on Windows for development by following the instructions below.

View the instructions to run it as a development server.