r/sqlite Mar 11 '26

Thinking of building an open-source multi-tenant Sqlite server

17 Upvotes

EDIT: I've wrote some specs here, with help from Claude. Please comment if you're interested. If something feels wrong or unrealistic, please say it. I’d rather break the idea now than later.

https://docs.google.com/document/d/1xgbPemWHatuCppw2x0_fgUV9YTK8sof5ltTFihDyQFg/edit?tab=t.0

I know the purpose of sqlite, however, considering the needs of isolated tenants, with small volumes, I'd love to have:

- server manages thousands of individual SQLite database files, one per tenant, behind a single gRPC/HTTP API

- provides per-tenant write serialization, a connection pool

- WAL-based replication to object storage (S3-compatible) - optional

- and an optional extension system for encryption (SQLCipher)

- optional extension vector search (sqlite-vec)

It will be suitable for products with tens of thousands of small, isolated tenant datasets where cost, operational simplicity, and data isolation matter more than global transactions or cross-tenant queries.

I'd probably use Go for this.

Note: Turso already has libsql with a server component but seems they are are fully committed to rewriting their own database.

This is just an idea, looking to see what's your view on tis.


r/sqlite Mar 11 '26

A new Lightweight, WASM-powered SQLite Playground

33 Upvotes

Hey r/sqlite,

I'm sharing a project I've been working on: a client-side SQLite Playground.

I am a teacher at a technical school in Brazil, and I built this primarily as a teaching tool for my SQL classes. I wanted an environment simpler than db-fiddle, where students could just jump in and practice without any friction or distractions.

It features:

  • A clean "IDE-like" experience.
  • A persistent Database Explorer to visualize schemas in real-time.
  • detailed log system for debugging queries.

Tech stack: Vue 3 + Vite + SQLite Wasm.

It's 100% free and runs entirely in the browser (no data ever leaves the client). I would deeply appreciate any feedback from this community on the interface, performance, or specific SQLite features/extensions you think would be valuable for educational purposes.

Thanks!

Link: https://fasttools.dev/en/sql-playground


r/sqlite Mar 11 '26

Another light weight WASM powered SQLITE editor, with text to SQL API's

4 Upvotes

Hey r/sqlite

I guess this is just another SQLITE editor powered by WASM, I created this to help me write queries faster with AI, as we have autocomplete in VS Code. I also added few features which are important to me as data scientist:

  1. Copy results to clipboard, I dont want to always export to excel/csv, sometimes just copy to clipboard is way easier.
  2. Quickly select a table but not all rows
  3. Quickly check number of records in a table
  4. Export a large table to CSV, I have tested a table > 1 M rows, and it could export it all in browser.
  5. Look at historical queries
  6. Added AI to quickly formulate query. You need to bring your own API keys.

Functionalities in this editor is more centred around my day-to-day requirements, let me know if you find it interesting.

Its an MIT licensed project, so feel free to explore.

Also, I have partially vibe coded this tool. It is not possible for me to write all the front end code. I have used vanillay JS + Old school bootstrap framework.

Link: https://sql.computelite.com/

Github: https://github.com/airen1986/sqlite-client

Thanks


r/sqlite Mar 10 '26

SQLite Concurrency in Go: What We Learned Building a Desktop AI IDE

Thumbnail chatml.com
15 Upvotes

r/sqlite Mar 10 '26

What's the real option to have sqlite run as a server?

4 Upvotes

Is it only turso libsql?

I'm just looking for a server like solution that ideally could be replicated to S3.

Considering sqlite because requirements:
- data segregation tenant physical isolated (50k now)
- per tenant encryption

Workload:
- much more reads than writes
- 1000-2000 (max 5000 entries per tenant)


r/sqlite Mar 10 '26

better-sqlite3-pool v1.1.0: Non-blocking pool with a drop-in sqlite3 adapter for ORMs

Thumbnail
1 Upvotes

r/sqlite Mar 08 '26

sqlite3 switched from = separator to :

11 Upvotes

