What is Resta
Resta is an open-source server you host yourself that runs many small SQL databases side by side. Your backend creates a database per user, tenant, agent or task through an HTTP API, gets a URL and a token for it, and your app queries it with the official Turso client libraries. Resta is MIT-licensed and runs from one Docker Compose file, on any server with Docker or on Coolify.
When to use it
Resta fits when your data splits naturally into many independent pieces:
- A database per customer in a B2B app, so one customer’s data never sits in another’s tables, and you can back up, restore or delete one customer at a time.
- A database per end user for local-first or per-user apps.
- A database per AI agent or task, created when the agent starts and dropped when it is done.
- Throwaway databases for previews, tests or demos.
It is less suited to one large shared database with heavy cross-tenant queries. Use Postgres for that.
How it works
| Piece | What it does |
|---|---|
| API | Creates and deletes databases, issues tokens, manages API keys and backups |
| Node | Stores every database as its own SQLite-format file and answers SQL over HTTP |
| Dashboard | A web UI for the same things, with a SQL console |
| Gateway | Serves all of the above on one domain |
| Postgres | Holds metadata: the account, API keys and the database list |
A database costs a directory on disk until it is first written. It opens on the first query and closes after 5 minutes idle, so a server can hold many more databases than it has memory for.
What it is built on
Resta uses Turso, an SQLite-compatible database engine written in Rust. Databases use the SQLite dialect and file format, and the server speaks Turso’s “SQL over HTTP” protocol. The official @tursodatabase/serverless JavaScript client is tested against it.
What it is not
- Not a hosted service. You run it. There is no Resta cloud.
- Not multi-user. Each server has one account (the super user) plus API keys. There are no roles or teams.
- Not replicated. One node on one machine. Backups protect your data; there is no failover.
Status
Resta is early. The engine is pre-1.0, and the project has not had a public release yet. Install instructions will appear here when it does.
Next: Quickstart.