LITESTREAM_BUCKET= LITESTREAM_ENDPOINT= LITESTREAM_REGION= LITESTREAM_ACCESS_KEY_ID= LITESTREAM_SECRET_ACCESS_KEY= Set up SQLite on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/sqlite.md from top to bottom. The values at the top of this message are mine: - LITESTREAM_BUCKET: an empty bucket for Litestream's copy ([get one](#get-a-bucket)), or `none` to set up everything else and add the bucket later - LITESTREAM_ENDPOINT: R2: `https://.r2.cloudflarestorage.com`; Backblaze B2: `https://s3..backblazeb2.com`; Tigris: `https://t3.storage.dev`; Amazon S3: leave empty - LITESTREAM_REGION: `auto` for R2 and Tigris, the bucket's region for B2, empty for Amazon S3 - LITESTREAM_ACCESS_KEY_ID: a key that can read and write that bucket, and nothing else - LITESTREAM_SECRET_ACCESS_KEY: the key's secret Ask me for any that still say before you need them. The recipe's example VM name is my-sqlite. This VM's name is the output of `hostname`: use it wherever the recipe writes my-sqlite. Skip the step that creates the VM; you are on it. You are done when all of these are true. Check each one yourself: - A SQLite database at `~/data/app.db` in WAL mode, readable only by `exedev`, and a `sqlite3` set to wait for locks. - Litestream 0.5.18 streaming it to your bucket as litestream.service, started at boot on this VM only, with a copy restored from the bucket and checked. - Nightly snapshots of every database in `~/data` into `~/sqlite/backups`, 14 kept, one restored and checked. - sqlite-web at `https://.exe.xyz:8001/`, open only to the owner's exe.dev email. Read the whole recipe, including the closed details. For initial setup, follow "Install by hand" from top to bottom, skipping "Create a VM". The walkthrough sections are for the owner afterwards: don't run the Back up and restore or Update instructions, and don't install an app. If LITESTREAM_BUCKET is `none` or the owner has no bucket yet, skip "Give Litestream your bucket", "Start Litestream", and "Test a restore from the bucket", run the plain `sqlite3` line of "Create the database", and tell the owner how to add a bucket later. Otherwise write the owner's values into ~/sqlite/litestream.env without printing the secret, and never overwrite an existing litestream.env. If `~/sqlite/litestream ltx ~/data/app.db` lists files before ~/data/app.db exists, the bucket already holds a database: ask the owner whether to restore it (only if no other VM is still replicating to it) or to use an empty bucket. Allow only the owner's email in sqlite-web, read from the reflection integration; if that fails, ask the owner for it. Check sqlite-web on localhost with no email, a wrong email, and the owner's email. Leave the VM private and do not reboot. Finish with the sqlite-web URL, the database path, and the connection settings for the owner's language from "Connect your app". Finish with the URLs I should open.