# SQLite setup and configuration

<PageBadges />

Install and configure the connector through the interactive CLI:

```text
form0> connector install form0-connector-sqlite
form0> connector configure form0-connector-sqlite
form0> connector test form0-connector-sqlite
```

For direct use, install it with `npm install form0-connector-sqlite`.

| Environment variable                      | Purpose                            | Default                      |
| ----------------------------------------- | ---------------------------------- | ---------------------------- |
| `FORM0_CONNECTOR_SQLITE_PATH`             | Relative or absolute database path | `./form0.db`                 |
| `FORM0_CONNECTOR_SQLITE_TABLE_NAME`       | Main table                         | `form0_submissions`          |
| `FORM0_CONNECTOR_SQLITE_CHILD_TABLE_NAME` | Nested-record table                | `form0_submissions_children` |
| `FORM0_CONNECTOR_SQLITE_DEBUG`            | Verbose connector logging          | `false`                      |

Relative database paths are resolved from the process working directory. The connector creates
the parent directory and database file when necessary, so the process needs suitable write access.

The package requires Node.js 22 or newer and a platform supported by its `better-sqlite3` native
dependency. It is not intended for React Native or Expo; use platform-native mobile storage such
as `expo-sqlite` there.

Do not place a submission database inside a public web directory or commit it to source control.
