:memory: for development and embedded workloads, or a libSQL/Turso URL for production with replication and edge sync. Connection pooling and parameterized query execution work the same as other SQL connectors.
Adapter configuration
Create an adapter file inapp/adapters/:
app/adapters/sqlite-db.terse
- Local
- Remote (libSQL / Turso)
Use
:memory:, file:./path.db, or absolute path for local file-based
database.Connection options
Pass options through theoptions map. Values are appended directly to the connection string query parameters — no key remapping.
Auth token for remote libSQL/Turso. Required for Turso and secured libSQL
instances.
Replication sync interval for libSQL embedded replicas (e.g.
5s).Enable or disable TLS. Use
1 for TLS, 0 to disable (only valid with
explicit port, e.g. local libSQL).Recommended permissions
For local file-backed SQLite, ensure the process has read and write access to the database file and its directory. For remote libSQL/Turso, create a database-specific token with the minimum required permissions in the Turso dashboard or libSQL configuration.Verify the connection
Start the server and confirm the adapter connects:Usage
SQLite tools execute standard SQL through the adapter. Use{{ inputs.field }} placeholders for parameterized values — they are never interpolated as raw SQL.
app/tools/get-user/config.terse
Troubleshooting
Unsupported URL scheme
If startup fails with an unsupported scheme error, ensure your connection string uses one of::memory:,file:./path.db, or absolute path for locallibsql://,https://, orhttp://for remote
ws://, wss://) are not supported.
Remote auth failures
Verify thatauthToken (or auth_token / jwt) is set correctly and resolves from env:
File open failures
For file-backed SQLite, check that the path exists and the process has read and write permissions. Verify the directory exists when usingfile:./relative/path.db.