Skip to content
Hoist

Databases & Redis

Hoist runs PostgreSQL, MySQL and Redis (Valkey, which works with every Redis client).

Where they run

  • Managed: your cloud runs it. On AWS that's RDS or ElastiCache (pay as you go), or a Lightsail database (fixed monthly price, PostgreSQL and MySQL only). On DigitalOcean it's Managed Databases. The cloud handles backups, updates and failures.
  • On a server: a container on one of your servers, with a memory limit. It costs nothing extra and starts in under a minute. Only apps on the same server can reach it.

Managed databases take 5–15 minutes to create, and are part of the Pro and Team plans. On Free, databases run on your servers.

Connecting a project

Under a project's Settings → Databases, attach a database. Hoist sets the variables your framework expects:

  • Laravel gets DB_* and REDIS_*.
  • Every app gets DATABASE_URL and REDIS_URL.

The variables apply from the next deploy. A database can only be attached where the project's server can reach it: in the same cloud account and region, and on the same kind of server (EC2 or Lightsail).

Backups

  • Managed: your cloud backs up daily and keeps 7 days. Restore from the cloud's console.
  • On a server: Hoist dumps PostgreSQL and MySQL every day to a private bucket in your cloud account (S3, a Lightsail bucket or Spaces), and keeps them for 7 days on Pro and 30 days on Team. The Free plan has no backups. Restore any backup from the database's page. Redis keeps its data on the server's disk.

Previews

Pull request previews get their own empty database on the database attached for previews, and it's dropped when the preview is removed. See Preview deploys.