Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 4.76 KB

database-storage-guides.html.md

File metadata and controls

66 lines (42 loc) · 4.76 KB
title layout toc nav
Databases & Storage
docs
true
firecracker

Choosing an approach to storage

Often the solution to persistent data storage is to connect your Fly App to a separate database or object store.

Fly.io offers a deploy-it-yourself Postgres app with some tools to make it easier to manage yourself.

If you need hardware-local disk storage on your Machines—for example, if your Fly App is a database (or if you want to use LiteFS)—then you'll want to use Fly Volumes.

Explore these, and further options, for data storage in the following sections.

Fly Volumes - Disk storage

Anything an App VM writes to its root disk is ephemeral: when the VM is redeployed, the root file system is rebuilt using its Docker image, deleting any data written to it since it was started up. This is fine for /tmp files, but most apps need to keep state in a database or another form of persistent storage.

  • Fly Volumes - Persistent storage on Fly.io is provided by Fly Volumes. You can use volumes on an app directly, or run a separate database app with volume storage and connect an app to that. A Fly Volume is a slice of NVMe disk storage attached to the server that hosts your Machine. Volumes have pros and cons, and you should read the Fly volumes overview before deciding whether they're the best solution for your use case.

Fly.io database projects

These are projects that we develop and support. They're not managed services; you can deploy them yourself as Fly Apps.

  • Fly Postgres - PostgreSQL is a popular relational database. When you deploy an App on Fly.io, we give you the option to launch a Fly Postgres App and attach it to your App. We provide tools for deployment and management; you manage the cluster once it's deployed.
  • LiteFS for SQLite - SQLite is a very lightweight file-based database. LiteFS is a distributed file system that transparently replicates SQLite databases. You deploy it and you manage it.

Partner integrations running on Fly.io

Other storage apps

If your application calls for a different solution, you can deploy it yourself as an App on Fly.io. These examples can help you get started with other popular storage options.

Recommended external providers

If you want a different fully-managed database or storage solution for your Fly Apps, there are many great options, including:

Other places

You can connect your Fly Apps to the usual suspects, too: