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
- Open an app → Databases → Add
- Pick an engine
- Wait for provisioning (~seconds). Status flips from
PROVISIONING→RUNNING
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.1only — 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.