Skip to content
HexDB

Search HexDB

Find a feature, an API example, a step, a FAQ answer or a term, then jump to it.

HexDB
Open source · Written in RustNew: HexDB Enterprise, hosted for you

Documents and Files. One Database, One Binary.

Your data and your files, in one place you control. HexDB finds every photo, recording and document by what's inside it, lets the AI you choose tag it, and keeps it all on your own servers. Encrypted, kept on more than one server, and back on its feet when one fails. One download, nothing else to run.

HexDB 2.5.9 for Windows, macOS, Linux and Docker, free and open source · Read the manual

HexDB Enterprise: we run it for you.Your own hosted lattice with full admin access, backups and upgrades handled. In three regions, from $117 a month.See plans
Found by what's inside
camera, place, artist, words, AI tags
Your AI, your key
Claude, OpenAI or a local model
For developers too
REST, GraphQL, gRPC and SQL
Every hex is an MCP server.Claude and other AI agents connect directly and read your data with the permissions you give them. Built in, read-only, nothing else to run. AI & MCP
What happens to your fileYou upload a photo, a video or a document. HexDB reads what's inside, the AI you pick describes it, it's kept safe on your own servers, and anyone with access finds it by what it shows, not by its file name.In this example, HexDB reads the camera, place and date from the file, the AI tags it glacier, icebergs, lagoon and blue hour, it's stored encrypted, kept on more than one server, and a search for icebergs at dusk finds it. Videos get their length and codec read and a thumbnail from the frame the AI picks, and documents have every word indexed. Every file is also compressed and kept once, searchable by meaning through vectors, and queryable with SQL, GraphQL and REST.

At a Glance

One Download
Database, file store, search and admin console in one program
a single binary
Encrypted
Every byte on disk, with a key only you hold
AES-256-GCM
Self-healing
Rebuilds damaged data from the pieces around it
4+2 Reed-Solomon coding
Fails Over by Itself
Keeps every document on at least two servers and picks a new leader by itself
automatic failover
Search Built In
Find documents and files by the words in them; "run" finds "running" too
full-text indexes
Works With Your Stack
Node.js, Python, .NET, Entity Framework, ODBC and JDBC
6 client libraries
MCP Built In
Claude and other AI agents read your data, with your permissions
an MCP server on every hex
Nothing Else to Run
No separate search, queue, file store or key service
0 extra services

Latest news · November 2026

HexDB 2.5: A Hex Just for AI, an AI on Watch, and Scans You Can Search.

2.5 gives AI work a hex of its own, has the lattice's AI read the audit trail for attacks and alert you where you work, runs every plugin in a sandbox, deletes with SQL, and moves a lattice to other regions or machines without losing data. Its updates read the text in scanned documents, make thumbnails of many more kinds of file, and show how to consume streams and queues.

Listen to the podcast - 23:22 min

What's New in 2.5: The Oracle, an AI on Watch, Sandboxed Plugins and Searchable Scans

The whole 2.5 release in one sitting. The Oracle, a hex that answers every AI question and keeps no data. An AI that reads the audit trail for attacks on a schedule and alerts you by email, PagerDuty, SMS, Slack, Teams, Discord or webhook. Plugins in a sandbox, DELETE in SQL that you can undo, retiring a hex without losing data, and from 2.5.1, the text in scans read with Tesseract and indexed.

