---
title: How to connect to a Redis™ Database Instance
description: Instructions for connecting to your Scaleway Redis™ Database Instance.
tags: postgresql mysql database-instance managed-database database
dates:
  validation: 2025-07-15
  posted: 2023-04-18
---
import Requirements from '@macros/iam/requirements.mdx'


You can connect to your Redis™<sup>*</sup> Database Instance using the [Redis™ CLI](https://redis.io/docs/ui/cli/).

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- A [Redis™ Database Instance](/managed-databases-for-redis/how-to/create-a-database-for-redis/)

<Message type="important">
To connect to a Redis™ Database Instance in a Private Network, you can use Public Gateways in [SSH bastion](/public-gateways/how-to/use-ssh-bastion/) mode and perform port forwarding, as Managed Databases for Redis™ are currently not compatible with the [Static NAT](/public-gateways/concepts/#nat) feature of [Scaleway Public Gateways](/public-gateways/concepts/#public-gateway).
</Message>

1. Click **Redis™** under **Databases** on the side menu. A list of your Redis™ Database Instances displays.
2. Click the Database Instance name or <Icon name="more" /> > **More info** to access the Database Instance information page.
3. Retrieve the Database Instance IP and port from the Database Instance information section.
    <Message type="note">
    Alternatively, you can click the **copy icon** under **Connection** to retrieve the Redis™ CLI connection command. This already includes an IP and port.
    </Message>

    <Message type="important">
    You can use only one of your node IP addresses at a time to connect to your Redis™ Database Instance, as the Redis™ CLI does not support cluster mode.
    </Message>
4. Run the following command to connect to your Redis™ Database Instance.
    <Message type="note">
    In this tutorial we will use 192.0.2.1 and 6379 as the example IP and port, respectively.
    </Message>

    ```
    redis-cli -h 192.0.2.1 -p 6379 --user <redis-user> --askpass --tls --cacert SSL_<redis-cluster-name>.pem
    ```

    <Message type="note">
    The command above uses TLS to add an extra layer of security to your connection. The TLS certificate is generated automatically if you set tls_enabled to true. The certificates take on the following name structure: `SSL_redis-<name-of-your-redis-database-instance>.pem`. When using connectors other than redis-cli, you might need to specify the path to your certificate.
    </Message>

    <Message type="important">
    Scaleway supports TLS1.2 and TLS1.3. If you use older versions of [`libssl`](https://cppget.org/libssl), you might encounter connection issues when using redis-cli. If this is the case, we recommend you check the `libssl` versions installed on your local machine and update if necessary.
    </Message>
5. Enter the password that you defined upon database creation.

You are now connected to your Managed Database for Redis™.

<br/>
<sup>*</sup> <small>Redis is a trademark of Redis Labs Ltd. Any rights therein are reserved to Redis Labs Ltd. Any use by Scaleway is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between Redis and Scaleway. </small>