Skip to content

How to install a Litebackup server

Litebackup is a self-hosted daemon. Your Litebackup server receives changes from app machines, keeps recent versions on disk, and uploads encrypted backups to your bucket. One server can serve several app machines; your apps keep their local SQLite files and drivers.

Run it on a dedicated Linux VM or host. The installer manages it as a systemd service and supplies its HTTPS address and web console. Start here, then connect your app machines.

VMs and containers

A dedicated VM is the recommended server deployment. Your applications and the Litebackup client can run in Docker or other containers and connect to that server.

The server package runs natively under systemd. To run the server in a container behind your own proxy, with no outbound network, use the container image instead.

Choose a VM

Use a fresh Debian 13 or Ubuntu 26.04 LTS VM with systemd, a public IP, and an SSD. The installer supports Linux amd64 and arm64. For a small deployment, start with 2 vCPUs and 2–4 GB RAM, then adjust for your workload.

Provider VM Networking to configure
AWS EC2, Ubuntu or Debian, persistent EBS SSD Public IP; security group permits TCP 443 and your SSH access
Google Cloud Compute Engine, Ubuntu or Debian, persistent SSD External IP; VPC firewall permits TCP 443 and your SSH access
DigitalOcean Debian or Ubuntu Droplet with SSD storage Public IP; Cloud Firewall permits TCP 443 and your SSH access
Hetzner / Akamai Linode / other VPS Linux VM with systemd and persistent SSD Public IP; provider and host firewalls permit TCP 443

Put the server near your app machines for faster syncs. Check transfer costs if the server and bucket are in different regions or on different providers.

Disk usage depends on database size, write rate, and recent history. Leave room for changes to accumulate during a bucket outage. A 20–40 GB SSD can suit a small trial; monitor free space as you add databases.

Install

SSH into the VM as a user with sudo access:

curl --fail --silent --show-error --location https://litebackup.com/server.sh | bash

The installer verifies the download, installs a system service, and asks for sudo when needed.

Open the printed claim link, sign in, and name the instance. Setup supplies an HTTPS instance address, such as your-instance.litebackup.cloud; a custom domain is not needed for the first install. TCP 443 must reach the advertised public address. If you publish IPv6 as well, check its firewall too.

Finish the setup screens:

  1. Add and test a bucket, then enable it.
  2. Save the recovery kit off this server, or set and safely store a recovery passphrase. Keep the bucket credentials separately too.
  3. Choose how long to keep versions.

Clients wait while setup is incomplete. The install page tracks the current installer flow.

Proxies and port forwarding

The production server serves HTTPS on TCP 443 and manages its own certificate. For a TCP proxy, load balancer, or NAT gateway, forward public TCP 443 to the server's TCP 443 with TLS passthrough: the encrypted connection reaches Litebackup unchanged, and Litebackup terminates TLS.

If that public address differs from the server's outbound IP, supply it when installing on the server. Replace YOUR_PUBLIC_IP with the proxy or gateway's public IP:

curl --fail --silent --show-error --location https://litebackup.com/server.sh \
    | bash -s -- --address YOUR_PUBLIC_IP

Use the instance HTTPS hostname supplied during setup. Preserve TLS SNI, and do not prepend a PROXY protocol header. Forward connections to this instance, not to independent Litebackup servers sharing one hostname.

For example, HAProxy calls this TLS passthrough. The proxy forwards traffic; it does not need the instance's certificate or key.

To end TLS at your own proxy, run the server behind your firewall, where it answers plain HTTP on --listen-address behind it. Never use --development as a production proxy backend.

Add a machine and verify a backup

In the console, open Machines → Add machine and copy the join token. On the machine that holds your SQLite file:

curl --fail --silent --show-error --location https://litebackup.com/cli.sh | bash
export LITEBACKUP_API_KEY='JOIN_TOKEN@your-instance.litebackup.cloud'
litebackup up "${LITEBACKUP_API_KEY}"
litebackup start /var/lib/app/main.sqlite
litebackup status

The token includes both the secret and server address. Keep it out of git and job logs. Each machine needs its own join; SDKs and the CLI share that machine's client session.

Confirm the database appears in the console. Check both the server and cloud versions: registration alone does not mean an upload has completed. Run a restore test into a new file before relying on the backup.

Operate the server

The console shows databases, machine ownership, bucket status, retention, disk, and server settings. Saving server settings restarts the server: it exits with status 75, and its supervisor, the Apps launcher, starts it again. A server run by hand, as with --development, needs a supervisor that restarts it on that status, or it stays stopped. To administer remotely with the CLI:

litebackup admin login
litebackup admin --help

The server exposes local health and metrics on 127.0.0.1:8099, or on the address --health-address (LITEBACKUP_HEALTH_ADDRESS) sets; give each server on one host its own:

# On the server VM:
curl --fail --silent --show-error http://127.0.0.1:8099/health
curl --fail --silent --show-error http://127.0.0.1:8099/metrics

Keep this listener private. Public client traffic uses HTTPS 443. Metrics lists every metric, with a Prometheus scrape job, alert rules, and a Grafana dashboard.

Update the server through its instance controls, then update each installed client with litebackup install cli, run as the user that installed it. Keep npm SDK and binary versions aligned when upgrading an app. See troubleshooting for compatibility errors and restore for recovery after losing the VM.

SDK guides · Source on GitHub