Overview
Hostwares provides managed database instances powered by Supabase/PostgreSQL. Each database runs in its own isolated container with dedicated resources.
- PostgreSQL 15+ with full SQL support
- Isolated containers per database
- Automatic daily backups
- Connection pooling included
- $3/month per database
Creating a Database
From the Dashboard
- Go to Dashboard → New Project → Database
- Enter a name for your database
- Select the database type (PostgreSQL)
- Click Create
- Wait for provisioning (usually under 60 seconds)
Via AI Assistant
"Create a new PostgreSQL database called my-db"
"Create a database for my production app"
"Set up a new Supabase instance"Via API
POST /api/databases
{
"name": "my-production-db",
"type": "postgresql"
}Connection String
After creation, your connection string is available in the database detail page:
postgresql://user:password@host:5432/dbnameUsing with your site
- Copy the connection string from Dashboard → Databases → [DB] → Connection
- Add it as
DATABASE_URLin your site's environment variables - Redeploy your site
Connection pooling
For applications with many concurrent connections, use the pooled connection URL:
# Direct connection (for migrations)
DATABASE_URL=postgresql://user:pass@host:5432/db
# Pooled connection (for your application)
DATABASE_URL=postgresql://user:pass@host:6543/db?pgbouncer=trueFramework examples
# Prisma (schema.prisma)
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
# Drizzle
import { drizzle } from 'drizzle-orm/node-postgres';
const db = drizzle(process.env.DATABASE_URL!);
# Django (settings.py)
DATABASES = {
'default': dj_database_url.config(default=os.environ['DATABASE_URL'])
}Management
Control your database containers from the dashboard or via AI:
| Action | Description | Data Impact |
|---|---|---|
| Start | Start a stopped database | No data loss |
| Stop | Gracefully stop the container | No data loss |
| Restart | Stop and start again | No data loss |
| Delete | Permanently remove | ALL DATA DELETED |
Warning: Deleting a database is irreversible. All data, including backups, will be permanently removed after 7 days.
Backups
Automatic daily backups are included with every database:
- Frequency: Daily at 3:00 AM UTC
- Retention: Last 7 daily backups kept
- Type: Full
pg_dumpsnapshot - Restore: Contact support for point-in-time recovery
Manual backup
Create a manual backup anytime from the dashboard:
- Go to Databases → [DB] → Backups
- Click Create Backup
- Download or restore from the backup list
Performance Tips
- Use connection pooling — Prevents "too many connections" errors
- Add indexes — Index frequently queried columns
- Use
EXPLAIN ANALYZE— Identify slow queries - Limit result sets — Always use pagination for large tables
- Close connections — Ensure your ORM releases connections properly
- Monitor size — Keep an eye on database size vs plan limits
Security
- Encrypted at rest — Database files are encrypted on disk
- Encrypted in transit — Connections use TLS by default
- Isolated network — Each database has its own network namespace
- Strong passwords — Auto-generated 32-character credentials
- No public access — Databases are only accessible from your Hostwares containers
Running Migrations
Run database migrations during deployment by adding them to your build or start process:
Prisma
// package.json
"scripts": {
"build": "prisma generate && prisma migrate deploy && next build",
"start": "next start"
}Drizzle
// package.json
"scripts": {
"build": "drizzle-kit push && next build"
}Django
# Use as start command
python manage.py migrate && gunicorn myapp.wsgiEnsure your DATABASE_URL is set in environment variables before running migrations.