Sidebar navigationMain contentFooter
Suggest an edit

How to connect to a Redis™ Database Instance

Reviewed on 23 October 2023Published on 18 April 2023

You can connect to your Redis™ Database Instance using the Redis™ CLI.

Security & Identity (IAM)

To perform certain actions described below, you must either be the Owner of the Organization in which the actions will be performed, or an IAM user with the necessary permissions.

Requirements
  • You have an account and are logged into the Scaleway console
  • You have a Redis™ Database Instance
  1. Click Redis™ under Managed Databases on the side menu. A list of your Redis™ Database Instances displays.

  2. Click the Database Instance name or «See more Icon» > More info to access the Database Instance information page.

  3. Retrieve the Database Instance IP and port from the Database Instance information section.

    Note

    Alternatively, you can click the copy icon under Connection to retrieve the Redis™ CLI connection command. This already includes an IP and port.

    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.

  4. Run the following command to connect to your Redis™ Database Instance.

    Note

    In this tutorial we will use 192.0.2.1 and 6379 as the example IP and port, respectively.

    redis-cli -h 192.0.2.1 -p 6379 --user <redis-user> --askpass --tls --cacert SSL_<redis-cluster-name>.pem
    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.

    Important

    Scaleway supports TLS1.2 and TLS1.3. If you use older versions of libssl, you might encounter connexion 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.

  5. Enter the password that you defined upon database creation.

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

See also
How to create a Redis™ Database InstanceHow to manage allowed IPs
Cloud Products & Resources
  • Scaleway Console
  • Compute
  • Storage
  • Network
  • IoT
  • AI
Dedicated Products & Resources
  • Dedibox Console
  • Dedibox Servers
  • Network
  • Web Hosting
Scaleway
  • Scaleway.com
  • Blog
  • Careers
  • Scaleway Learning
Scaleway Docs
Follow us
FacebookTwitterSlackInstagramLinkedin
ContractsLegal NoticePrivacy PolicyCookie PolicyDocumentation license
© 1999-2024 – Scaleway SAS