Skip to content

Run Litebackup on AWS

Back up SQLite continuously with your own EC2 instance and encrypted backups in your bucket.

Litebackup backs up SQLite databases from your app machines to your own EC2 instance and encrypted object storage. Your app machines can run anywhere.

Create the server

Launch an EC2 instance near your app machines. We recommend an official Debian 13 AMI published by Debian or an Ubuntu 26.04 LTS AMI published by Canonical; Amazon Linux 2023, RHEL, Fedora, Rocky Linux, and AlmaLinux AMIs from their publishers also work. Then select an instance type and your SSH key pair. Debian lists its official images and publishers, including their AWS Marketplace entries.

Use a regular On-Demand instance for an always-on backup server. Install Litebackup with the command below.

Choose a VM size

Load Example workload VM starting point Disk starting point
Low A few machines and dozens of lightly written databases m7i.large, 2 vCPUs / 8 GiB 80 GiB gp3 EBS
Medium Several machines and hundreds of tenant or agent databases m7i.xlarge, 4 vCPUs / 16 GiB 160 GiB gp3 EBS
High Dozens of machines, thousands of databases, or frequent concurrent syncs m7i.2xlarge, 8 vCPUs / 32 GiB 320 GiB gp3 EBS

These are starting recommendations, not database or machine limits: size for your active data, concurrent writes, recent history, and room for restores or bucket downtime. Watch CPU, memory, disk, and sync progress after launch, and choose a Litebackup plan covering your databases and machines.

Use gp3 EBS storage for the server files. Review Delete on termination if you want the volume retained when the instance is deleted. Amazon S3 in the same region is a natural bucket choice; other supported providers work too. EBS, public IPv4, object storage, and transfer charges are separate from the instance.

Configure networking

Place the instance in a public subnet with an internet-gateway route and a public IPv4 address. An Elastic IP keeps the address stable across stop/start cycles. Add the inbound rules below to its security group, and allow outbound traffic. Check subnet network ACLs if you have customized them.

Direction Port Purpose
Inbound TCP 443 Litebackup clients and the HTTPS console
Inbound TCP 22 SSH, restricted to your administration address
Outbound HTTPS, DNS, time synchronization Downloads, registration, bucket access, and a correct clock

TCP 443 must reach the VM directly. If you enable IPv6, allow the matching traffic there too.

Install Litebackup

SSH into the VM as root or a user with sudo access, then run:

curl -fsSL https://litebackup.com/server.sh | bash

The installer asks for sudo when needed and prints a setup link. The Litebackup service starts once you finish browser setup.

Claim the server and connect a bucket

Open the setup link within 24 hours, sign in, and name your server. Connect a bucket you own, save your recovery kit separately, and choose your retention period. Setup supplies your HTTPS address; no custom domain is needed.

Back up your first SQLite database

On the machine that holds your database, open Machines → Add machine in the Litebackup console and follow its install and join commands. Run them as the user that owns your app's databases, or as root for a system service that reaches every database. Then run, as the same user:

litebackup start /var/lib/app/main.sqlite
litebackup status

Use the path to an existing SQLite file. Continuous backup runs in the litebackup background process. Your app keeps using its usual SQLite driver and file, without waiting for uploads. Keep that file on a durable disk or volume.

Check the console for the server and cloud backup versions. For application integration, see the TypeScript and Go SDKs; for a service with no code changes, see the CLI. Practice a restore into a new file.

Provider reference

Install

Open AWS Marketplace, or compare cloud and Linux installation guides.