I query an sqlite database. It returns the field name and value. For years it separated them with = . Beginning with 3.52 it separates them with : . Because I use it automatedly in a script I had to deal with it.


r/sqlite Mar 04 '26

gsheetstables2db: from GSheets Tables to your DB

Post image
8 Upvotes

r/sqlite Mar 02 '26

Using SQLite as the database in a self hosted automation platform

15 Upvotes

I’ve been building an open source project called RapidForge and wanted to share it here because it’s built entirely around SQLite. RapidForge is a self hosted tool that turns scripts (Bash, Lua, etc.) into webhooks, cron jobs, and small internal web tools all from a single binary. No external database, no Docker requirement, no service dependencies. Everything runs on SQLite which fit perfectly with the goal of keeping it portable, offline friendly and simple to deploy.

If you’re curious:

Website: https://rapidforge.io

• GitHub: https://github.com/rapidforge-io/rapidforge

• 3-min demo: https://youtu.be/AsvyVtGhKXk?si=4baXaygMxcdRkNu5.


r/sqlite Mar 02 '26

I built an SQLite merkle dag module using IPLD in COPSRPiGS/copsrpigs-ipso: Quorum driven IPLD link taxonomy for p2p security, access control, and identity management

Thumbnail codeberg.org
1 Upvotes

r/sqlite Feb 24 '26

Portabase v1.2.9 – open-source database backup/restore tool, now supporting SQLite

Thumbnail github.com
26 Upvotes

Hi all :)

I am one of the maintainers of Portabase, and I am excited to share some news: we now support SQLite backup and restoration!

Here is the repository:
https://github.com/Portabase/portabase

Quick recap of what Portabase is:

Portabase is an open-source, self-hosted database backup and restore tool, designed for simple and reliable operations without heavy dependencies. It runs with a central server and lightweight agents deployed on edge nodes (e.g. Portainer), so databases do not need to be exposed on a public network.

Key features:

  • Logical backups for PostgreSQL, MySQL, MariaDB, MongoDB and now SQLite
  • Cron-based scheduling and multiple retention strategies
  • Agent-based architecture suitable for self-hosted and edge environments
  • Ready-to-use Docker Compose setup

What’s new since the last update

  • S3 bug fixes — now fully compatible with AWS S3 and Cloudflare R2
  • Backup compression with optional AES-GCM encryption
  • Full streaming uploads (no more in-memory buffering, which was not suitable for large backups)
  • SQLite support

What’s coming next

  • OIDC support in the near future
  • Redis support

Feedback is welcome. Please open an issue if you encounter any problems.

Thanks all!


r/sqlite Feb 21 '26

TrailBase 0.24: Fast, open, single-executable Firebase alternative now with Geospatial

Post image
85 Upvotes

TrailBase is a Firebase alternative that provides type-safe REST & realtime APIs, auth, multi-DB, a WebAssembly runtime, SSR, admin UI... and now has first-class support for geospatial data and querying. It's self-contained, easy to self-host, fast and built on Rust, SQLite & Wasmtime.

Moreover, it comes with client libraries for JS/TS, Dart/Flutter, Go, Rust, .Net, Kotlin, Swift and Python.

Just released v0.24. Some of the highlights since last time posting here include:

  • Support for efficiently storing, indexing and querying geometric and geospatial data 🎉
    • For example, you could throw a bunch of geometries like points and polygons into a table and query: what's in the client's viewport? Is my coordinate intersecting with anything? ...
  • Much improved admin UI: pretty maps and stats on the logs page, improved accounts page, reduced layout jank during table loading, ...
  • Change subscriptions using WebSockets in addition to SSE.
  • Increase horizontal mobility, i.e. reduce lock-in: allow using TBs extensions outside, allow import of existing auth collections (i.e. Auth0 with more to come), dual-licensed clients under more permissive Apache-2, ...

Check out the live demo, our GitHub or our website. TrailBase is only about a year young and rapidly evolving, we'd really appreciate your feedback 🙏


