How to upload an initial SQLite DB to a volume before deploy


I am currently trying out with a small remix app, which uses a SQLite db.
I might want to look into lite-fs at some point, but for now I am fine with having my app running in a single location, which means I should be a able to use volumes to persist my db.

I have created a new app and a volume for it. But now I can not figure out how to put my existing SQLite db on the volume. Essentially I am looking for a way to upload the database before my first deployment.

I though I could use something like fly ssh sftp for it, but that results in a Error no instances found for <app-name> error. It looks like I need to deploy first before using the command, but that does not make sense, since my app relies on the database being there.

What is the best way to upload the db to a volume before my first app deploy?

Hi Hnnng,

The first thing that comes into mind is to deploy a dumb application based on some Linux Docker image, mount the volume according to docs in fly.toml:


Change the volume data using fly ssh sftp and deploy your applications after that.

1 Like

Thanks! That worked!