fargone / docs / databases

Attach a database

Attach managed databases to an app, Railway-style. Each resource runs as its own container with a persisted volume, and a connection string is injected into your app's environment automatically.

Supported engines

Engine Default version Env var injected
PostgreSQL 16 DATABASE_URL
Redis 7 REDIS_URL
MariaDB 11 MARIADB_URL
MongoDB 7 MONGODB_URL

Add one

  1. Open an app → DatabasesAdd
  2. Pick an engine
  3. Wait for provisioning (~seconds). Status flips from PROVISIONINGRUNNING

From your code

The connection string is injected into the app container env automatically. Databases are reachable by container name on the platform network:

postgres://fargone:<password>@fargone-res-<id>:5432/fargone
redis://fargone-res-<id>:6379
mongodb://fargone:<password>@fargone-res-<id>:27017/fargone

In a Next.js app that means process.env.DATABASE_URL just works.

Env changes

Environment variable changes (including new databases) take effect on the next deploy — redeploy the app to pick them up.

Deleting

Deleting a database removes its container. Its named volume is preserved so data isn't instantly destroyed, but the resource entry is removed.

Security notes

  • Database containers are bound to 127.0.0.1 only — not publicly exposed.
  • Credentials are stored in the Fargone database (plaintext for now).
  • Backups are on the roadmap; treat these as dev/demo databases today.