Skip to main content
If your site needs to store data — users, posts, orders, form submissions — you’ll want a database. Hiveku gives you three options.

No Database

Best for static sites

Hiveku Database

PostgreSQL, managed for you

Bring Your Own

Use Supabase, Neon, etc.

Option 1: No Database

If your site is marketing pages, a blog, or portfolio — you probably don’t need a database. Pick this during project creation and skip the rest. You can always add one later from Settings > Database.

Option 2: Hiveku Database (Managed PostgreSQL)

We provision and manage a PostgreSQL instance for your project.
1

Enable during project creation

When creating a new project, pick Hiveku Database in the database step.Already have a project? Go to Settings > Database and click Provision Database.
2

Wait for provisioning

Takes about 30-60 seconds. You’ll see status updates in the UI.
3

Confirm DATABASE_URL is set

Hiveku auto-injects a DATABASE_URL environment variable into your container. You don’t need to copy or paste anything — just use process.env.DATABASE_URL in your code.

Option 3: Bring Your Own Database (BYOD)

If you already use Supabase, Neon, PlanetScale, Railway, or any PostgreSQL-compatible provider, paste the connection string.
1

Copy your connection string

From your existing provider, grab the connection string. It looks like:
postgresql://user:password@host:5432/dbname
2

Paste into Hiveku

Go to Settings > Database and select Bring Your Own. Paste the connection string and save.
3

Test the connection

Click Test Connection. Hiveku verifies the credentials and sets DATABASE_URL in your environment.
BYOD means you manage your own backups, scaling, and billing on the provider side. Hiveku just connects.

Using the Database in Code

Once a database is connected, DATABASE_URL is available as an env var.
import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();
// Reads process.env.DATABASE_URL automatically

The SQL Editor

Run queries directly from the browser.
1

Open the Database tab

In your project, click Database in the sidebar.
2

Pick SQL Editor

The editor is a full-featured Postgres console — autocomplete, history, and query saving.
3

Run a test query

Try:
SELECT 1;
You should see 1 in the result panel.

Let the AI Create Tables

The fastest way to set up schema is to ask.
Create a users table with email, name, and created_at
Add a posts table with title, slug, content, author_id, and published_at
The AI writes the migration, runs it, and shows you the schema.

Backups

Hiveku Database takes daily automatic backups with a rolling retention window. View and restore from Settings > Database > Backups.

Connection Pooling

For serverless deploys, always use a pooler to avoid exhausting connection limits. Add pooling params to your connection string:
postgresql://user:password@host:5432/dbname?connection_limit=15&pool_timeout=30
  • connection_limit=15 — max concurrent connections per instance
  • pool_timeout=30 — seconds to wait for a connection before erroring
Hiveku Database’s default connection string already includes reasonable pool settings. BYOD users should check their provider’s recommended params.

Verifying Setup

Run SELECT 1; in the SQL Editor. If you get 1 back, the database is connected and your app can reach it. Then in your app, add a simple query (SELECT NOW()) behind a route like /api/db-test and visit it in the browser.

Troubleshooting

Check that DATABASE_URL exists in Settings > Environment. For BYOD, confirm the string you pasted matches your provider’s dashboard exactly — copy-paste errors are the most common cause.
Your app is opening more connections than the pool allows. Raise connection_limit in the connection string, or use a connection pooler like PgBouncer (Supabase and Neon both offer pooler URLs — use those instead of the direct URL).
Each serverless invocation opens a new connection by default. Switch to a pooler connection string, or make sure you’re reusing a single Pool instance across requests rather than creating a new one each time.
Some providers have IP allowlists. Check your provider’s networking settings and ensure outbound connections from Hiveku are allowed, or use “allow from anywhere” if your provider supports it.
Restore from the most recent backup or checkpoint in Settings > Database > Backups. This is exactly what backups are for.

What’s Next?

Environment Variables

Manage secrets and config

Build with AI

Let the AI design your schema