Redis - Connect Redis to vRack

Connect an OVHcloud managed Redis cluster to vrack

Last updated March 17th, 2022


This page shows you how to create and use a managed Redis cluster with vRack.

We are going to connect a cloud instance, hosted in a datacenter, to a Redis database, hosted in another datacenter, like this:

vrack schema

This will be, from a configuration point of view, the equivalent of this:

vrack schema equivalent


The OVHcloud vRack is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services, such as databases. The vRack also allows you to add Public Cloud instances to your private network to create an infrastructure of physical and virtual resources.

Your vRack must be configured to be accessible from all the services in your Public cloud project.

vrack configured


Creating a virtual network

The first step is to create the virtual network that will be used in your vRack.

To proceed, from the Public cloud tab, click on the Private Network menu, then click on the Add Private Network button.

Add virtual network

You can define yourself a VLAN ID for your virtual network. Value must be between 2 and 4,000.

Define your own range or let dynamic address distribution if you want to use DHCP.

By default, the CIDR address is defined. Different subnets can be added later.

Configure virtual network

Give a name to your virtual network.

Name virtual network

Choose the regions where you want your virtual network to operate.

The subnets addresses are automatically ajusted, depending on the number of regions you choose.

Choose regions

Your vRack is ready!

Creating a Redis database connected to the private network

Create a new Redis database service:

Choose database

Choose the Business solution.

According the Redis capabilities page, the use of private networks with databases is allowed for Business and Enterprise plans.

Choose plan

Choose the region in which you want to create your database.

Choose region

Select the instances model.

Choose model

Give a name to the database.

Select Private from the Network Type list, then select XXXX - my-private-network. The XXX value is the ID of the vRack.

From the Subnetwork list, select the - YYY. The YYY value is the name of the datacenter you chose.

Configure options

The final section will display a summary of your order as well as the API equivalent for creating this database instance with the OVHcloud API.

Resume database creation

Wait a few minutes before the end of the creation of all nodes. When this is done, status changes to ready.

Nodes are ready

Now you can add users and roles to interact with the database.

From the Users tab, click on the + Add user button.

Add users and roles

Name the Redis user and give him some rights.


  • Keys: .
  • Categories: +@all
  • Commands: +ping, +get, +set
  • Channels: *

You can follow the official Redis documentation about users and ACL:

Create user and roles

Once the user is created, the password is displayed in plain text. Save it in a password manager as it won't be displayed again.

Get user password

The last step is to authorize access from your required IPs.

From the Authorised IPs tab, click on the + Add an IP address or IP block (CIDR) button.

Authorize IPs

The simplest way is to authorize the whole private network, as defined on previous steps.

Add virtual network subnet

Check that everything is fine:

  • Status is ready.
  • At least one user is defined.
  • Some IPs added to the white list.

Redis database ready

That's it! Your managed Redis database is ready to be accessed within the vRack virtual network.

Adding another instance to the vRack

The database is now connected to the virtual network, we can use it from any component that is connected to the same vRack.

If you want to test the access from an existing instance, read this tutorial to connect it to the vRack: Configuring vRack for Public Cloud.

For this tutorial, create a new instance by following the next steps.

Start by selecting a model.

Select the model

Choose another region than the database one.

Select a region

Select Debian from the images list.

Select an image

Adjust the number of instances to be created, give a name, then select the desired virtual network XXXX - my-private-network.

Configure the instance

Choose your billing option.

Select the billing period

Wait for the Activated status.

Status activated

Connecting and installing the Redis client

We assume that you have an already set SSH key on your project. For more details, read the Creating and connecting to your first Public Cloud instance page.

Connect to the instance via SSH:

ssh debian@

Now install the Redis client by installing the Redis server package:

sudo apt-get update && sudo apt-get install redis-server -y

Now connect to the Redis database using the URL retrieved from the OVHcloud Control Panel, with a command such as:

redis-cli --tls -u "rediss://"

Authenticate yourself with the AUTH command:

AUTH my-redis-user myRedisUserPassword

Test the overall operation with these sample commands:> ping
PONG> SET mykey.test test
OK> GET mykey.test

We want your feedback!

We would love to help answer questions and appreciate any feedback you may have.

Are you on Discord? Connect to our channel at and interact directly with the team that builds our databases service!

Haben Ihnen die Anleitungen geholfen?

Bevor Sie Ihre Meinung abgeben, nehmen wir gerne Ihre Vorschläge auf, wie wir diese Dokumente verbessern können.

Woran liegt es? An den Bildern, dem Inhalt oder Aufbau der Anleitungen? Schreiben Sie es uns gerne, dann machen wir es zusammen besser.

Ihre Support-Anfragen werden in diesem Formular nicht entgegengenommen. Verwenden Sie hierfür bitte das Formular "Ein Ticket erstellen" .

Vielen Dank. Ihr Feedback wurde gesendet.

Diese Anleitungen könnten Sie auch interessieren...

OVHcloud Community

Besuchen Sie Ihren Community-Bereich und tauschen Sie sich mit anderen Mitgliedern der OVHcloud Community aus. Hier können Sie Fragen stellen, zusätzliche Informationen finden und eigene Inhalte veröffentlichen.

Tauschen Sie sich mit der Community aus

Alle Preise verstehen sich inklusive der gesetzlichen Mehrwertsteuer.

In Übereinstimmung mit der Richtlinie 2006/112/EG in der geänderten Fassung können die Preise ab 01.01.2015 je nach Wohnsitzland des Kunden variieren
(die Preise in den Angeboten verstehen sich inklusive der gesetzlichen Mehrwertsteuer für die Bundesrepublik Deutschland).