Can I use SQLite databases?

SQLite is supported, but works a bit differently than other databases

Written by Chris Oliver
Updated over a week ago
SQLite databases are a file on disk instead of a database server like PostgreSQL and MySQL.

⚠️ Since SQLite is a file, it will only work with a single server.

To use SQLite with your Hatchbox applications, you will need to tell your application to store the SQLite database in a shared location.

You can specify this with the DATABASE_URL env var:
DATABASE_URL=sqlite:///home/deploy/myapp/shared/production.sqlite3
Or in your database.yml:
sqlite:///home/deploy/myapp/shared/production.sqlite3
Change "myapp" to the name of your application.

Was this article helpful?