--- id: redis title: Redis --- ToolJet enables you to execute Redis commands on your Redis instances.
To connect ToolJet with Redis, you need to provide the following connection details:
- **Host**: The address or hostname of the Redis server.
- **Port**: The port number used by the Redis server (default is 6379).
- **Database**: The Redis database index to connect (0, 1 or 2).
- **Username**: The username used for authentication.
- **Password**: The password used for authentication.
- **TLS**: Toggle to enable/disable TLS connection.
- **TLS Certificate**: Choose the type of TLS certificate (None, CA certificate, or Client certificate).
Depending on the TLS certificate option selected, you may need to provide additional information:
- For **CA certificate**:
- **CA Cert**: The CA certificate for TLS connection.
- For **Client certificate**:
- **CA Cert**: The CA certificate for TLS connection.
- **Client Key**: The client key for TLS connection.
- **Client Cert**: The client certificate for TLS connection.
### SET Command
The `SET` command is used in Redis to assign a value to a specific key.
```shell
SET key value
```
#### Example
When the input value contains spaces, you should encode the value before providing it as an input:
```shell
SET products {{encodeURI('John Doe')}}
```
### GET Command
The `GET` command is used in Redis to retrieve the value associated with a specific key.
```shell
GET key
```
#### Example
To retrieve a value that was previously encoded while setting, you can use transformations.
1. Enter the GET command in the editor:
```shell
GET products
```
2. Enable Transformations (JS) and use `decodeURI`:
```js
return JSON.parse(decodeURI(data));
```