Skip to content

Databases

VibeDeploy runs PostgreSQL 16 and Redis 7.2 for you. Each database has its own 2 GB volume and is reachable only by your team’s apps, never from the internet.

  1. Create it.

    Terminal window
    vibe db create shop-db --type postgres # or --type redis

    It takes about a minute to become ready. vibe db list shows the status.

  2. Link it and deploy.

    Terminal window
    vibe deploy --link-db shop-db

    The app gets DATABASE_URL (PostgreSQL) or REDIS_URL (Redis). The link is saved in vibe.json under "databases", so later deploys keep it.

  3. Use it.

    import pg from 'pg';
    const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL });

Agents do the same with create_database and deploy_app with databases: ["shop-db"]. In the dashboard it is the Databases tab.

Terminal window
vibe db list # status, linked apps, masked connection string
vibe db link shop-cache shop # REDIS_URL into an existing app (restarts it)
vibe db link reports-db shop --env REPORTS_URL # a second database of the same type
vibe db unlink shop-cache shop
vibe db url shop-db # the full connection string
vibe db delete shop-cache --yes # deletes all data

vibe db url shows the password, so it is recorded in the audit log.

PostgreSQL Redis
Version 16 7.2
Storage 2 GB volume 2 GB volume, AOF persistence
Memory 256 MiB 96 MB of data (128 MiB limit)
Connections 40
Variable DATABASE_URL REDIS_URL
Login user app, database named after it (dashes become underscores) user default, password required

SSL is off: traffic stays inside the cluster. If your driver insists on SSL, keep the ?sslmode=disable from the URL.

Redis does not evict keys when it is full: writes fail instead (noeviction), so nothing disappears silently. Set expiries on cache keys.

  • Connect with retries. After a deploy or a restart of the database, the first connection can fail for a few seconds. Most pools reconnect by themselves; make sure your app doesn’t exit on the first error.
  • Names are global, like app names. A name someone else uses is taken.
  • App and database must belong to the same team.
  • Deleting an app leaves its databases alone. Deleting a database removes all its data, and linked apps lose the variable.
  • Limit: 2 databases per team.