Skip to main content

SQLite Installation

SQLite is the default (Quick Start) and recommended database to quickly create an app locally.

Install SQLite during app creation

Use one of the following commands:

yarn create strapi-app my-project --quickstart

This will create a new project and launch it in the browser.

tip

The Quick Start Guide is a complete step-by-step tutorial.

Install SQLite manually

In a terminal, run the following command:

yarn add better-sqlite3

Add the following code to your ./config/database.js or ./config/database.ts file:

./config/database.js
module.exports = ({ env }) => ({
connection: {
client: 'sqlite',
connection: {
filename: path.join(__dirname, '..', env('DATABASE_FILENAME', '.tmp/data.db')),
},
useNullAsDefault: true,
},
});