0:00--:--
  • AI
    The Oracle: A Hex Just for AI
    Give one hex the Oracle role and it answers every AI question the lattice gets (MCP, the chat, A2A) while keeping no data of its own. It reads what each question needs from the other hexes, as the user who asked, so AI traffic and its waiting stay off the machines that hold your data. If it's down, the other hexes answer as before.
  • Security
    An AI That Watches the Audit Trail
    On a schedule you pick (every 1 to 24 hours), the AI reads a summary of the audit trail, such as failed sign-ins, refused requests and users on new addresses, and tells administrators what looks like an attack, with the evidence: by email, PagerDuty, SMS, Slack, Teams, Discord or a signed webhook. It never sees your documents.
  • Security
    Plugins in a Sandbox
    Every process plugin now runs in a sandbox: on Linux with Landlock, seccomp and resource limits, on Windows in an AppContainer. A plugin reads its own folder and writes its own data folder, and uses the network or other folders only if its manifest says so.
  • AI
    Answers as They're Written, and Pictures Found by Meaning
    The AI chat streams its answer as it writes it. Similarity search finds pictures by what they show, with a multimodal embeddings model, and filtered searches that an index answers only look at what the filter allows. MCP clients that sign in with OAuth find the provider on their own.
  • SQL
    DELETE With SQL, and Undo It
    DELETE FROM orders WHERE status = 'void' runs as one delete batch you can restore, with what cascades from it, a dry run to preview, and a guard against deleting more than you saw. The JDBC and ODBC drivers report the rows deleted.
  • Files · 2.5.1
    Scans You Can Search by What They Say
    HexDB reads the text in pictures and scanned PDFs with Tesseract, the open-source OCR engine, and indexes it with the file, so a search finds a scanned letter by its words. SVGs, PDFs and RAW photos get thumbnails, and with ffmpeg (in the Docker image) so do HEIC, AVIF, HEVC, VP9 and AV1. Both tools run sandboxed, reading from a pipe.
  • Lattice
    Retire a Hex Without Losing a Thing
    Before a hex goes for good, retire it: its data moves to the other hexes first, and if it leads, it hands the Overseer role to a hex that has everything. That's how a lattice moves to other regions or machines, and how HexDB Enterprise changes a plan while your lattice keeps serving.

Since 2.5.0

  1. 2.5.9November 19, 2026

    Faster queues, sorted pages and SQL; safer plugins and key rotation; a slim image.

    • Queue stats come from memory, sorted pages with a range start at its bound, and SQL holds only the fields a statement reads.
    • A plugin that falls behind the history waits for an administrator's resync instead of skipping changes, and API keys show which lattice secret they're on.
    • Releases publish exactly the image that was tested on both architectures, plus a slim server-only image.
  2. 2.5.8November 18, 2026

    Fixes from a third independent review. Upgrade.

    • A row move can't reveal a protected field inside an array, and a one-time code signs in once across the lattice, not once per hex.
    • Expired documents release their unique values at once, and dead letters arrive however long their move takes.
    • SQL bounds the rows joins and results build, not only what it reads, and API keys used only on replicas are re-hashed even right after a restart.
  3. 2.5.7November 16, 2026

    Fixes from a second independent review. Upgrade.

    • A write can't move a document out of a role's field protection (changing a tenant to see a hidden field).
    • Dead letters always arrive, and stream plugins carry on from where they were after a new Overseer.
    • Script children stop when the script finishes, SQL stops at its memory budget as it reads, and API keys used only on replicas survive a lattice-secret rotation.
  4. 2.5.6November 16, 2026

    Fixes from an independent security and reliability review. Upgrade.

    • Roles combine per document: a role's hidden fields go with its row filter, so a role for one tenant never uncovers another tenant's fields.
    • Stream webhooks never show their credentials, reach only public addresses unless an administrator allows private ones, and readers can't move a webhook's position.
    • Queues keep every message through cancelled requests and dead-letter moves, and de-duplication survives restarts. Stream plugins can acknowledge deliveries, for at-least-once end to end.
    • Script sessions end with the run, and everything a script starts stops with it. TypeScript functions run in the Docker image (Node.js 24).
    • No failed writes during a handover, sorted pages that read only what they show, and a signed container image with an SBOM.
  5. 2.5.5November 14, 2026

    Replicas that reach the Overseer every time, and live streams on every hex.

    • No more "couldn't reach the Overseer" when nothing was wrong: replicas drop idle connections before the Overseer does, and resend a read whose connection broke.
    • A sliced replica passes live Server-Sent Events feeds on from the Overseer, so the admin UI's live stream view works on every hex.
    • The admin UI's page introductions use the full width, and the Schemas page has room to breathe.
  6. 2.5.4November 13, 2026

    A data-safety fix for sliced lattices. Upgrade.

    • A replica whose full copy of the data was cut short (a restart or crash) is never counted as a copy and never leads; it copies everything again.
    • A new Overseer clears what it has in a slice before collecting it, so deleted documents can't come back.
  7. 2.5.3November 13, 2026

    Streams and queues, shown working in the admin UI.

    • Opening a stream subscribes to it, so messages appear as they're published.
    • Receive from a queue as a worker: each message's lease counts down, with Acknowledge and Release.
    • Ready-to-run code for both: Server-Sent Events, WebSocket, consumer groups and webhooks; a worker in curl and Node.js.
    • A demo's shared account no longer shows password and MFA forms.
  8. 2.5.2November 13, 2026

    Fixes.

    • Signing in to the admin UI works with a browser's saved password.
    • The macOS installer is sized from its contents.
  9. 2.5.1November 12, 2026

    OCR, many more thumbnails, and EF Core 10.

    • Text in pictures and scanned PDFs is read with Tesseract and searchable.
    • Thumbnails of SVG, PDF and RAW files, and with ffmpeg of HEIC, AVIF, HEVC, VP9 and AV1.
    • The .NET driver supports EF Core 10 on .NET 10, and still EF Core 9 on .NET 8.
    • The VS Code extension (0.3.0) shows the delete history, with restore and purge.
    • The Docker image is based on Debian trixie and carries Tesseract and a small ffmpeg.

