Create your first database
Add a database Service inside an Application, deploy it, and know where credentials and connections live.
Written By Zoro
Last updated 28 days ago
In dFlow, a managed database runs as a database Service inside an Application (not as a separate โaddonโ outside the model).
Read Databases overview under Databases in the sidebar and Database services under Services in the sidebar for how this maps to the UI.
Prerequisites
An Application with compute attached so the Environment can schedule the database Service.
You know which engine you need (PostgreSQL, MySQL, MongoDB, Redis, etc.).
Optional: Service settings under Services in the sidebar if you plan to wire connection strings into app Services.
1. Add a database Service
Open your Application and the Environment where the database should run.
Create Service (or Add new on an empty canvas) and choose a database type.
Set name, version (if offered), storage, and credentials as the UI prompts.

2. Deploy
Save the Service configuration.
Click Deploy or Redeploy so the database is provisioned on the Worker Node.
Expected outcome: The database Service shows a successful Deployment and a healthy status in the UI.

3. Get credentials and connect
Open the Service detail page and find connection details or environment variables dFlow generated.
Reference those values from app Services using the patterns in Service settings under Services in the sidebar.
For external tools, see Database credentials and connections under Databases in the sidebar when published.
If something fails
Database troubleshooting under Databases in the sidebar
Deployment issues under Troubleshooting in the sidebar
Getting started issues under Troubleshooting in the sidebar
Go deeper
Create a database service under Databases in the sidebar (full task reference)
Engine pages under Databases (for example PostgreSQL under Databases in the sidebar, MongoDB under Databases in the sidebar)
Create your first database pairs with Deploy your first app for a full stack