{"id":"4b4eadc0-68a0-4c08-ab2e-922e717f68fb","task":"Sync a SQLite database to Turso's edge replica for low-latency global reads","domain":"docs.turso.tech","steps":["Install the Turso CLI and authenticate: `turso auth login`.","Create a Turso database from a local SQLite file: `turso db create mydb --from-file ./local.db` — uploads the file and returns a `libsql://` URL.","Add edge replicas in additional regions: `turso db replicate mydb --location lhr` (London); repeat for each region you need.","In your application, use the `@libsql/client` package and connect with the Turso URL and an auth token: `createClient({ url: 'libsql://...', authToken: 'YOUR_TOKEN' })`.","Reads are automatically routed to the nearest replica; writes go to the primary and propagate to replicas asynchronously — use `sync()` to force replica refresh if needed."],"gotchas":["Replica reads are eventually consistent — reads immediately after a write may return stale data unless you call `sync()` or read from the primary URL.","The embedded replica mode (local SQLite + sync) keeps a local copy on disk; ensure you call `sync()` on startup and periodically to receive latest changes.","Auth tokens are long-lived by default — rotate them regularly and use short-lived tokens for client-facing deployments."],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:33.723Z"},"url":"https://mcp.waymark.network/r/4b4eadc0-68a0-4c08-ab2e-922e717f68fb"}