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.6.0 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.6: Backups of the Whole Lattice, and a First Password That Works Once.

2.6 backs up the whole lattice from whichever hex you ask, checks that every file's content is in the backup, makes the first administrator's password good for one sign-in, streams downloads through every hex, and lays the groundwork for partitioned writes. Benchmarks now compare versions across a lattice and a queue, and the dependencies lost chrono and an RSA advisory.

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--:--
  • Backups
    Back Up the Lattice From Any Hex
    POST /backup now covers the whole lattice. A replica that keeps only some slices, the one a load balancer happened to pick, passes the request to the Overseer, which takes it. A backup runs only where every chunk of file content its documents need is present, keeps going if the request times out, and says what it covers. Restored into an empty hex, it has every document and every file.
  • Security
    A First Password That Works Once
    The first administrator's password, generated or configured, now opens one sign-in, which chooses a new password. A password that passed through a config file, a secret store, a log or a hosting dashboard stops working the moment it's used. Administrators can hand out temporary passwords the same way, and it works on every hex, with MFA too.
  • Files
    Downloads Stream Through Every Hex
    A replica that keeps only some slices passes a download on from the Overseer as it arrives, ranges included, instead of reading the whole file first. The first byte arrives in half the time, and a replica relaying files at over 500 MB/s stays at about 130 MB of memory.
  • Lattice
    Groundwork for Partitioned Writes
    A partition map says which group of hexes owns each slice, with an epoch that grows with every change, and hexes refuse a forwarded request routed by another epoch before running it. Every lattice is still one partition, so nothing behaves differently yet: this is what lets writes spread across several Overseers next.
  • Performance
    Benchmarks That Compare Versions Honestly
    The benchmark runs two versions on one machine in alternating rounds, now across a three-hex lattice with synchronous acknowledgements and file downloads, and a queue under a polling dashboard. Only successful requests count, and any failure makes a comparison invalid. 2.6 matches 2.5.9 everywhere, and is faster where it streams.
  • Releases
    Leaner Dependencies, More Evidence
    chrono is gone (the EXIF reader is a patched copy that uses jiff, with the same output), YARA-X builds with the fixed rsa release, and every release attaches full scan reports for both images on both architectures.

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.