{"slug": "show-hn-onshore-open-source-data-residency-and-data-sovereignty-solution", "title": "Show HN: Onshore – open-source data residency and data sovereignty solution", "summary": "Onshore, an open-core data residency vault, launched with a free Community edition that includes an AI gateway letting developers point OpenAI or Anthropic clients at Onshore with a one-line change so names, ID numbers, phone numbers and account details are swapped for placeholders before prompts leave a country. The vault encrypts each value individually, keeps keys in a separate key service requiring 3 of 5 key holders to unseal or in a customer HSM, and records access in a hash-chained audit log with signed checkpoints; detection ships with country packs for the US, UK, EU, Canada, Brazil, India, Singapore, the Gulf and Africa. Self-hosting requires Docker with Compose v2 and Go 1.27 or later for the log scan, with one install per country linkable under a single console.", "body_md": "[Website](https://www.onshorevault.com) · [Documentation](https://docs.onshorevault.com) · [API reference](https://docs.onshorevault.com/api-reference/) · [SDKs](https://docs.onshorevault.com/developers/sdks/) · [Editions](https://docs.onshorevault.com/get-started/editions/)\n\n**Onshore is an open-core data residency vault.** It swaps national IDs, bank accounts, phone numbers, names and amounts for tokens or placeholders before they leave a country. Your apps, logs, AI tools and vendors keep working with tokens, and the real values stay in a vault in the country they belong to, behind access rules and a tamper-evident audit log.\n\nWhen you're breached, attackers get tokens instead of your customers' identities, and you can prove exactly what was touched.\n\n**Use AI without handing it your customers' data.** Point your OpenAI or Anthropic client at Onshore's AI gateway with a one-line change. Before a prompt leaves the country, the gateway swaps names, ID numbers, phone numbers, account details and other personal data for placeholders or realistic stand-in names, so the model works on the task without ever seeing who it's about. Replies come back with the real values restored, but only for people whose access rules allow it. The AI gateway is in the free, open source Community edition.\n\n**Core**\n\n- **Vault.** Each value is encrypted on its own; keys live in a separate key service (3 of 5 key holders to unseal) or your own HSM. Your systems store tokens.\n- **Detection.** Finds sensitive values in text, logs and files, with country packs for the US, UK, EU, Canada, Brazil, India, Singapore, the Gulf and Africa, and data types of your own. Optionally adds language models (spaCy, transformers or Stanza) to find names and places in free text.\n- **Access rules.** Default deny. Who may see what, plaintext or masked, for which purpose, from which network, at what time, up to how many an hour.\n- **Audit and evidence.** A hash-chained audit log with signed checkpoints, and signed reports for regulators.\n\n**Stop the leaks**\n\n- **Log pipelines** tokenize identifiers before logs reach outside tools.\n- **AI gateway and cloaking** send prompts to any model without identifiers, and restore the replies for people allowed to see them.\n- **HTTP proxy** tokenizes values in calls to outside vendors, in JSON, forms, XML and files.\n- **Support tool adapters** and**file redaction** clean tickets, documents, scans, recordings and DICOM medical images.\n\n**Collect and prove**\n\n- **Secure components** collect and show values in a frame served by the vault (web, iOS, Android, React Native), so your servers never see them.\n- **Residency map** shows every system and vendor that holds or receives data, and whether each flow is protected.\n- **Data subject requests:** find a person, export, restrict and erase.\n\n**Run it your way**\n\n- Self-host one install per country, link installs across countries under one console, or use Onshore Cloud.\n- Sign in with authenticator codes or passkeys; single sign-on (SAML, OIDC), SCIM and LDAP.\n\n| <sub>**Residency map.** Every flow from your systems to vendors abroad, and whether Onshore protects it.</sub> | <sub>**A customer record.** Only tokens, reveals decided by access rules, and every access on the timeline.</sub> | \n| <sub>**AI gateway.** Point your OpenAI or Anthropic client at Onshore with one line; identifiers are cloaked before the prompt leaves the country.</sub> |  | \n\nYou need Docker with Compose v2, and Go 1.27 or later for the log scan.\n\n**See what's in your logs**, offline, without changing anything:\n\n```\ncd data-plane && go run ./cmd/rv scan /path/to/app.log\n```\n\n**Run the full stack** with Docker Compose:\n\n```\ncd deploy/compose\ndocker compose --profile logs --profile ai --profile proxy --profile adapters --profile files --profile tools build\n./rv init --host vault.example.com --country gb   # writes .env and prints the bootstrap token; the country is final\ndocker compose up -d keys postgres\n./rv keys init                                     # 5 key shares, any 3 unseal; shown once\ndocker compose --profile logs --profile ai --profile proxy up -d\n./rv doctor                                        # pass/fail report for your change ticket\n```\n\nTo try it on your own machine, use `--host localhost`; your browser will warn about the certificate, because the install makes its own until you add yours.\n\nOpen `https://<host>/`, run first-time setup with the bootstrap token, and follow the [setup guide](https://docs.onshorevault.com/get-started/).\n\n**Logs and monitoring** (optional): `docker compose --profile observability up -d` adds Grafana Loki, Grafana Alloy, Prometheus and Grafana, with a ready-made dashboard at `https://<host>/grafana/`. See [Logs and monitoring](https://docs.onshorevault.com/operate/observability/).\n\n## More install options: your own certificate, linked installs, Onshore Cloud\n\n- **Your own certificate:** put it in`certs/` and set`RV_TLS=/certs/cert.pem /certs/key.pem` in`.env` .\n- **Host hardening:** disable or encrypt swap. After a restart the key service is sealed until key holders run`./rv keys unseal` .\n- **An install in another country (Enterprise),** linked to your main console. Get the join code in**Settings → Locations and laws** :\nA linked install joins its primary within a minute and needs outbound HTTPS to it; the primary never connects in. With a private CA, set\n\n```\n./rv init --host vault.de.example.com --country de --join rvj_… --primary https://onshore.example.com\n```\n\n `RV_PRIMARY_CA=/certs/primary-ca.pem` .\n- **Onshore Cloud** deployments set`RV_CLOUD=1` and`RV_CLOUD_REGIONS` (for example`GB,DE,NG` ).\n\n**Store a value from your code:**\n\n``` js\nimport { VaultClient } from \"@onshorehq/sdk\";\n\nconst vault = new VaultClient({ baseUrl, serviceAccountId, keyId, privateKey });\nconst [{ token }] = await vault.tokenize(\"v_live_…\", [{ field: \"national_id\", value: \"AB123456C\" }]);\n// Save `token` in your database instead of the value.\n```\n\n| Server | Install | Client | Install | \n|---|---|---|---|\n| [Node.js](https://github.com/Onshore-HQ/onshore-node) | `npm install @onshorehq/sdk` | [Web](https://docs.onshorevault.com/developers/sdks/web/) | `rv.js` , served by your vault | \n| [Python](https://github.com/Onshore-HQ/onshore-python) | `pip install \"onshore @ git+https://github.com/Onshore-HQ/onshore-python@v0.1.0\"` | [iOS](https://github.com/Onshore-HQ/onshore-ios) | Swift Package Manager | \n| [Go](https://github.com/Onshore-HQ/onshore-go) | `go get github.com/Onshore-HQ/onshore-go@v0.1.0` | [Android](https://github.com/Onshore-HQ/onshore-android) | Build the AAR | \n| [Java](https://github.com/Onshore-HQ/onshore-java) | `mvn install` from the repository | [React Native](https://github.com/Onshore-HQ/onshore-react-native) | `npm install @onshorehq/react-native` | \n| [PHP](https://github.com/Onshore-HQ/onshore-php) | Composer, from the repository |  |  | \n\nEvery SDK is Apache-2.0. Full references: [docs.onshorevault.com/developers/sdks](https://docs.onshorevault.com/developers/sdks/).\n\n|  | Community | Business | Enterprise | Onshore Cloud | \n|---|---|---|---|---|\n| Licence | AGPL-3.0, free | Commercial | Commercial | Coming soon | \n| What you get | The core vault, detection, basic access rules, audit, SDKs, and the AI gateway | Everything for production in one country: language models, shared cloak settings and the cloak API, logs, proxy, secure components, residency map, data subject tools, advanced rules, reports, SSO and SCIM | Several countries under one console, LDAP, SIEM streaming, HSM, 24/7 support | We run it, in each country we open | \n\nPaid features are free for development, testing and on test vaults. See [Editions](https://docs.onshorevault.com/get-started/editions/).\n\n| Path | What it is | \n|---|---|\n| `data-plane/` | Go: vault API, detection, policy engine (CEL), audit chain, `rv` CLI, SQL migrations. Paid services in`data-plane/ee/` | \n| `control-api/` | TypeScript, Fastify and Prisma: organisations, rules, people, connections, reports. Its database role can't read the `data` schema. Paid routes in`control-api/src/ee/` | \n| `console/` | Next.js admin console | \n| `deploy/` | Dockerfiles, Compose, Helm, Caddy, OpenBao config | \n| `docs-site/` | The documentation site (Nextra), with a Scalar API reference | \n| `docs/` | OpenAPI files, design notes, known gaps, test reports | \n| `demo/` | Lagoon Pay, a fictional fintech, and the scenario engine for demos | \n| `scripts/` | End-to-end, integration, SDK, HSM and penetration test scripts | \n\nSDKs live in their own repositories under [Onshore-HQ](https://github.com/Onshore-HQ); `scripts/test-sdks.sh` expects them cloned into `sdks/`. The website is in [Onshore-HQ/website](https://github.com/Onshore-HQ/website).\n\nThe Prisma schema is generated from a migrated database. SQL in `data-plane/migrations` is the source of truth; after changing it, run `npx prisma db pull && npx prisma generate` in `control-api` with `PRISMA_DATABASE_URL` set.\n\n```\ncd data-plane && go test ./...          # unit tests, including detection quality targets\nscripts/test-integration.sh             # data API against real PostgreSQL\nscripts/test-hsm.sh                     # the PKCS#11 backend against SoftHSM\n(cd control-api && npm test)            # control API unit tests\nscripts/e2e.sh                          # customer-style install, then every SDK (memory-hungry; destroys this project's Compose containers first)\nscripts/pentest.mjs                     # attacks a local install; see docs/pentest-report.md\nscripts/console-smoke.mjs               # the console and CSP in a real browser; needs Playwright outside the repo\n```\n\n`e2e.sh` covers tenant boundaries, default deny, the two-person rule, fail-closed behaviour with the vault down and the key service sealed, key rotation, tamper detection on a live database, and a sweep of a full `pg_dump` and every service log for the plaintext it stored.\n\n## Measured performance and detection quality\n\nOn a 2019 Intel MacBook with everything in Docker Desktop, through the TLS edge. Treat these as a rough floor, not server numbers. Method and caveats: [`docs/performance.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/performance.md).\n\n| Measure | Target | Measured p95 | Throughput | Result | \n|---|---|---|---|---|\n| Tokenize, batch of 10, one client | under 30 ms | 18 to 20 ms | about 70 batches/s | Met | \n| Detokenize, batch of 10, one client | under 30 ms | 7 to 8 ms | about 160 batches/s | Met | \n| Tokenize, batch of 10, 10 concurrent | under 30 ms | 37 to 43 ms | 300 to 335 batches/s | **Not met** , close | \n| Detokenize, batch of 10, 10 concurrent | under 30 ms | 22 to 33 ms | 525 to 620 batches/s | Borderline | \n| Log processor, full path through the edge | 20,000 lines/s per 2 cores | n/a | about 29,000 lines/s, not limited to 2 cores | **Unproven** | \n| Detection, 1 KB on one core | under 1 ms | 0.61 ms |  | Met | \n\n**The Node SDK is held back on Node 26:** its global `fetch` sends one request at a time, capping one process at about 150 detokenize batches/s. Pass an undici-based client through the SDK's `fetch` option for now.\n\n**Detection quality:** on the synthetic corpus, every entity type meets its target, at 100% after tuning. That proves little, since the same author wrote the rules and the corpus. An untuned held-out set of awkward real-world shapes (`data-plane/internal/detect/heldout_test.go`) scores 20/22. Real log samples from design partners are the real test.\n\n## Design notes in this repository\n\n| Note | Covers | \n|---|---|\n| [`docs/residency-map.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/residency-map.md) | How the residency map works out each flow's status from evidence | \n| [`docs/custom-entities.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/custom-entities.md) | Your own sensitive data types | \n| [`docs/secure-components.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/secure-components.md) | Embeddable collect and reveal frames | \n| [`docs/mobile-sdks.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/mobile-sdks.md) | iOS, Android and React Native, and what has run on each | \n| [`docs/webhooks-monitoring.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/webhooks-monitoring.md) | Signed events, service health, and metrics for Grafana or Datadog | \n| [`docs/page-protection.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/page-protection.md) | Script inventory, approval and change alerts on sensitive pages | \n| [`docs/proxy-formats.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/proxy-formats.md) | Forms, XML and SOAP, multipart, files and headers through the HTTP proxy | \n| [`docs/identifier-rules.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/identifier-rules.md) ,[` docs/regulatory-notes.md`](https://github.com/Onshore-HQ/onshore/blob/main/docs/regulatory-notes.md) | Identifier formats and the laws behind them | \n\nContributions are welcome. Read [CONTRIBUTING.md](https://github.com/Onshore-HQ/onshore/blob/main/CONTRIBUTING.md) first: every contributor signs the [Contributor Licence Agreement](https://github.com/Onshore-HQ/onshore/blob/main/CLA.md) once, through a check on the pull request.\n\n**Found a security issue?** Report it privately through this repository's **Security** tab, or email [security@onshorevault.com](mailto:security@onshorevault.com). Please don't open a public issue.\n\nOnshore is open core. Copyright © 2026 Flowsplus Services.\n\n- **Core:**[GNU AGPL-3.0](https://github.com/Onshore-HQ/onshore/blob/main/LICENSE) . Free to use, change and self-host. If you offer a changed version to others as a service, you must publish your changes.\n- **Enterprise Edition** , in every directory named`ee` (`data-plane/ee` ,`control-api/src/ee` ):[Onshore Commercial Licence](https://github.com/Onshore-HQ/onshore/blob/main/ee/LICENSE) . Free for development, testing and test vaults; production needs a subscription. See[ee/README.md](https://github.com/Onshore-HQ/onshore/blob/main/ee/README.md) .\n- **Documentation** in`docs-site/content/` :[CC BY 4.0](https://github.com/Onshore-HQ/onshore/blob/main/docs-site/CONTENT-LICENSE) .\n- **SDKs:** Apache-2.0, in their own repositories.\n\nCan't use AGPL? Business and Enterprise subscriptions include the core under the commercial licence. See [NOTICE](https://github.com/Onshore-HQ/onshore/blob/main/NOTICE), [TRADEMARKS.md](https://github.com/Onshore-HQ/onshore/blob/main/TRADEMARKS.md) and [CONTRIBUTING.md](https://github.com/Onshore-HQ/onshore/blob/main/CONTRIBUTING.md).", "url": "https://wpnews.pro/news/show-hn-onshore-open-source-data-residency-and-data-sovereignty-solution", "canonical_source": "https://github.com/Onshore-HQ/onshore", "published_at": "2026-12-01 09:05:59+00:00", "updated_at": "2026-12-01 09:45:56.101051+00:00", "lang": "en", "topics": ["ai-safety", "ai-policy", "developer-tools", "ai-agents"], "entities": ["Onshore", "OpenAI", "Anthropic", "Docker", "Go", "spaCy", "Stanza"], "also_reported_by": [], "takeaway": "Pointing an OpenAI or Anthropic client at Onshore's AI gateway cloaks names, ID numbers, phone numbers and account details before prompts leave the country and restores them in replies only for users whose access rules permit it.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-onshore-open-source-data-residency-and-data-sovereignty-solution", "markdown": "https://wpnews.pro/news/show-hn-onshore-open-source-data-residency-and-data-sovereignty-solution.md", "text": "https://wpnews.pro/news/show-hn-onshore-open-source-data-residency-and-data-sovereignty-solution.txt", "jsonld": "https://wpnews.pro/news/show-hn-onshore-open-source-data-residency-and-data-sovereignty-solution.jsonld"}}