Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Using a NeonDB database branch from a DevZero workspace.
Basic knowledge of Neon DB and Neon DB branching
Go to Your Project > Project Dashboard.
Click on Branch , create a new branch.
Give it a name and select Current point in time to create the branch off the current state of your main database.
Once the branch is created, please copy the connection string and add it to your user environment secrets. In this guide, it is saved as DATABASE_URL
.
For the purpose of this guide, we will be using a todo app built with nextjs that requires an environment variable called DATABASE_URL
. We will be creating a recipe for this application and we will launch a workspace based on it.
install linux helper packages
clone repo
install nodejs
run npm install
run npm run build
: in this step, we need the database URL to be present so we can run some prisma commands that are required for manipulating the database
npm start
: to start the application
When asked for repository, feel free to use https://github.com/myestery/todo-app or create a fork of it if you want to follow this guide.
We will be implementing the above steps using the recipe file below
The Recipe page has some helper snippet to guide you in generating such files
Now that we have a working recipe, we can create a workspace off it from the recipes page by clicking launch.
Comprehensive guide for connecting to a Supabase Project from your DevBox.
If you're more of a visual learner, check out the video tutorial!
Here, you will connect to a Supabase Project from your DevBox. This would be done by setting up the cluster in your Project dashboard and accessing it through psql
client tool.
Before you begin, you should create your account with Supabase and create a new organisation.
Now we need to install the Postgres psql
client tool.
Follow the below steps to do so:
Use the following command to reload the local package database:
Install the PostgresSQL :
To make the connection, follow the below steps:
Go to Supabase Dashboard.
Open the project which you want to access through the DevBox.
Click on connect and copy the connection string for PSQL
.
Now in your DevBox, simply paste the connection string and enter the password when prompted.
If you need to make a new Supabase database and access it through DevBox, then follow the below steps:
Go to Supabase Dashboard.
Click on New Project and enter the Organisation, Project name and a strong Database Password.
Choose your region and click on Create new project.
Give it a few moments and your project will be ready to use.
Now we need to install the Postgres psql
client tool.
Follow the below steps to do so:
Use the following command to reload the local package database:
Install the PostgresSQL :
To make the connection, follow the below steps:
Go to Supabase Dashboard.
Open the project which you want to access through the DevBox.
Click on connect and copy the connection string for PSQL
.
Now in your DevBox, simply paste the connection string and enter the password when prompted.
Comprehensive guide for connecting to Xata Workspace Database from your DevBox.
If you're more of a visual learner, check out the video tutorial!
Xata is a serverless data platform for PostgreSQL that optimizes reliability, scalability, and developer experience. Xata provides features that make it easier to build modern applications, such as Branching, Zero-downtime schema migrations, File attachments, and more. In this guide, we will walk you through the entire process of connecting your Xata Database to your DevBox step by step.
Before you begin, create your account with Xata and create a new Workspace.
First, you need to get the API access key so that we can connect to the Database:
Go to Xata Account Settings.
In the Personal API keys section, click on Add a key and enter the name of the key.
Note down the secret API key.
You will need to create a Recipe in DevZero equipped with the necessary tools like psql and store your API keys as well:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml
file with the snippet below. Remember to replace the placeholder API key with the key you noted down in the above steps:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
Follow the below steps to connect to the database instance:
Go to Xata Dashboard.
Open the Database that you want to access through DevBox.
Copy the connection string for PostgreSQL endpoint and then use the following command to connect to the Database:
If you need to make a new Xata database and access it through DevBox, then follow the below steps:
Go to Xata Dashboard.
If you haven't created a database, the dashboard will automatically prompt you to create one, but if you have completed the initial setup, you need to click on Add Database.
Enter the database Name, choose the Region and enable the Enable direct access to Postgres option.
Click on Create, and your Database will be created and shown on your dashboard.
First, you need to get the API access key so that we can connect to the Database:
Go to Xata Account Settings.
In the Personal API keys section, click on Add a key and enter the name of the key.
Note down the secret API key.
You will need to create a Recipe in DevZero equipped with the necessary tools like psql
and store your API keys as well:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml
file with the snippet below. Remember to replace the placeholder API key with the Key you noted down in the above steps:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
Follow the below steps to connect to the database instance:
Go to Xata Dashboard.
Open the database which you want to access through the DevBox.
Copy the connection string for PostgreSQL endpoint and then use the following command to connect to the database:
First you need to get the API access key so that we can connect to the database:
Go to Xata Account Settings.
In the Personal API keys section, click on Add a key and enter the name of the key.
Note down the secret API key.
You will need to create a Recipe in DevZero equiped with the neccesary tools like node
, xata
and store your API keys as well:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the name of recipe.
Click on Create a recipe and your recipe will be created.
Replace the recipe yaml
file with the snippet below. Remember to replace the placeholder API key with the Key you noted down in the above steps:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
Follow the below steps to connect to the database instance:
Go to DevBox and use the following command to authenticate your xata account:
Choose the Use an existing API key
option while authenticating, and then hit Enter/Return with the API Key shown when prompted.
Use the following command for access the database through Xata shell:
Select the Workspace, Database and Branch when prompted.
If you need to make a new Xata database and access it through DevBox, then follow the below steps:
Go to Xata Dashboard.
If you haven't created a database, the dashboard will automatically prompt you to create one, but if you have completed the initial setup, you just need to click on Add database.
Enter the database Name, and choose the Region.
Click on Create and your Database will be created and will show up on your dashboard.
First, you need to get the API access key so that we can connect to the database:
Go to Xata Account Settings.
In the Personal API keys section, click on Add a key and enter the name of the key.
Note down the secret API key.
You will need to create a Recipe in DevZero equipped with the necessary tools like node
and xata
and store your API keys as well:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml
file with the snippet below. Remember to replace the placeholder API key with the Key you noted down in the above steps:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
Follow the below steps to connect to the database instance:
Go to DevBox and use the following command to authenticate your Xata account:
Choose the Use an existing API key
option while authenticating and then hit Enter/Return without entering the API Key when prompted.
Use the following command to access Databasebase through the Xata shell:
Select the Workspace, Database and Branch when prompted.
Comprehensive guide for connecting to a MongoDB Cluster from your DevBox.
This would be done by setting up the cluster in your Atlas dashboard through one of 3 available cloud providers (AWS, Azure, or GCP) and accessing it through DevBox.
MongoDB only supports Private Endpoint access for Dedicated or Serverless clusters. Private Endpoint access for the Shared cluster is not yet supported.
To connect to a database cluster, you must create a private endpoint with one of MongoDB's three supported cloud providers (AWS, GCP, Azure).
To check and configure the same, follow the below steps:
Go to Security > Network Access and open the Private Endpoint tab.
Click on Add Private Endpoint and choose your cloud provider. For this tutorial, we will be using Azure.
You must provide the billing information in the Edit Payment Method form if you still need to get the payment method configured for your organization.
Click on Next and choose the Region where you want to deploy your endpoint.
Enter your Resource Group Name, Virtual Network Name, Subnet Name, and the name you want to give to your endpoint.
Copy and run this PrivateLink Endpoint Command where your Azure CLI is configured. Remember that you can only copy the command once Atlas finishes creating VNET resources in the background for internal use.
After creating the private endpoint, copy the Private Endpoint Resource ID and Private Endpoint IP Address and paste them into the MongoDB Private Endpoint Dialog box.
Click on Create, and your private endpoint will be created.
We need to install the mongosh
shell tool to connect with the cluster.
Follow the below steps to do so:
Install gnupg
and curl
if they are not already:
Get the MongoDB public GPG key:
Create a list file for MongoDB:
Install the MongoDB Package:
verify if mongosh
is installed or not:
To connect to the MongoDB cluster, follow the below steps:
Go to Database > Clusters and select the Cluster you want to access.
Click on Connect and choose the private endpoint option.
Then Click on Shell, copy the connection string, and paste it into your DevBox:
Enter the password when prompted, and you will see the MongoDB cluster is connected.
To connect to a database cluster, please make sure it is allowed inbound access from anywhere.
To check and configure the same, follow the below steps:
Go to Security > Network Access and click on Add IP Address.
In the Access List Entry, enter 0.0.0.0/0
to allow inbound access from anywhere.
To connect with the Cluster, we need to install the mongosh
shell tool.
Follow the below steps to do so:
Install gnupg
and curl
if they are not already:
Get the MongoDB public GPG key:
Create a list file for MongoDB:
Install the MongoDB Package:
verify if mongosh
is installed or not:
You can skip this step if you prefer to use password-based authentication. We are using an X.509 certificate authentication to add an extra layer of security because a shared type cluster allows all internet traffic, which also requires code changes.
To add a layer of security, we will authenticate it with an X.509 certificate. You may follow the below steps to do so:
Go to Database Access and click on Add new database user.
Select Certificate and enter the username.
Check the Download certificate when the user is added and then choose the certificate expiration duration.
Click on Add user and save the certificate to your DevBox.
To connect to the MongoDB cluster, follow the below steps:
Go to Database > Clusters and select the cluster you want to connect to.
Click on Connect and then choose the Standard connection and click on Shell.
Choose the Password (SCRAM) option and copy the connection string and paste it into your DevBox CLI:
Choose the X.509 Certificate option and copy the connection string and paste it into your DevBox CLI:
You will see the mongosh shell if the connection is authenticated.
If you need to make a new database cluster and access it through DevBox, then follow the below steps:
Go to Database > Clusters and click on Create.
Choose between Dedicated or Serverless database cluster type.
Enter the Instance name, Provider, and Region.
Click on Create Deployment and give it time to deploy the infrastructure.
Go to Security > Network Access and open the Private Endpoint tab.
Click on Add Private Endpoint and choose your cloud provider. For this tutorial, we will be using Azure.
You must provide the billing information in the Edit Payment Method form if you don't have a payment method already configured for your organization.
Click on Next and choose the Region where you want to deploy your endpoint.
Enter your Resource Group Name, Virtual Network Name, Subnet Name, and the name you want to give to your endpoint.
Copy and run this PrivateLink Endpoint Command where your Azure CLI is configured. Remember that you can only copy the command once Atlas finishes creating VNET resources in the background for internal use.
Copy the Private Endpoint Resource ID and Private Endpoint IP Address and paste them into the MongoDB Private Endpoint Dialog box after creating the private endpoint.
Click on Create, and your private endpoint will be created.
To connect with the cluster, we need to install the mongosh
shell tool.
Follow the below steps to do so:
Install gnupg
and curl
if they are not already:
Get the MongoDB public GPG key:
Create a list file for MongoDB:
Install the MongoDB Package:
verify if mongosh
is installed or not:
To connect to the MongoDB cluster, follow the below steps:
Go to Database > Clusters and select the cluster you want to connect to.
Click on Connect and choose the private endpoint option.
Then Click on Shell, copy the connection string, and paste it into your DevBox CLI:
Enter the password when prompted, and you will see the mongosh shell if the connection is authenticated.
Go to Database > Clusters and click on Create.
Choose Shared database cluster type.
Enter the Instance name, Provider, and Region.
Click on Create Deployment and give it time to deploy the infrastructure.
Go to Security > Network Access and open the IP Access List tab.
In the Access List Entry, enter 0.0.0.0/0
to allow inbound access from anywhere.
To connect with the cluster, we need to install the mongosh
shell tool.
Follow the below steps to do so:
Install gnupg
and curl
if they are not already:
Get the MongoDB public GPG key:
Create a list file for MongoDB:
Install the MongoDB Package:
verify if mongosh
is installed or not:
You can skip this step if you prefer to use password-based authentication. We are using an X.509 certificate authentication to add an extra layer of security because a shared type cluster allows all internet traffic, which also requires code changes.
To add a layer of security, we will authenticate it with an X.509 certificate. You may follow the below steps to do so:
Go to Database Access and click on Add new database user.
Select Certificate and enter the username.
Check the Download certificate when the user is added and then choose the certificate expiration duration.
Click on Add user and save the certificate to your DevBox.
To connect to the MongoDB cluster, follow the below steps:
Go to Database > Clusters and select the cluster you want to connect to.
Click on Connect and then choose the Standard connection and click on Shell.
Choose the Password (SCRAM) option and copy the connection string and paste it into your DevBox CLI:
Choose the X.509 Certificate option and copy the connection string and paste it into your DevBox CLI:
You will see the mongosh shell if the connection is authenticated.
Before you begin, create your account with .
Go to .
Go to .
Go to .
Go to .
Go to .
Go to .
Go to .
Go to .
Comprehensive guide for connecting to a PlanetScale Database from your DevBox.
If you're more of a visual learner, check out the video tutorial!
PlanetScale is a MySQL based database service which is built on Vitess and unlocks performance, scalability, and cost optimization for hyperscale databases through horizontal sharding. In this guide, we will walk you through the entire process of connecting your PlanetScale Database to your DevBox.
Before you begin, create your account with PlanetScale.
Follow the below steps to generate the connection string for database:
Go to PlanetScale Dashboard.
Click on the database you want to access.
Click on Connect and click on Create password.
Note down the Username and Password generated as it would not be displayed again.
In the Select your language or framework choose the language or framework you want to connect your database with. For this guide, we will be going with MySQL CLI.
Note down the connection string.
You will need to create a Recipe in DevZero equipped with the necessary tools like mysql
:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml file with the snippet below. Remember to replace the placeholder username and password with the value you noted down in the above steps:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
Now, with everything set, you just need to use the connection string to access the database:
Go to DevBox.
Use the following command to connect to the database:
If you need to make a new PlanetScale database and access it through DevBox, then follow the below steps:
Go to PlanetScale Dashboard.
Click on Create a new database and enter the Name and Region of your database instance.
Then choose the Cluster size and Autoscaling storage and click on Create database.
Enter the Password name when prompted.
A Username and Password would be generated for you. Note down the password as it would not be displayed again.
In the Select your language or framework choose the language or framework you want to connect your database with. For this guide, we will be going with MySQL CLI.
Note down the connection string.
You will need to create a Recipe in DevZero equipped with the necessary tools like mysql
:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml file with the snippet below. Remember to replace the placeholder username and password with the value you noted down in the above steps:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
Now, with everything set, you just need to use the connection string to access the database:
Go to DevBox.
Use the following command to connect to the database:
Comprehensive guide for connecting to a Timescale Database from your DevBox.
Timescale is an open-source time-series SQL database optimized for fast ingest and complex queries. In this guide, we will walk you through the entire process of connecting your Timescale Database to your DevBox step by step.
Before you begin, create your account with Timescale and create a new organization.
Follow the Connecting to AWS guide to set up the advertise routes for DevBox to access AWS Services. This is necessary since we will use a VPC peering with a timescale database service for a secure connection.
You will need to create a Recipe in DevZero equipped with the necessary tools like psql
:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml file with the snippet below:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
To make your connection secure, we need to create a VPC within the Timescale Infrastructure and then peer it to the AWS VPC:
Go to Timescale Dashboard > VPC.
Click on New VPC and enter the Region, Name and IP Range of the VPC.
Click on Create and after creation, click on Add under VPC Peering column.
Enter your AWS VPC details and click on Add connection.
Follow the below steps to connect to the database instance:
Click on the Service you want to access.
Click the Triple dot dialog menu in the top right corner.
Choose the Change service environment option and go to the VPC tab.
Select the VPC and click on Attach VPC.
Now, with everything set, you just need to use the connection string to access the database:
Click on the Service you want to access.
Scroll down and copy the connection string you see.
Go to DevBox, paste the connection string, and enter the password when prompted:
If you need to make a new Timescale database and access it through DevBox, then follow the below steps:
To make your connection secure, we need to create a VPC within the Timescale Infrastructure and then peer it to the AWS VPC:
Go to Timescale Dashboard > VPC.
Click on New VPC and enter the Region, Name and IP Range of the VPC.
Click on Create, and after creation, click on Add under the VPC Peering column.
Enter your AWS VPC details and click on Add connection.
Click on New Service and pick your service type between Time Series and Analytics and Dynamic PostgreSQL.
Choose the Region, Compute configuration, and Environment type.
In the VPC section choose the vpc you justv created.
Click on Create Service and your database service will be created.
You will need to create a Recipe in DevZero equipped with the necessary tools like psql
:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml file with the snippet below:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch, and your workspace will be created.
Now, with everything set, you just need to use the connection string to access the database:
Click on the Service you want to access.
Scroll down and copy the connection string you see.
Go to DevBox, paste the connection string, and enter the password when prompted.