Skip to content

Database

By default, Spacebar will use SQLite. SQLite is nice for testing or development. The SQLite database is stored in the database.db file at the server root by default. You may delete this file to regenerate a new SQLite database on the next server start (or through npm run sync:db).

However, if you plan to run an instance with any sort of demand, you'd best set up a more Properâ„¢ database such as PostgreSQL, which is a popular choice within the community, and recommended by the maintainers.

We won't go into the setup of these servers here, given the scope of our documentation, but to configure Spacebar to use your shiny new database, simply set the DATABASE environment variable to your new database connection string.

Usually, such a string will look something like type://username:password@host-IP:port/databaseName