Web Hosting
Connect a database
Create a database and wire it to your site in two clicks. Credentials are injected automatically.
1
Open Databases
In your site dashboard, click Databases & Runtime → Databases.
2
Create a database
Click Create Database, pick an engine, give it a name, and confirm.
Which engine?
- WordPress / Laravel — MySQL only (others are disabled)
- Django / FastAPI / Express / Next.js — PostgreSQL, MongoDB, Redis, or SQLite
- Static / Blank PHP — SQLite or MySQL
3
Click Wire to Site
Next to your new database, click Wire to Site. This writes the connection details into your site's environment and restarts the container.
⏱ This takes up to 60 seconds. Don't close the page.
4
Environment variables appear
Go to Environment Variables. You'll see:
DB_HOST
DB_PORT
DB_NAME
DB_USER
DB_PASSWORD
DATABASE_URL
DB_PORT
DB_NAME
DB_USER
DB_PASSWORD
DATABASE_URL
WordPress sites also get
WORDPRESS_DB_HOST, WORDPRESS_DB_NAME, WORDPRESS_DB_USER, WORDPRESS_DB_PASSWORD.5
Restart your site
Go to Actions → Restart. Your app now connects to the database.
6
View credentials anytime
On the Databases page, click View Credentials on any database to see host, port, name, user, and password. You can copy each field or download a
.env file.Database limits
Your plan includes a fixed number of databases. If you hit the limit, delete an unused database or upgrade your plan.
