Best way to host pocketbase?

Hello,

I am trying to host a pocketbase session (https://pocketbase.io/) on fly.io. I was able to do it pretty easily following a guide provided by the pocketbase team (https://github.com/pocketbase/pocketbase/discussions/537), but I noticed an message about requiring two volumes per app. I noticed this in the docs as well:

Always run at least two volumes per app. We usually recommend running at least two Machines per app to increase availability, and if you're using volumes, then each machine should have an attached volume. If you only have one Machine and volume, you'll have downtime if there's a host or network failure, and whenever you deploy your app.

Does anyone have experience with the best way to host pocketbase here?

1 Like

One option is you can decide that having occasional downtime during host or network failure or whenever you deploy your app is okay. In that case, just one machine and volume is fine. As long as you backup your database off of that volume (for example, onto an S3 account) periodically in case there’s an unrecoverable hardware failure with the disk drive that the volume is on. See Basics - Going to production - Docs - PocketBase and VACUUM for more info about backups.

If occasional downtime is not okay, then yes you’ll want at least two machines and volumes. In that case, you can use LiteFS - Distributed SQLite · Fly Docs to keep the copies of the database synchronized.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.