Self-Hosted LibSQL (sqld): Turso HTTP/Hrana & Embedded Replicas Without Row Fees
SQLiteEdge LibSQL blueprint: running open-source Rust sqld behind serverless edge functions with embedded read replicas and bottomless S3 backups.
- MODELED DESIGN TARGET
- 19,200 TPS
- READ PATH / RPO TARGET
- 0.15 ms (Embedded)
- REFERENCE NVME PROFILE
- $24–$48 HF Primary
LibSQL (`sqld`) extends SQLite with an HTTP/WebSocket Hrana wire protocol, native `F32_BLOB` DiskANN vector indexes, virtual WAL hooks, and local embedded replicas—powering serverless functions that cannot mount a persistent disk. Self-hosting `sqld` on a Vultr High-Frequency NVMe primary gives you the exact `@libsql/client` SDK ergonomics with zero per-billion row-read or per-million row-write overage fees.
In our SQLiteEdge BP-06 reference guide, every configuration rule below follows official SQLite 3.46 documentation and public vendor specifications retrieved 2026-11-12.
SQLiteEdge Architecture Rules for Self-Hosted LibSQL sqld & Embedded Replicas
- Deploy sqld primary on a 3.5GHz+ Vultr High Frequency NVMe node with JWT Ed25519 token auth (`--auth-jwt-key-file`) exposed over TLS/HTTP2.
- Use @libsql/client Embedded Replicas inside regional app servers (`syncUrl` + local file path) for 0.1ms local NVMe reads while routing writes automatically to the primary.
- Store native AI embeddings right inside SQLite using `F32_BLOB(1536)` + `libsql_vector_idx`—eliminating separate $70/mo Pinecone or Qdrant clusters.
- Stream bottomless WAL backups from sqld directly to your $6/mo InterServer S3/MinIO bucket via built-in `--enable-bottomless-replication`.
SQLiteEdge Reference Snippet: Self-Hosted sqld Primary + Bottomless S3 Compose Stack
services:
sqld-primary:
image: ghcr.io/tursodatabase/libsql-server:latest
restart: always
ports:
- "127.0.0.1:8080:8080"
- "127.0.0.1:5001:5001"
environment:
SQLD_NODE: primary
SQLD_HTTP_LISTEN_ADDR: 0.0.0.0:8080
SQLD_GRPC_LISTEN_ADDR: 0.0.0.0:5001
SQLD_AUTH_JWT_KEY_FILE: /etc/sqld/jwt_public.pem
LIBSQL_BOTTOMLESS_ENDPOINT: https://minio-vault.yourdomain.com
LIBSQL_BOTTOMLESS_BUCKET: libsql-bottomless-prod
AWS_ACCESS_KEY_ID: ${S3_ACCESS_KEY}
AWS_SECRET_ACCESS_KEY: ${S3_SECRET_KEY}
volumes:
- /var/lib/sqld-nvme:/var/lib/sqld
SQLiteEdge Modeled Profile & Tariff Table (BP-06)
Public vendor prices retrieved 2026-11-12 (promotional and renewal rates may change at checkout); throughput figures reflect theoretical single-queue sizing models rather than unarchived lab claims.
| Workload Scale | Turso Cloud Managed | Self-Hosted sqld on Vultr HF + S3 |
|---|---|---|
| 5B Row Reads + 15M Writes / 15 GB | $29/mo (Scaler) | $24/mo HF NVMe + $6/mo S3 Vault |
| 40B Row Reads + 80M Writes / 60 GB | $156/mo | $48/mo HF NVMe + $6/mo S3 Vault |
| 200B Row Reads + 350M Writes / 180 GB | $640+/mo | $96/mo HF NVMe + $6/mo S3 Vault |
SQLiteEdge Spec-Matched NVMe & S3 Targets for BP-06
-
Vultr 3.5GHz+ High Frequency Local NVMe ComputeInspect Vultr Specs for BP-06 via SQLiteEdge →
3.7GHz+ Single-Core IPC + Direct PCIe NVMe • ~0.045ms fsync for Peak SQLite Single-Writer TPS (https://www.vultr.com/pricing/) -
InterServer $6 Price-Lock S3 / MinIO Litestream Backup SliceInspect InterServer S3 Slice for BP-06 via SQLiteEdge →
$6/mo Lifetime Price-Lock 1TB Slice • $0 S3 PUT API Fees for 1-Second Litestream WAL Streaming (https://www.interserver.net/vps/)
Open this BP-06 workload preset inside the SQLiteEdge PRAGMA Studio →
SQLiteEdge Engineering FAQ for BP-06
-
Is my existing @libsql/client and Drizzle/Prisma code 100% compatible with self-hosted sqld?
Yes—you literally swap url: "libsql://your-db.turso.io" to "https://db.yourdomain.com" and supply your self-signed Ed25519 JWT authToken. Zero application query changes required.
-
How do sqld read replicas work across Singapore, Frankfurt, and New York?
Secondary sqld nodes connect to the primary over gRPC port 5001 (`SQLD_NODE=replica`), serving local regional reads in <1ms and transparently forwarding write statements back to the primary.