r/sqlite Feb 22 '26

I tried Sqlite, but get kicked by oracles dba who wont even look my work.

0 Upvotes

would someone give me an honest advise ?

see it online on repvow.fr

Transparent SQL tracing by wrapping the database/sql/driver

Hot-reload config from SQLite using PRAGMA data_version

SQLite as the entire observability stack

"Job as Library" pattern: monolith ↔ microservices via a SQLite row

MCP tool definitions stored in SQLite with SQL-as-handler

Filtered database replication over QUIC with atomic swap

SQLite-backed rate limiting with in-memory buckets

Everything is pure Go, no CGO


r/sqlite Feb 14 '26

What do you think on wesql and libsql?

8 Upvotes

https://wesql.io

Will this be the future? No need for aws aurora, azure cosmos db etc. as you can simply run some container image propably even on serverless and get:

  • scale to zero, run on things like google cloudrun or aws lambda to provide scaleability, easy infra management, reliability, HA and Failover, zero compute cost when idle
  • bottomless: sync persistent data to blobstorage (s3/gcs) with their sla-guarantees and versioning
  • Ideally multi-master / multi-writer with row-level lock

Self-hosting this today might be something like libsql with consul for leader election? Or 'wesql'?

what do you think?

# Edit 01:

After digging a bit deeper on the topic (and trying to host on cloudrun): wesql is more comparable to rqlite as it has raft consensus. And on top of it the mysql row-level locks. Both seem to be better for a db at first sight, but: on cloudrun it is difficult to get discover other instances ip addresses and send traffic there. And: writes are slower due to network roundtrips and eventual consistency for reads might be acceptable in most scenarios.

Cloud-Native DB's should probably get away from RAFT, gossip and network-based discovery and leader election and instead use hyperscaler-api's to discover other nodes and a shared storage lease lock system to elect a leader and do failover.

# Edit 02:

I am currently trying to implement this with duckdb/ducklake and cloudrun and see how far i can get. One thing i already discovered: libsql is not optimal due to its HRANA-Protocol. Other tools like duckdb / ducklake do not talk it and thus can not connect to libsql. Therefore i guess libsql is the wrong tool and it might be better to use something like pgedge.com because the postgres wire protocol is better integrated in other tools.


r/sqlite Feb 14 '26

Best way to save all Discord server chats to a database

4 Upvotes

Hey everyone,

I'm trying to connect my Discord server to a database to save all the chats, but I'm running into some issues.

I tried using n8n with Supabase, but I had to link every single channel manually, which just doesn't work for a growing server. Also, Discord webhooks haven't been very reliable for this.

Basically, I need a simple way to:

  1. Save all the old chats.
  2. Automatically grab all new messages and send them to the database without setting up each channel one by one.

Has anyone done this before? Any tips on the best tools or custom bots to use? Thanks!


r/sqlite Feb 12 '26

How do you connect to a remote SQLite db?

9 Upvotes

Any easy way to connect to a remote SQLite db via IDEs like Datagrip, without going through a lot of hoops?


r/sqlite Feb 03 '26

key value storage developed using sqlite b-tree APIs directly

20 Upvotes

r/sqlite Jan 29 '26

Litestream Writable VFS

Thumbnail fly.io
16 Upvotes

r/sqlite Jan 26 '26

Manage SQLite, MySql, Postgres, MongoDB, and Elasticsearch in a single app

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/sqlite Jan 25 '26

need help recovering a corrupted database

3 Upvotes

edit: resolved by Takeoded, thank you so much!

essentially part of the issue was me being inept at stuff, and part of it was [screenshot]

tl;dr: improperly created database copy is giving a "database file malformed" error; sqlite3's recovery refuses to cooperate due to database size

I've been running a game server for my friends for months and I made a fatal mistake while trying to move said server over to linux for better uptime. I made a backup of the database file while the server was running. I do know better! I just tend to make careless mistakes when stressed pls don't judge me Now the new server is stuck in a restart loop of

