Nomploy Nomad Packs

← All packs

libsql v0.1.0

Databases

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.

nomad-pack run libsql --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- libsql

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 8121 1 volume image ghcr.io/tursodatabase/libsql-server:latest tracks :latest image bumped today
Variables 9
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run libsql -f values.hcl --registry nomploy
# 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
  }
NameTypeDefaultDescription
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.
Back up this pack

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.

Readme

libsql

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.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run libsql --registry=nomploy

Configure

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.