The one-slide version

HexDB, Explained at a High Level

No jargon. What it does for the business, what it replaces, and why it costs so little. Print it, put it on a screen, or press play and listen.

Listen to the podcast - 5:43 min

Portability: One Small Rust Database, Everywhere

Why one self-contained program, about 20 MB to download, runs on Windows, macOS, Linux and a Raspberry Pi, and why fewer moving parts matter, from a laptop to the edge to the cloud.

0:00--:--
HexDB

In one sentence: HexDB is a database that keeps your data and your files encrypted, copied and searchable, in a single program that runs anywhere, with no license fees.

AES-256
on every byte stored
Auto
failover when a server dies
20 MB
to download, 65 MB installed
$0
in license fees
  1. Stolen Data Is Unreadable

    Everything HexDB writes to disk is encrypted with AES-256, the standard banks and governments rely on. Without your key, a stolen disk or backup is noise.

    Keys can be changed without stopping the service.

  2. It Keeps Running When Hardware Fails

    Run it on two or more servers and every record is kept on at least two of them. If the one in charge dies, another takes over by itself, in 15 to 20 seconds by default.

    In memory, each record is kept in six pieces with two spare. Any two can be corrupted and it is rebuilt.

  3. It Grows by Adding Servers

    Need to serve more readers or survive more failures? Start another server with the same name and secret, in any cloud or your own building. It finds the others, copies the data and starts working.

    No clustering software, no coordinator, no consultant.

  4. It Runs Wherever Your Teams Work

    Linux, macOS, Windows and Docker. Official libraries for JavaScript, TypeScript, Python and .NET (including Entity Framework), ODBC and JDBC drivers for reporting tools and Java, and plain web requests for everything else.

    Any language, any framework, any cloud or none.

  5. It Costs Almost Nothing to Own

    Open source, with no license fees. One small program (a 20 MB download, 65 MB installed with its admin console) does the work of a database, a file store, a search engine, a message queue, a job scheduler and an admin console, so there is less to buy, run and secure.

    Runs comfortably on a laptop: tens of thousands of writes a second, reads in a fifth of a millisecond.

  6. It Stores Less and Finds Things Faster

    Records are compressed before they are encrypted, and a file stored twice is kept once, so disks and backups stay small. Indexes and full-text search find what you need without reading everything.

    Reports and real-time alerts are built in, and BI tools can ask it questions in SQL.

Built in

Your Files Live Here Too.

Photos, recordings, videos and documents are kept next to your data, with the same encryption, copies and permissions, on your own servers. HexDB reads what each file says about itself, and the AI service you choose can tag it too, so people find files by searching, not by remembering where they saved them.

How it works
  • Any Kind of File
    Photos, audio, video, design files, PDFs and office documents.
  • Stored Once
    Ten copies of the same file take the space of one.
  • Found by What's Inside
    Search by camera, artist, place or author, or by tags an AI wrote.
  • Kept on Your Servers
    Encrypted, kept on more than one server, repaired if a disk fails.

