DeployGroveDocumentationOpen dashboard

Persistent SQLite

Keep a SQLite database across app deploys and plan safe backups and restore on DeployGrove.

Enable persistent SQLite

PHP, Node.js, Python, and Bun include SQLite support. In New project or Edit, check Persistent SQLite, configure your app to read SQLITE_DATABASE_PATH, and deploy. Saving the setting alone does not change a running app. Once enabled, the setting cannot be turned off through project settings.

SQLITE_DATABASE_PATH=/var/lib/nexus/sqlite/app.sqlite

The directory lives on a project-owned volume. Keep journals and WAL files there too. Existing databases are not moved for you. Static sites and one-click apps use their own storage rules.

Read the path in your app

Node.js

import { DatabaseSync } from 'node:sqlite';
const db = new DatabaseSync(process.env.SQLITE_DATABASE_PATH);

PHP

<?php
$db = new PDO('sqlite:' . getenv('SQLITE_DATABASE_PATH'));

Python

import os, sqlite3
db = sqlite3.connect(os.environ['SQLITE_DATABASE_PATH'])

Bun

import { Database } from 'bun:sqlite';
const db = new Database(process.env.SQLITE_DATABASE_PATH, { create: true });

For Laravel, use the SQLite connection and make its database path read SQLITE_DATABASE_PATH. For Django, set the SQLite database NAME from that variable. Setting the variable does not migrate an existing database.

Deploys, backups, and restore

SQLite apps run one container at a time. Each release builds first, then stops the old app and starts the new one with the same volume. Expect a short outage. A code rollback keeps the current data; check schema compatibility first. PHP rollback is disabled.

Stop the app before a project volume backup, wait for the backup to finish, then start it. Scheduled backups do not stop apps and fail while the app is running. Pending or running backups block starts and deploys. Back up the whole directory, not only a live database file.

Project volume restore is manual: download the archive and contact DeployGrove support. Keep the app stopped during restore and verify the database before use. Project deletion preserves named volumes; deleting a volume is a separate privileged action. See backups and monitoring.

Ready to release? Follow the deploy steps and account setup.