SQLite persistence on Droplet

hi , consider the following situation

1)I configure a droplet with blockstorage attached. 2)I place an sqlite file in the block storage and if read, write the sqlite file from my application(nodejs) in the droplet will the changes be persisted?

3)or Can I keep the file in the droplet itself -no blockstorage attached (since it is cloud will it allow me to read/write)?

which is the best solution?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


Any database software that relies on the disk for storage, or has disk storage as an option, will persist through a restart including SQLite, MySQL/MariaDB/Percona, PostgeSQL, and even NoSQL based DB.

The defaults for most database software is to use disk, so there’s no special setting, you’d simply use the programming language of choice to communicate with the user & database you setup once your chosen software has been installed.

As for block storage, it’s designed to be a flexible storage medium. For instance, you can attach it to one Droplet, detach it and then reattach it to another Droplet without losing data.

You could use it to store backups, logs, or even website data, the skies the limit really. There’s really not a best use case as everyone tends to use it for their own specific needs.


Each Droplet comes with it’s own set amount of storage – you don’t need to add block storage if you don’t actually have a use for it.

You can install and use SQLite on the Droplet itself and read from & write to your databases freely. As for persistence, that all depends on how you setup your SQLite database(s). As long as you choose to setup a file based database, data will persist through a restart, however, if you choose to store your database to RAM (which is an option), then you would need to flush the database to a file if you need for it to persist.