External Database Access
Every basefyio project includes a dedicated database that you can access from any standard SQL client. Use pgAdmin, DBeaver, DataGrip, TablePlus, or a plain psql terminal — no vendor lock-in.
Finding Your Connection Details
Open your project in the basefyio dashboard, then go to Connection in the sidebar. You will see:
| Field | Description |
|---|---|
| Host | External database hostname (e.g. db.basefyio.com) |
| Port | Connection pooler port (default 6432) |
| Database | Your project's database name |
| User | Database username for your project |
| Password | Database password (can be reset from the Connection page) |
| Connection URI | Full connection string — copy and paste directly |
pgAdmin
- Open pgAdmin and right-click Servers → Register → Server
- In the General tab, give it a name (e.g. your project name)
- In the Connection tab, fill in:
- Host: your Host from the Connection page
- Port:
6432 - Maintenance database: your Database name
- Username: your User
- Password: your Password (check "Save password")
- Click Save
DBeaver
- Click New Database Connection (or Ctrl+Shift+N)
- Select PostgreSQL and click Next
- Fill in:
- Host: your Host
- Port:
6432 - Database: your Database name
- Username: your User
- Password: your Password
- Click Test Connection to verify, then Finish
DataGrip / TablePlus
Both tools support pasting a full connection URI. Copy the Pooler Connection URI from the Connection page and paste it into the "URL" or "Import from URL" field.
Terminal (psql)
Copy the connection URI from the dashboard and run:
psql "postgresql://USER:PASSWORD@db.basefyio.com:6432/YOUR_DATABASE"Replace the URI with the actual Pooler Connection URI from your Connection page.
Prisma, Drizzle, and ORMs
Use the connection strings from the Raw Editor tab on the Connection page. Two environment variables are provided:
DATABASE_URL— Connection pooler (for queries at runtime)DIRECT_URL— Direct connection (for migrations and schema pushes)
# .env
DATABASE_URL=postgresql://USER:PASSWORD@db.basefyio.com:6432/YOUR_DATABASE
DIRECT_URL=postgresql://USER:PASSWORD@db.basefyio.com:6432/YOUR_DATABASEIn your Prisma schema:
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}Connection Pooling
All external connections go through a connection pooler running in transaction mode. This means:
- Thousands of client connections are multiplexed onto a smaller set of database connections
- Each transaction gets a dedicated database connection for its duration
- Idle connections are returned to the pool automatically
For most use cases (queries, ORMs, GUI tools), the pooler works transparently. If you need session-level features (e.g. SET statements, prepared statements across transactions), use the Direct Connection URI instead.
Password Management
You can reset your database password from the Connection page in the dashboard. Generate a strong password or set your own. After resetting:
- Update the password in your
.envfile and any connected tools - Active connections using the old password will be disconnected
- The new password takes effect immediately
Security
- Never commit database passwords to version control
- Use
.envfiles (added to.gitignore) for local development - Use your hosting platform's secret management for production deployments
- The connection is encrypted in transit via TLS
For REST API access without a database client, see the API Reference. For SDK integration, see the SDK documentation.