Runs everywhere

From a Laptop to a Raspberry Pi to the Cloud.

One program, built for each system and installed the way that system expects. There's nothing else to install.

  • WindowsAn installer or Chocolatey. Runs as a Windows service.
  • macOSApple silicon and Intel, from one installer or Homebrew.
  • LinuxIntel and ARM: apt, Docker or a one-line install, with systemd.
  • Raspberry PiA Pi 3, 4, 5 or Zero 2 W with a 64-bit OS.

What it replaces

  • Database
  • File storage
  • Search engine
  • Message queue
  • Job scheduler
  • Admin console
  • Encryption layer
  • Virus scanner
HexDB
one program, one process

Fewer moving parts means fewer things to patch, monitor, license and explain to auditors.

Open source · github.com/dreaminhex/hexdbSee the code

Everything in the box

A Whole Data Platform, Not Just a Key-Value Store With Ambitions.

Most databases make you bolt on search, a message bus, a scheduler, encryption, an admin console and somewhere to keep files. HexDB ships them in the same process, behind the same permissions, replicated the same way.

  1. Documents and Queries
    Insert, replace, merge-patch, delete, bulk writes, upserts and update-by-filter. One JSON filter language with sorting and paging, shared by REST, GraphQL and gRPC, and read-only SQL with joins, subqueries, CTEs and expressions on top of it.
    ULID idsTTLsIdempotency keysSQLgRPC
  2. Aggregations and Transactions
    Group-by with count, distinct count, sum, average, min and max. Multi-document ACID transactions across tessellations with version and filter preconditions.
    Serializable1,000 opsif_version
  3. Versioned Schemas
    Optional per tessellation. Each version is compatibility-checked against the last, like a schema registry. Migrations (rename, copy, remove, default, convert, or a function you write) run in the background and resume after restarts, and any version can be rolled back.
    Dry-run checkRollbackFunction steps
  4. Safe Writes
    Every insert, update and delete is atomic and safe to retry: send it with an idempotency key and a repeat after a dropped connection returns the first result instead of writing twice; the CLI does that for every write, and the drivers retry keyed writes. Updates can require the version you read. A schema field can name a document's parent, so deleting the parent deletes its children (documents and files), is refused while they exist, or unlinks them, in one commit; enforced links work like foreign keys, so nothing can point at a parent that's gone, even mid-delete. Deletes and updates with no filter are refused unless you mean every document, a dry run shows what a delete would remove, and every delete goes to a trash, restorable in one step.
    Idempotency keysForeign-key linksCascading deletesTrash and undo
  5. Change Data
    An ordered change feed over polling, long polling, Server-Sent Events or WebSocket, backed by an on-disk history. Consumers resume exactly where they stopped, even after a restart, and see only what their role lets them read.
    SSEWebSocketResumable24h history
  6. Streams and Queues
    Named publish/subscribe logs with consumer groups and retention, fed from tessellation changes and delivered to webhooks, at least once. And queues for work done once: each message goes to one consumer, with leases, acknowledgements, retries, delays, de-duplication and dead-letter queues.
    Consumer groupsWebhooksQueuesDead letters
  7. Functions, Schedules and Triggers
    Saved queries, aggregations, transactions and scripts in Python, TypeScript or JavaScript, run by name with typed parameters. Schedule them on an interval or a cron expression, or trigger them when documents change: before a write, to check, change or refuse it, or after it commits.
    Typed paramsCronBefore/after triggers
  8. Plugins
    Change data capture to Kafka and Kinesis, ingest from PostgreSQL, SQL Server and S3, file import from S3, Azure Blob Storage, Google Drive and Dropbox, logs and metrics to OpenTelemetry, files or HTTP. A plugin is a process, a webhook or built in.
    KafkaOTLPFile importAny language
  9. Replication and Failover
    Hexes discover each other, elect an Overseer and replicate by snapshot plus change stream. When the Overseer fails another takes over. Optional sync acks, write quorum and write forwarding.
    Auto electionQuorummin_acks
  10. Security
    Sessions, API keys, OAuth access tokens from your OpenID Connect provider, and TOTP multi-factor auth. Built-in and custom roles granted per tessellation, with row filters (only the user's region, say), hidden or masked fields, and file permissions limited to folders. Secrets you configure can be replaced but never read back. A persistent audit trail, lattice-wide sign-in throttling, and AES-256-GCM everywhere on disk.
    RBACRow filtersMFAAudit trail
  11. Resilience
    A write-ahead log with group commit, SSTables with Bloom filters and compaction, and Reed-Solomon coding across six vertices, each in its own region of memory, so a corrupt page hits one fragment and the document is rebuilt and repaired from the rest without anyone noticing.
    WALSSTables4+2 coding
  12. Any File, Searchable
    Photos, audio, video, PSDs, PDFs and office files, stored byte for byte. Content-defined chunks named by BLAKE3 are deduplicated, encrypted and spread across the vertices on the hexes' own disks. HexDB reads the metadata out of each file by its type (EXIF, ID3, XMP, QuickTime and dozens more), so you search your files in GraphQL and SQL like any other documents, down to the text of PDFs, a photo's color profile and a GoPro's GPS track. Thumbnails for photos and video come with them, uploads can be capped per user, and the parsing runs in a sandboxed worker process that can't reach your keys, other files or the network. Sharing links give someone without an account a file or a folder, with an expiry, an optional password and a download limit; their short codes come from MAR-62, an HMAC-based algorithm by HexDB's author, and guessing them locks the guesser out.
    BLAKE3 chunksMetadataParser sandboxSharing linksQuotasGraphQL + SQL
  13. AI, With Your Own Key
    Connect Claude, OpenAI, GitHub Models, Azure OpenAI or a model on your own server, such as Ollama. HexDB can tag and describe files as they arrive, pick each video's thumbnail, and answer questions about your data in an Ask page that looks things up with the asker's permissions. Agents like Claude Code can read the lattice over MCP, with the permissions of the key they connect with. Calls use your lattice's key and count against a monthly budget, and the chat has its own limits per question, per user and per visitor, so a public deployment can't run up your bill. Nothing is sent until an administrator turns it on.
    Bring your own keyAsk your dataMCPOff by default
  14. Lattice Configuration
    AI and sharing settings for the whole lattice, in the admin UI or with hexdb config. Every change is an encrypted, checksummed version that each hex verifies before applying, with an audit trail and one-step rollback. Secrets can be replaced but never read back.
    VersionedWrite-only secretsRollback
  15. Tokenization and Sealed Fields
    Mark a field tokenize in the schema and its value is replaced by a token on write, before it reaches the log, memory, disk, replicas or backups, so card and account numbers are never stored. Lookups and joins by the real value still work. Vault tokens can be read back by users with the detokenize permission, every reveal audited; one-way tokens can't be reversed by anyone. Masked fields are kept sealed in memory too.
    One-way or vaultPCI DSSAudited reveals
  16. Malware Scanning
    Every upload is scanned with ClamAV and YARA rules after its content reaches disk and before it becomes a file, so nothing infected enters the lattice or reaches another hex. A match is quarantined for an administrator to release or delete, stored files are scanned again when signatures change, and while the scanner can't answer, uploads wait instead of going through. Free and open source, no accounts, nothing sent anywhere.
    ClamAVYARA-XQuarantineRescans
  17. Operations
    Online backups while serving traffic, an admin UI, a CLI, live runtime settings, six hours of metrics history, tailed logs, an OpenAPI description, drivers for Node.js, Python and .NET, an Entity Framework Core provider, and ODBC and JDBC drivers. A crashed hex restarts and says why, as a background process, a systemd unit or a Windows service, on x86 or ARM down to a Raspberry Pi.
    Admin UICLIWindows serviceARMODBCJDBC

Share

Building With HexDB? Tell People.

Say what you're building, check the message, and post it wherever your people are. Each button opens that site's own share page with the text filled in; nothing is posted until you press post there.

Your message

I'm using HexDB for my next project: an open-source database for documents and files, with AES-256 encryption at rest, automatic failover and self-repairing storage, all in one binary. Check it out: hexdb.app

Post it on

Facebook only accepts the link, so its button copies the message for you to paste. Hacker News gets a plain title, as its guidelines ask. Every link shows HexDB's preview card.