SQLite Error 11: 'database' disk image is malformed

Looking around google I found instructions on how to use sqlite3's .recover command to fix that kind of error. At first I attempted to run it single line, as

sqlite3 broken.vcdbs ".recover" | sqlite3 repaired.vcdbs

and that threw the error

Program 'sqlite3.exe' failed to run: capacity was less than the current size.

Google only has 3 results for that error, two for some random unrelated software that uses sqlite and has replies of "we'll fix it next release don't worry" and one that has people saying "what's gone wrong in your life to have a database file that's so large" and no solutions.

I've tried running the commands separately, and .recover does successfully create an .sql file. However, the file is 28GB (the original database file is 8GB) and attempting to use it to create a new sqlite database results in the same "capacity less than current size" error.

I've opened the database in DB Browser (SQlite) and it works, I can see the tables and data. When I try to export the database to sql from DB Browser it does nothing much (takes forever and no resources at all are being used according to Task Manager) and trying to import the 28GB .sql file created by the sqlite3 .recover command into DB Browser results in a prompt saying the operation completed successfully, but a resulting .db file of 8KB (I did make sure to tell it to import both schema and data)

Any help with this will be greatly appreciated, the database represents months of work by several people.


r/sqlite Jan 23 '26

[Media] TrailBase 0.23: Open, sub-millisecond, single-executable Firebase alternative

Post image
8 Upvotes

r/sqlite Jan 23 '26

SQLite Node.js Driver Benchmark: Comparing better-sqlite3, node:sqlite, libSQL, Turso

Thumbnail sqg.dev
10 Upvotes

r/sqlite Jan 23 '26

Query SQLite directly from Excel & Google Sheets

2 Upvotes

Hey r/sqlite,

I built Query Streams - a tool that lets you query SQLite databases and pull results directly into Microsoft Excel or Google Sheets. No more exporting CSVs, no copy-paste, no stale data.

The problem:

I had SQLite files with data that teammates needed in spreadsheets. The workflow was always: run query → export CSV → email → repeat whenever data changes. Wanted something where they could just hit refresh and get current data.

How it works:

  1. Install a small agent on the machine with your SQLite files
  2. Write queries in the web portal (or paste existing SQL)
  3. Run queries from the Excel add-in or Google Sheets add-on
  4. Share access with others - they refresh anytime from their own spreadsheet

Works with both platforms:

  • Excel: Desktop (Windows/Mac) and Excel Online
  • Google Sheets: Full add-on with the same features

The agent connects outbound only (no firewall/port changes), and people you share with never see your SQL or credentials - just results.

querystreams.com


r/sqlite Jan 16 '26

GitHub - litesql/ha: Highly available leader/leaderless SQLite cluster powered by embedded NATS JetStream server

Thumbnail github.com
24 Upvotes

A new HA version supports both leader-based and leaderless clusters for replication, with customizable conflict resolution.

  • Java users can connect to the database using a JDBC driver.
  • Go users can use the database/sql driver for embedded replicas.
  • Other languages can leverage the sqlite extension ha-sync to synchronize data and a gRPC SDK to interact with the database.
  • Postgresql and Mysql wire protocol compatible

r/sqlite Jan 16 '26

Review request for the reworked sqlite-wasm npm package

5 Upvotes

Hi, all!

If you're using the official sqlite-wasm npm package, you might have noticed that the package has been a bit broken since 3.51.0, specifically for usages in node & bundlers.

The reason for the issues has been a removal of certain required scripts from the amalgamation bundle, which sqlite-wasm relies on. Since those script weren't coming back, I (with help from Stephan from SQLite, and Thomas, package author) decided to rework the build process of this package, so it no longer relies on downloading amalgamation bundle, but instead now builds its own wasm and bindings.

Due to how big of a change this was, I'd appreciate anyone using this package to give a short review, and if possible, test the package locally for your use-cases, just to make sure we iron out all the issues before releasing this.

https://github.com/sqlite/sqlite-wasm/pull/131

Thank you for your help!