Your SaaS.
Their database.
Place selected customers’ data in their own Postgres. Keep the rest in your cloud.
02
One application.
Different places for data.
Use your existing application and PostgreSQL drivers.
Keep most tenants in your cloud, and place selected customers’ data in their own Postgres. Run a compatibility check, choose the tables, and connect the customer’s agent.
# 1. Check compatibility
$ lokadb check
# 2. Prepare and enable tables
$ lokadb enable -prepare
$ lokadb enable
# 3. Move an organization
$ lokadb move-orgCommands shown schematically. See documentation for required options.
Check compatibility
Analyze your schema and recorded workload before moving data.
Prepare and enable
Choose the tables and review their relationships and query patterns.
Move the data
Connect the agent and move the selected organization to its own Postgres.
△ MVP · Selected PostgreSQL tables only. Review logs, caches and backups separately.
The problem it solves
You are a multi-tenant SaaS
All customers share one Postgres. Then the largest customer says: "our data must live in our own database, in our own network, under our own keys."
The usual answers are bad: a separate deployment of the whole product for one customer, or a rewrite of the data layer of the application.
You want a third way
The customer provides a Postgres. You move that one organization into it. The application neither knows nor cares: the proxy finds the organization in every statement and sends it where the rows are.
One customer at a time, no big-bang migration, and the way back is one command.
How it works
The application talks to the proxy as it talked to Postgres. The cloud never connects into the customer's network: an agent inside it opens one outbound, mutually authenticated tunnel.
1. Check
lokadb check reads your schema, a recording of the workload and the customer database, and says what blocks the move, what is not supported yet and what will behave differently. It changes nothing, and it is free and open source.
2. Enable and move
enable turns the chosen tables into tables partitioned by organization, in place, without copying rows. move-org then moves one organization to its own database while the application keeps writing.
3. Undo any time
move-back returns the organization to the cloud; disable undoes enable. Every step can be stopped and reversed.
What does not change in your application
- The driver, the ORM and the SQL: tested with unmodified Laravel, Django and Go (GORM over pgx), and with pgx, psycopg, JDBC and PDO clients.
- Only the connection string changes:
hostandportpoint at the proxy. - Migrations, prepared statements, transactions, upserts,
COPY, cursors,LISTEN/NOTIFYkeep working.
What you may need to decide: relations your schema does not declare as foreign keys (common in Rails and Laravel), reports that read across organizations, and background jobs. lokadb check lists every such query and why no organization was found; you declare the missing relations or allow the reviewed reports. A statement that names no organization is refused by default, never sent to every customer database.
What it costs at run time
Measured on eight separate servers, not in Docker on one machine: Postgres 18 with fsync on, two repeats, the median. All figures are for this workload (access by primary key and by an (organization_id, id) index); another workload gives other numbers.
A moved organization pays for distance
Its latency is almost linear in the round-trip time to the customer. At 43 ms a read takes 352 ms through the fdw profile and 133 ms through fdw+direct; an update 351 and 89 ms. lokadb check forecasts this before you move anyone.
One promise, stated narrowly
The rows of the chosen tables of a moved organization are stored only in that organization's database.
What it gives
- The proxy only narrows: it takes the organization from the statement itself. A wrong guess gives an empty answer, never another organization's rows.
- The cloud never reaches into the customer network. One outbound tunnel, mutual TLS, single-use enrolment tokens, certificates that renew themselves and can be revoked, TLS end to end to the customer's database.
- Passwords and data stay with you and the customer.
What it does not isolate
- Your application's caches, queues, search indexes, files, logs and error reports.
- Backups and replicas made before the move.
- On the
fdwprofile, the moved rows in transit through the cloud Postgres. - It is not an authorization layer: who may read what remains the application's job.
Close direct access to the cloud database so that only the proxy, the relay and administrators connect; lokadb check verifies it. The full list is in limits.md.
Open source core
The proxy, the tunnel (relay and agent), enable, move-org, the way back, migrations, the whole compatibility check and the runner that executes commands inside your network are open source under Apache-2.0. You can run all of it yourself, for free, with no limits on rows, volume or queries.
Try it first
One command starts a complete small setup and moves an organization out while an application writes:
docker compose -f quickstart/compose.yml up --build
Or use the online demo: a cloud database, organizations in their own databases, a demo application and the compatibility report — nothing to install.
LokaDB Cloud: the control panel and the operations around it
You pay for management, automation and operations — not for rows or queries.
Control panel
Organizations, moves, agents, a connection wizard for the customer's side, a portal for your customer, statistics and monitoring with e-mail alerts.
Check reports in the panel
Every check your runner makes, readable by section: blockers, changes, the latency forecast and the suggested declarations, ready to copy. The check itself is fully open source. Coming next: a report on an uploaded schema without installing anything, an AI advisor over the findings, comparison over time.
Your data stays yours
An open-source runner inside your network contacts the panel by token and executes check, enable, moves and returns there. Passwords and data do not pass through us.
Enterprise can run the panel in its own environment under a signed licence. When a licence expires, only management stops: the proxy and the data keep working.
Pricing
No limits on rows, volume or queries. Billing is by organizations managed in the panel. Payments go through Paddle, our merchant of record, which issues the invoices.
Community
- The whole open-source core
- The complete compatibility check
- Run it yourself, no limits
- Issues and discussion on GitHub
Starter
- Control panel
- 3 organizations
- Check reports in the panel
- E-mail support, reply within 2 working days
Growth
- Everything in Starter
- 20 organizations
- Statistics, monitoring and e-mail alerts
- E-mail support, reply within 1 working day
Enterprise
- Everything in Growth
- Panel in your environment under a signed licence
- SLA by agreement
$49 per month for each organization above your plan's limit. Prices are in US dollars; sales tax or VAT is added at checkout where it applies.
Questions
Is it safe to give a service access to our data?
The service never holds your data or your database passwords. The runner that executes commands is open source and runs inside your network; it dials out to the panel with a token and does the work locally. What the panel stores is operational: which organizations exist, the state of moves and agents, the metrics. Read the data processing terms and privacy policy (drafts).
What if your service is unavailable?
The proxy, the tunnel and the data do not depend on the panel. You lose management — starting a move, new statistics — until it is back; applications keep reading and writing. With the open-source core you can run every command yourself at any time.
Does our application need changes?
No code changes for the statements the proxy can place. Where it cannot find the organization, the check tells you which queries and why; you declare a relation or allow the reviewed report. It is a decision, not a rewrite.
What does the customer have to provide?
A Postgres database they run (self-hosted or managed), a host or container for the agent, and an outbound connection from it. No inbound ports are opened. Provisioning the database is the customer's side.
Which applications and Postgres versions?
Tested end to end with Laravel, Django and Go. Postgres 17 and 18. The supported and not-yet-supported lists, honestly, are in the README and the roadmap.
Can we leave?
Yes. move-back returns an organization to the cloud, disable restores plain tables, and the core is open source.
Is it production-proven?
No, and we say so. It is covered by an end-to-end stand and a regression check for every defect found so far, and we suggest a limited pilot with a customer who is willing to be first.
Request access
Tell us a little about your case. We reply by e-mail, usually within a few working days.