Render
PerSQL gives a Render service its own SQLite database on the edge. You provision a database, set three environment variables, and query with the PerSQL SDK. Every Render preview environment can get its own isolated branch database.
Connect
Section titled “Connect”-
Go to render.persql.com/connect, sign in, and provision a database. You get three values:
Variable Example Secret PERSQL_API_URLhttps://api.persql.comno PERSQL_DATABASE<namespace>/<db-slug>no PERSQL_TOKENpsql_live_…yes The token is admin-scoped to that one database (so your app can run its own migrations) and nothing else.
-
Set them on your service under Environment, or share them across services with an Environment Group.
-
Query:
import { PerSQL } from "@persql/sdk";const db = new PerSQL({token: process.env.PERSQL_TOKEN,baseURL: process.env.PERSQL_API_URL,}).database(process.env.PERSQL_DATABASE);const { data } = await db.query("SELECT 1 AS ok");
Deploy a starter
Section titled “Deploy a starter”The render-starter repo is a minimal
web service backed by PerSQL, with a render.yaml Blueprint that declares the
three variables as prompted (sync: false) values:
Click it, then paste the values from the connect page when Render prompts.
A database per preview environment
Section titled “A database per preview environment”Point a coding agent at the Render MCP for the per-PR recipe:
https://render.persql.com/mcpAuthenticate with a PerSQL bearer token. preview_recipe returns the CI
snippet that spawns a preview-pr-<n> branch when a preview environment opens
and deletes it on close; preview_list shows the active previews.