Keep customer data in its country. Keep your global tools.
Website · Documentation · API reference · SDKs · Editions
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.
When you're breached, attackers get tokens instead of your customers' identities, and you can prove exactly what was touched.
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.
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.
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.
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.
Audit and evidence. A hash-chained audit log with signed checkpoints, and signed reports for regulators.
Log pipelines tokenize identifiers before logs reach outside tools.
AI gateway and cloaking send prompts to any model without identifiers, and restore the replies for people allowed to see them.
HTTP proxy tokenizes values in calls to outside vendors, in JSON, forms, XML and files.
Support tool adapters and file redaction clean tickets, documents, scans, recordings and DICOM medical images.
Secure components collect and show values in a frame served by the vault (web, iOS, Android, React Native), so your servers never see them.
Residency map shows every system and vendor that holds or receives data, and whether each flow is protected.
Data subject requests: find a person, export, restrict and erase.
Self-host one install per country, link installs across countries under one console, or use Onshore Cloud.
Sign in with authenticator codes or passkeys; single sign-on (SAML, OIDC), SCIM and LDAP.
You need Docker with Compose v2, and Go 1.27 or later for the log scan.
See what's in your logs, offline, without changing anything:
cd data-plane && go run ./cmd/rv scan /path/to/app.log Run the full stack with Docker Compose:
cd deploy/compose docker compose --profile logs --profile ai --profile proxy --profile adapters --profile files --profile tools build ./rv init --host vault.example.com --country gb # writes .env and prints the bootstrap token; the country is final docker compose up -d keys postgres ./rv keys init # 5 key shares, any 3 unseal; shown once docker compose --profile logs --profile ai --profile proxy up -d ./rv doctor # pass/fail report for your change ticket To 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.
Open https://
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://
Your own certificate: put it in certs/ and set RV_TLS=/certs/cert.pem /certs/key.pem in .env.
Host hardening: disable or encrypt swap. After a restart the key service is sealed until key holders run ./rv keys unseal.
An install in another country (Enterprise), linked to your main console. Get the join code in Settings → Locations and laws: ./rv init --host vault.de.example.com --country de --join rvj_… --primary https://onshore.example.com A linked install joins its primary within a minute and needs outbound HTTPS to it; the primary never connects in. With a private CA, set RV_PRIMARY_CA=/certs/primary-ca.pem.
Onshore Cloud deployments set RV_CLOUD=1 and RV_CLOUD_REGIONS (for example GB,DE,NG).
Store a value from your code:
import { VaultClient } from "@onshorehq/sdk"; const vault = new VaultClient({ baseUrl, serviceAccountId, keyId, privateKey }); const [{ token }] = await vault.tokenize("v_live_…", [{ field: "national_id", value: "AB123456C" }]); // Save `token` in your database instead of the value. SDKs
Every SDK is Apache-2.0. Full references: docs.onshorevault.com/developers/sdks.
Paid features are free for development, testing and on test vaults. See Editions.
SDKs live in their own repositories under Onshore-HQ; scripts/test-sdks.sh expects them cloned into sdks/. The website is in Onshore-HQ/website.
The 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.
Development and tests
cd data-plane && go test ./... # unit tests, including detection quality targets scripts/test-integration.sh # data API against real PostgreSQL scripts/test-hsm.sh # the PKCS#11 backend against SoftHSM (cd control-api && npm test) # control API unit tests scripts/e2e.sh # customer-style install, then every SDK (memory-hungry; destroys this project's Compose containers first) scripts/pentest.mjs # attacks a local install; see docs/pentest-report.md scripts/console-smoke.mjs # the console and CSP in a real browser; needs Playwright outside the repo 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.
On 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.
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.
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.
Contributions are welcome. Read CONTRIBUTING.md first: every contributor signs the Contributor Licence Agreement once, through a check on the pull request.
Found a security issue? Report it privately through this repository's Security tab, or email security@onshorevault.com. Please don't open a public issue.
Core: GNU AGPL-3.0. Free to use, change and self-host. If you offer a changed version to others as a service, you must publish your changes.
Enterprise Edition, in every directory named ee (data-plane/ee, control-api/src/ee): Onshore Commercial Licence. Free for development, testing and test vaults; production needs a subscription. See ee/README.md.
Documentation in docs-site/content/: CC BY 4.0.
SDKs: Apache-2.0, in their own repositories.
Can't use AGPL? Business and Enterprise subscriptions include the core under the commercial licence. See NOTICE, TRADEMARKS.md and CONTRIBUTING.md.
Open source data residency vault. Keep sensitive personal data in its home country, store only tokens in your systems, and control and audit every reveal. Its AI gateway swaps names, ID numbers and other personal data for placeholders before prompts reach any AI provider, so models never see the real values.











