libSQL server (sqld) — a self-hosted server for libSQL, the open-source fork of SQLite by Turso. Get SQLite's simplicity with a network HTTP/gRPC API, so multiple apps and edge clients can share one database. Deployed as a host-networked Nomad service with a persistent data volume.
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 17.2k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "libsql"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The libsql-server (sqld) image. Pin a tag in production.
image = "ghcr.io/tursodatabase/libsql-server:latest"
# Host port for the HTTP API (SQLD_HTTP_LISTEN_ADDR).
port = 8121
# Optional JWT public key (SQLD_AUTH_JWT_KEY) to require authenticated access. Empty = no auth (anyone who can reach the port has full access).
auth_jwt_key = ""
# Named volume for the database files (/var/lib/sqld).
data_volume = "libsql_data"
# Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# Resources for the libsql task.
resources = {
cpu = 500
memory = 256
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "libsql" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "ghcr.io/tursodatabase/libsql-server:latest" | The libsql-server (sqld) image. Pin a tag in production. |
| port | number | 8121 | Host port for the HTTP API (SQLD_HTTP_LISTEN_ADDR). |
| auth_jwt_key key | string | "" | Optional JWT public key (SQLD_AUTH_JWT_KEY) to require authenticated access. Empty = no auth (anyone who can reach the port has full access). |
| data_volume | string | "libsql_data" | Named volume for the database files (/var/lib/sqld). |
| constraints | list | [] | Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 500
memory = 256
} | Resources for the libsql task. |
No variables match.
This pack stores data in one Docker named volume:
libsql_data
restic
# Run on the node hosting this pack. Point restic at your repo first: # export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>" # export RESTIC_PASSWORD="<repo-password>" # export AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<secret> restic backup \ /var/lib/docker/volumes/libsql_data/_data
rclone (sync to S3/R2)
rclone sync /var/lib/docker/volumes/libsql_data/_data backup:<bucket>/libsql_data
Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.
libSQL server (sqld) — a self-hosted server for libSQL, the
open-source fork of SQLite maintained by Turso. You keep SQLite's simplicity and single-file storage but
add a network HTTP/gRPC API, so multiple applications (and edge/embedded replicas) can share one
database.
Single host-networked Nomad service running a primary node, with a persistent data volume.
nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run libsql --registry=nomploy
| Variable | Default | Description |
|---|---|---|
port |
8121 |
HTTP API port (SQLD_HTTP_LISTEN_ADDR). |
auth_jwt_key |
"" |
JWT public key (SQLD_AUTH_JWT_KEY) to require auth. Empty = no auth. |
data_volume |
libsql_data |
/var/lib/sqld — the database files. |
image |
ghcr.io/tursodatabase/libsql-server:latest |
Container image. Pin a tag in production. |
resources |
{ cpu = 500, memory = 256 } |
Task resources. |
Connect with a libSQL/Turso client (http://<node-ip>:8121) or any libSQL driver; health check at
/health. By default there is no authentication — set auth_jwt_key and keep the port on an internal
network. This runs a single primary node; embedded replicas can sync from it. Pin the job to the node
holding the volume with constraints.