wtree Cloud

libSQL

Deploy a libSQL (sqld) database with primary and replica nodes, namespaces, external ports and S3 backups.

libSQL is an open-source SQLite fork that runs as a server (sqld), so applications reach it over HTTP instead of opening a file.

Create the database

In a project environment, click New, choose Database and select libSQL. Besides name and description:

FieldWhat it doesDefault
Sqld nodeprimary or replica.primary
Sqld primary URLURL of the primary to replicate from. Required for replicas only.None
Enable namespacesStarts sqld with --enable-namespaces: one server hosts several isolated databases.Off
Database userUser for HTTP basic auth.libsql
Database passwordPassword for HTTP basic auth.Generated
Docker imageImage to run.ghcr.io/tursodatabase/libsql-server:v0.24.32

wtree Cloud creates a named volume <app-name>-data at /var/lib/sqld, so data survives redeploys.

Ports and credentials

PortPurpose
8080HTTP API. Applications connect here.
5001gRPC. Replicas replicate from a primary over it.
5000Admin API.

The Overview tab shows:

  • Internal credentials: user, password, node type, host and the Internal connection URL http://<user>:<password>@<app-name>:8080. Primaries also show an Internal replication connection URL on port 5001.
  • External credentials: set External port (internet) to publish the HTTP API. After saving, you can also publish External admin port (internet) and, on primaries, External GRPC port (internet).

Replicas can't publish an external gRPC port. Only primaries accept replication connections.

Add a replica

On the primary, copy the Internal replication connection URL. If the replica runs on another server, publish External GRPC port (internet) on the primary and use the external gRPC URL.

Create a second libSQL service with Sqld node set to replica and paste the URL into Sqld primary URL.

Backups

libSQL has the same Backups tab as other SQL databases: scheduled S3 backups, retention, manual runs and restore. See Database backups.

Logs, Metrics and Settings work as for every database. See Databases.

Next steps

On this page