Self-host libSQL Server with Levelrail
Server for libSQL, the open contribution fork of SQLite, speaking the Hrana protocol over HTTP. Runs as a single primary node with data on a volume.
- Authortursodatabase
- LicenceMIT
- Memory128 MiB
- Services1
How to self-host libSQL Server
-
Pull the images
One image is pulled on your server.
Show images
ghcr.io/tursodatabase/libsql-server:v0.24.32
-
Create the app
One service starts in a single Compose app, with 1 named volume mount for your data, on port 8080.
-
Fill in the secrets
2 settings are preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Connect a libSQL client to this address. The server has no login, so keep it private or put an auth layer in front.
libSQL Server requirements
- Memory
- About 128 MiB
- Architectures
- amd64 unknown, arm64 unknown
- Ports
- 8080
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- MIT, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then libSQL Server. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the libSQL Server docs page.
Deploy libSQL Server your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy libSQL Server from the CLI
levelrail-cli templates deploy libsql --name my-libsql Deploy libSQL Server with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/libsql/deploy libSQL Server configuration
libSQL Server services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| libsql | ghcr.io/tursodatabase/libsql-server:v0.24.32 | 8080 | data -> /var/lib/sqld |
libSQL Server environment variables
| Variable | Service | Value |
|---|---|---|
| SQLD_HTTP_LISTEN_ADDR | libsql | Preset by the template |
| SQLD_NODE | libsql | Preset by the template |
Ports and volumes
- Ports
- 8080
- Volumes
- 1 named mount: data -> /var/lib/sqld
libSQL Server FAQ
How much memory does libSQL Server need?
The catalog lists about 128 MiB of memory for libSQL Server.
Does libSQL Server run on arm64?
For libSQL Server, arm64 support is not confirmed; amd64 is unknown.
What licence is libSQL Server under?
libSQL Server is licensed under MIT, which is permissive, with few conditions on reuse.
Does libSQL Server need configuration before it starts?
No. The template fills in its own defaults.
Which ports does libSQL Server use?
libSQL Server listens on port 8080 inside the stack.
Where does libSQL Server keep its data?
In a named volume: data mounted at /var/lib/sqld.
Can I deploy libSQL Server on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for libSQL Server, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image ghcr.io/tursodatabase/libsql-server:v0.24.32 is what you deploy there.