# Deploy an app that uses SQLite

Keep SQLite in production without spending time rewriting a database that already fits your app. Tokay runs the app on a dedicated virtual machine and keeps the database file on persistent storage across deploys and restarts.

## The database file stays with the app

You can deploy the app with its existing SQLite setup instead of replacing the storage layer for the platform. [Push or paste the app](/getting-started), then place the database file on persistent storage.

Use `/tokay/data` and read its path from the `TOKAY_DATA_DIR` environment variable, or keep an existing path such as `./data/app.db` and mark that directory persistent in the Service settings. Tokay detects paths the app writes to and suggests them during setup.

New persistent directories start empty, so choose the directory before the app writes data you care about. Tokay warns you about this during setup.

## Your data is protected beyond one disk

Tokay keeps the app process and SQLite file on the same always on machine while protecting the data beyond that machine. Persistent data is replicated off the virtual machine automatically, with periodic offsite snapshots for recovery.

SQLite gets the single machine runtime it expects, with storage replication and snapshots handled by Tokay instead of a separate Litestream process.

## Your AI agent can keep the app as written

A coding agent like Claude Code or Codex can deploy the SQLite app without spending time rewriting its storage layer for Postgres. Through Tokay's GraphQL API, the agent submits the source, marks the database directory persistent before the first real data is written, deploys the Service, and verifies the running app.

Point your agent to [app.tokay.io/llms.txt](https://app.tokay.io/llms.txt) for the deployment protocol.

## Postgres is available when the app needs it

Moving to Postgres later is an application change rather than a new platform migration. Add the Postgres connection to the code, and Tokay creates the database in the Project on the next deploy.

Tokay has a very generous free tier with no credit card. [Get started](/getting-started).
