---
title: Setting up Redis
slug: neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis
createdAt: 2026-07-29T18:57:04.792Z
---

You will have to setup Redis if you want to use the Chat service in Neurons for ITSM. All the different setup scenarios are explained below.

:::hint{type="info"}
If you have installed Redis but not using the Chat service, you might consider uninstalling it. To uninstall refer to the section [Uninstall Redis](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#UninstallRedis).
:::

## Different install and uninstall options and scenarios

- Upgrading/Installing Redis for existing/New customer:
  - [Installing Redis in Linux Container on Windows](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#InstallOnWindowsServer)
    - [Installing Linux container on Windows Server with Docker](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#InstallOnWindowsWithDocker)
    - [Installing Redis 6.2.5 in Docker](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#InstallonDocker)
  - [Installing Redis on Linux Machine](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#InstallOnLinux)
    - [Installing Redis on Linux Machine (Ubuntu)](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#InstallOnLinux)
    - [Establish the remote Redis Connection](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#RemoreRedisConnection)
- [Uninstalling Redis from Windows Server (existing customer)](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#UninstallRedisExistingCustomers)
  - [Remote Redis Connection - using redis.bat script](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#UninstallUsingBatScript)
  - [Remote Redis Connection from Windows UI](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#UninstallFromWindowsUI)
  - [Remote Redis Connection using redis-server.exe](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#UninstallUsingServerExe)
- [Uninstalling from Linux Container](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#UninstallFromLinuxContainer)
- [Uninstall from Linux Machine](https://docs.ivanti.com/neurons-for-itsm/on-premises-help/enu/2022/setting-up-redis#UninstallFromLinuxMachine)

## Option 1 - Install Redis in Linux Container on Windows Server

### Prerequisite:

•Windows server - version 2019 or above with Hyper – V enabled.

:::Paragraph{indent="1"}
For more information on Linux Container requirements check out -[https://docs.microsoft.com/enus/virtualization/windowscontainers/deploy-containers/system-requirements](https://docs.microsoft.com/enus/virtualization/windowscontainers/deploy-containers/system-requirements)
:::

[https://docs.microsoft.com/enus/virtualization/windowscontainers/deploy-containers/system-requirements](https://docs.microsoft.com/enus/virtualization/windowscontainers/deploy-containers/system-requirements)

:::Paragraph{indent="1"}
For upgrading your Windows Servers, check out the following links:
:::

:::Paragraph{listStyleType="disc" indent="2"}
Upgrade from Widows Server 2012r2 - [https://docs.microsoft.com/en-us/windows-server/upgrade/upgrade-2012r2-to-2019](https://docs.microsoft.com/en-us/windows-server/upgrade/upgrade-2012r2-to-2019)
:::

:::Paragraph{listStyleType="disc" indent="2"}
Upgrade from Windows Server 2016 - [https://docs.microsoft.com/en-us/windows-server/upgrade/upgrade-2016-to-2019](https://docs.microsoft.com/en-us/windows-server/upgrade/upgrade-2016-to-2019)
:::

### Installation steps:

### Installing Linux container with docker on Windows Server

1. Open PowerShell as Administrator and run the following command:

```bash
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
```

:::Paragraph{indent="1"}
This will install Docker-Microsoft PackageManagement provider.
:::

:::Paragraph{indent="1"}
Sample Output
:::

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/GR0JFOa1E-GooQxaXR1Z0_sample-output.jpg" position="flex-start" size="44" width="436" height="130" initialPath="Redis-Installation/Sample-Output.jpg" githubPath="ISM_Install_and_Deploy_Guide/Content/Install_Deploy_guide/Redis-Installation/Sample-Output.jpg" showCaption="false" indent="1"}

2. Install the preview build of Docker EE using the following commands:

```bash
Install-Module DockerProvider
Install-Package Docker -ProviderName DockerProvider -
RequiredVersion preview
```

3. Agree to installing using “Yes” or “Y’ or “A” to Agree to all.
4. When the installation is complete, reboot the system.
5. Enable LinuxKit system for running Linux containers using the following :

```bash
[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED
", "1", "Machine")
```

6. Restart the system/Docker service after the change using the following command:

```bash
Restart-Service docker
```

:::Paragraph{indent="1"}
Linux Container should now successful run on your Windows Server.
:::

For more information, refer - [How to run Docker Containers on Windows Server 2019](https://computingforgeeks.com/how-to-run-docker-containers-on-windows-server-2019)

### Installing Redis 6.2.5 in Docker

1. Open PowerShell as Administrator and run the following command:

```bash
docker run -d -p 6379:6379 --name redis-con redis:6.2.5
```

2. Check if it has successfully installed by executing the command - `docker ps`

### Best Practices

- Run the command - `docker update --restart always redis-con` to always restart Redis Container whenever the docker/machine is restarted. If this is not enabled you have to enable Redis container manually everytime the docker/machine is restarted.
- Enable Authentication for Redis. Refer, Add Authentication to Redis.

### Setting up Redis Authentication

### Add Auth to Redis server

1. Open Powershell and run the command - `docker exec -it redis-con sh`.

:::Paragraph{indent="1"}
This will give you Redis console.
:::

2. Run **Redis-cli** to set password to Redis server.
3. Run this command to set Redis password - `redis-cli Config Set requirepass <your-password>`.

:::Paragraph{indent="1"}
Your password is successfully set now.
:::

4. To test run the command - `redis-cli Auth <your-password>” it should return “Ok`.

### Set the password through SCW for the application to authenticate through Redis password.

- In step 2 of SCW configuration (Service and Asset Manager settings) in the field **Redis Auth Password**, enter the same password that is set in the **redis-cli**, and save it.

:::hint{type="info"}
Once docker/Redis server/machine is restarted , the auth will be set back to noAuth, sensure to remember and update the password to redis server every time restarted.
:::

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/V8KTwcIVw4FzpI1MBHu1z_scw.jpg" position="flex-start" size="56" width="565" height="385" initialPath="Redis-Installation/SCW.jpg" githubPath="ISM_Install_and_Deploy_Guide/Content/Install_Deploy_guide/Redis-Installation/SCW.jpg" showCaption="false"}

## Option 2 - Install Redis on Linux Machine

### Prerequisite:

- Ubuntu 16.04 or above

### Steps to install:

1. Execute the following commands:

```bash
Sudo apt update
```

```bash
Sudo apt install redis-server
```

2. Check if Redis is set up using the following command:

```bash
sudo systemctl status redis
```

If the result displays as `Active: active (running)` then Redis is successfully setup.

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/NSO9pCFZyuO75Weagc7Da_runningstatus.jpg" position="flex-start" size="46" width="460" height="231" initialPath="Redis-Installation/RunningStatus.jpg" githubPath="ISM_Install_and_Deploy_Guide/Content/Install_Deploy_guide/Redis-Installation/RunningStatus.jpg" showCaption="false"}

3. Edit the **redis.conf** file to make Redis port available to other servers (by default, the Redis port is on :6379) “*sudo gedit /etc/redis/redis.conf*” or “*sudo nano /etc/redis/redis.conf*”
4. Check for the line “**bind 127.0.0.1**” comment this line by prepending ‘**#**’

:::Paragraph{indent="1"}
Since you have removed binding, it is highly recommended to add authentication to Redis Server.
:::

5. Edit **redi.conf “sudo gedit /etc/redis/redis.conf”**
6. Search for requirepass foobared, replace foobared with your\_passowrd.
7. Restart the Redis Server to apply changes.

:::Paragraph{indent="1"}
“sudo systemctl restart redis.service”
:::

8. Then follow “Remote Redis Connection” and “Set password through SCW for the application to authenticate through Redis password”

### Establish the remote Redis Connection

1.Edit the **.env** file in the path “*\<install-Path>\Heat\Appserver\chat\\.env*”

2. Edit the attribut&#x65;**&#x20;REDIS\_HOST=localhost to REDIS\_HOST=\<remote-server-ip>**
3. Save the file.
4. This will install redis successfully.
5. Check if Redis is up by using the command `sudo systemctl status redis” – you should see the active (running status)`

### Uninstall Redis for Windows Server (Existing Customer)

This is a mandatory step for existing customers who have already installed Redis and are upgrading to the new version. Uninstall the obsolete Redis version from your machine by following the below server details and uninstall steps.

### Redis server details:

| Version | 3.0.503                                                                    |
| ------- | -------------------------------------------------------------------------- |
| Path    | \<install\_path>\HEAT\Appserver\AppServer.Main\redis                       |
| Project | https\://github.com/microsoftarchive/redis                                 |
| License | https\://raw\.githubusercontent.com/microsoftarchive/redis/3.0/license.txt |

### Option 1 - Uninstall using redis.bat script

1. Run the following in Powershell with administrator privileges.

cd \<install\_path>\HEAT\Appserver\AppServer.Main\redis; .\redis.bat -p $(pwd) -c stop

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/ZsubFg9bsgNt1B1HaCyMm_windowspowershell.jpg" position="flex-start" size="57" width="570" height="184" initialPath="Redis-Installation/WindowsPowershell.jpg" githubPath="ISM_Install_and_Deploy_Guide/Content/Install_Deploy_guide/Redis-Installation/WindowsPowershell.jpg" showCaption="false" indent="1"}

2. Optional Step: Cleanup Redis installation files by using the below command:

```bash
.\redis.bat -p $(pwd) -c cleanup
```

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/PXil4JBBiqYw5YIVRz4Gp_rediscleanup.jpg" position="flex-start" size="57" width="566" height="131" initialPath="Redis-Installation/RedisCleanup.jpg" githubPath="ISM_Install_and_Deploy_Guide/Content/Install_Deploy_guide/Redis-Installation/RedisCleanup.jpg" showCaption="false" indent="1"}

### Option 2 - Uninstall from Windows UI

1.Run the following in Powershell with administrator privileges:

```bash
Run services.msc
```

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/3YDa2XWpL1eEvQoBmABr__runservices.jpg" position="flex-start" size="43" width="428" height="265" initialPath="Redis-Installation/RunServices.jpg" githubPath="ISM_Install_and_Deploy_Guide/Content/Install_Deploy_guide/Redis-Installation/RunServices.jpg" showCaption="false" indent="1"}

2. Locate Redis in the list and stop the service.

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/SElpW-Hx2YpSbmpoDODkE_stopservices.jpg" position="flex-start" size="56" width="561" height="169" initialPath="Redis-Installation/StopServices.jpg" githubPath="ISM_Install_and_Deploy_Guide/Content/Install_Deploy_guide/Redis-Installation/StopServices.jpg" showCaption="false" indent="1"}

3. Right click > **Properties**, Change **Startup type** to **Disabled**.

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/_UwUVC49n1Lo57k226fuZ_redisproperties.jpg" position="flex-start" size="33" width="331" height="355" initialPath="Redis-Installation/RedisProperties.jpg" githubPath="ISM_Install_and_Deploy_Guide/Content/Install_Deploy_guide/Redis-Installation/RedisProperties.jpg" showCaption="false" indent="1"}

### Option 3 - Uninstall using redis-server.exe

### Stop the service

- Run the following in Powershell with administrator privileges.

```bash
.\redis-server.exe --service-stop

```

### Uninstall service

- Run the following in Powershell with administrator privileges.

```bash
.\redis-server.exe --service-uninstall redis.windows.conf
```

## Uninstall Redis

If you do not want to use the Chat service, you may uninstall Redis by the following the below steps:

### Option 1 - Uninstall Redis in container

- Execute the following command:

```bash
Docker rm /redis-con
```

### Option 2 - Uninstall Redis in Linux Machine

For ubuntu distributions

```bash
# if you use apt-get to install redis then use
sudo apt-get purge --auto-remove redis-server
# if you compiled redis manually then follow the
# steps below to remove it completely from linux/ubuntu
sudo service redis_version stop
# Now delete everything related to Redis server from /usr/local/bin/
sudo rm /usr/local/bin/redis-*
# Now delete Redis Configuration files directory and it’s content.
sudo rm -r /etc/redis/
# Delete existing Redis log files.
sudo rm /var/log/redis_*
# Delete existing Redis data directory and it’s content.
sudo rm -r /var/lib/redis/
# Delete existing Redis server init scripts
sudo rm /etc/init.d/redis_*
# Remove existing Redis PID files (Only if exists)
sudo rm /var/run/redis_*

```

