If you’re new to Redis Enterprise Cloud, this quick start helps you get up and running.

You’ll learn how to:

  1. Create a free subscription

  2. Create a database

  3. Connect to your database

If you already have a subscription, see Manage subscriptions and Manage databases.

Create a subscription

To create a new free subscription:

  1. Sign in to the Redis Cloud admin portal. (Create an account if you don’t already have one.)

  2. If this is the first time you’ve signed in, you have no active subscriptions and can select the Add subscription button.

    The Add subscriptions button appears when there are no other subscriptions.

    If you already have a subscription, select the New subscription button in the admin menu.

    The New subscriptions button in the admin console menu.

    (You can only have one free subscription.)

  3. When the New subscription page appears, select Fixed plans and then scroll to the cloud vendor options.

    Available subscription plan options.
  4. Choose a Cloud Provider and a Region.

    (You can ignore the High-Availability options for now; these are available in paid tiers only.)

    Available cloud vendor options.
  5. In the Fixed Size panel, locate the Dataset Size list and then choose 30MB.

    Free plans are a tier of Fixed plans; this provides an easy upgrade path when you need it.

    Create a free subscription.
  6. Enter a descriptive Subscription Name and then select the Create subscription.

    The Create subscription button is located below the subscription options.

Create a database

Now that you have a subscription, you need to create a database.

  1. If you aren’t already at the Subscription details screen, sign into the Redis Cloud admin console and select your subscription from the subscription list.

  2. Select the New Database button.

    Use the New database to create a database.
  3. In the General section, enter a descriptive Database Name.

    • You have 40 characters
    • You can use letters, numbers, or a hyphen
    • The name must start with a letter and end with either a letter or a number
    • Spaces are not allowed
    Create new database.
  4. For this exercise, leave the remaining options at their default values. (To learn about them, see Create a fixed subscription.)

  5. Select the Activate database button near the upper, right corner of the page.

  6. You’re taken to the Configuration tab for your new database.

    Configuration tab showing details of your new database.

    In the upper corner, an icon shows the current status of the database. If the icon shows an orange clock, this means your database is still being created and its status is pending.

    Pending status icon   Active status icon

    Once the database has been created, it becomes active and the status indicator switches to a teal circle containing a checkmark.

Admin console operations are asynchronous; they operate in the background. You can continue to use the admin console for other tasks, but pending resources aren’t available until they’re active.

When your new database becomes active, you’re ready to connect to it.

Connect to a database

At this point, you’re viewing the Configuration details for your new database.

To connect to your database, you need the following info:

  • The hostname for your database
  • The port number
  • The database password

These are displayed in the Configuration tab.

  • In the General section, the Public endpoint setting shows the hostname for your database and the port number.

  • The Security section contains your Default user password. By default, this is masked. Select the eye icon to show or hide the password.

    The Security section of the Configuration tab of the database details page.

Once you have the connection details, you can connect in a variety of ways, including:

  • Using the redis-cli utility

  • Using a connection client for your preferred programming language

Here’s an example of each.

Use redis-cli (via Docker)

The redis-cli utility is installed when you install Redis. It provides a command-line interface that lets you work with your database using core Redis commands.

Docker provides a convenient way to run redis-cli without the full installation experience.

Run the following commands to create a redis Docker container and connect to your database with redis-cli:

  1. Download the redis Docker image:

    $ docker pull redis
  2. Start a container created from the image:

    $ docker run -d --name redis1 redis
  3. Connect to a bash prompt running in the container:

    $ docker exec -it redis1 bash
  4. Connect to your database with redis-cli:

    # redis-cli -h <host> -p <port> -a <password>

    Replace <host>, <port>, and <password> with the details copied earlier from the View Database screen.

  5. After you connect to your database, try these basic Redis commands:

    xxx:yyy> ping
    xxx:yyy> set hello world
    xxx:yyy> get hello

Use code (Python)

Different programming languages use different clients to interact with Redis databases.

Here’s how to connect to your database using the redis-py library for Python.

  1. If you don’t already have the client installed:

    sudo pip install redis
  2. The specific syntax varies according to the client:

    import redis
    r = redis.Redis(host='<endpoint>', port='<port>', 
    r.set('hello', 'world')
  3. Now, run the code:

    $ python example_redis.py

More info