Guide: Connecting and Using Couchbase Capella

We love Couchbase Capella, as it provides enterprise-class data infrastructure with incredible speed and performance, and now it is available starting at the free tier!


1.Setting up Couchbase Capella

After you signed up, you'll be asked to create your cluster: go through the process and you'll end up with something like this (with your preferred name of course):

Once you have your cluster, go to Settings > Allowed IP Addresses:

Since Qreli apps can run from wherever they may be embedded, allow access from anywhere.

You should end up with something like this:

Afterwards, it's time to set up the cluster access. Navigate to Settings> Cluster Access inside your cluster:

Add new Cluster Access, and enter your cluster access name and a good password. For the bucket-level access (think database server schemas), select what you wish (OK to start with defaults), and set the access to Read/Write. We suggest creating a qreli bucket to keep all your Qreli stuff in there.

You will end up with something like this, obviously with your choices:

One more step. Couchbase secures the connection with security certificates, so remember this place to get your certificate which we'll use later:


2.Adding Couchbase Capella as a source in Qreli

Great. We are done with the database part. Now, let's create a source inside Qreli.

Go to Sources at the top right, then click on the Library tab. Following that, search for "Couchbase".


Click on the green + button to add this source to your account. Give it a name and handle that you like:

Now, inside your source account (Source > Mine) you should find your resource. Click on it, and you should see something like this:

Great. Now we need to add the custom URL from Couchbase — you'll find it on the Connect tab of your cluster:

Be sure to enter as your Base API url in Qreli:

https://<your-instance>.cloud.couchbase.com:18093

In our example above, that would be https://cb.rnm7s-hzxrxs4llu.cloud.couchbase.com:18093

It is important to enter at the end :18093 as this is the port that Capella responds on.

Sweet. We entered it below:

Now, let's add the user credentials and the certificate. Click on the Auth tab and enter them here. Remember you can copy your CA certificate from your Couchbase cluster Settings > Security Certificate, see above.

Click Update and you should see this. Since you have no apps using this API yet, you can click either button.


3.Using Couchbase Capella in Qreli

Create a simple app in Qreli to test:


Add a variable where we'll insert some data into the database. Enter the name of the variable, select its type as API, and then enter the source handle and method Execute. Then, click on the pecil to the left of the statement to edit it to :

INSERT INTO qreli._default._default (KEY, VALUE) VALUES ("qreli test", {"message": "it's working"})

Note: Always use backticks around bucket/scope/collection names if they could conflict with reserved keywords or have special characters. (e.g. use this symbol: ` )

Then, add a similar variable that will read your data:

Add to your step a text label showing the results of your API call:

${V.read}{results[0]._default.message}

Finally, test it, you should see this.

If you see -1, it means that an error occured. Go to your variable definition and see the source of the problem, then work with Capella's IQ or any AI to fix it:


This is it! Now it's time to build 🚀

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.