Self-hosted service
terminusdb/terminusdb avatar
terminusdb/terminusdb

TerminusDB commits every write to a JSON-LD graph and runs on SWI-Prolog with a Rust library

TerminusDB is a distributed, collaborative database designed for building, sharing, versioning, and reasoning on structured data.

3,490 stars158 forksPrologApache-2.0

At a glance

What is it?
terminusdb/terminusdb is an Apache-2.0 graph database written mostly in Prolog that stores linked JSON documents with git-like commits, branches, diffs and push and pull. This article covers what the open-source server includes, how its Docker setup behaves, and which features sit in the Enterprise edition.
Who is it for?
TerminusDB fits teams that need a system of record for linked JSON documents where every change is a commit they can diff, branch and query back in time. It does not fit anyone who needs clustering, RDF/XML or Turtle documents, or the fastest commit-history queries, because the README assigns those to the paid Enterprise edition.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Prolog, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • terminusdb/terminusdb3,490 ★ · +57
Star history
Repository2026-10-082026-11-24
terminusdb/terminusdb3.4k3.5k

57 Stars in the last 47 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Every update becomes a commit you can diff, patch, push and pull

TerminusDB describes itself as an open-source knowledge graph database with git-like version control for graphs and vectors. You can branch, merge, diff and run hybrid search on any commit. Documents are JSON and JSON-LD, linked into a semantic graph through the document API, and the README frames it as a system of record that makes data management collaborative, versioned and queryable.

The seven listed features read like a version control manual applied to data. Revision control gives a commit for every update. JSON diff and patch lets the difference between two commits be applied elsewhere as a patch. Push, pull and clone communicate those diffs between nodes. Time-travel queries run against any state at any historical commit. On the query side, it lists REST API, GraphQL, WOQL and RDF semantics, plus unification, path queries and a datalog logic engine.

The consequence of the commit model is that history is part of the data. Every update is kept as a commit, so storage grows with every change, and the README gives no figures for how large that gets. The repository is Apache-2.0, the primary language is Prolog, and the last push was on 2026-10-25.

The CLI creates a schema class and a document in three commands

The README's quick start uses the terminusdb command. A database is created with `terminusdb db create admin/example1`. The schema is inserted as a document with the graph type set to schema, and a Person class is defined with name and occupation as xsd:string and friends as a Set of Person. Then a person document is inserted with a commit message.

shell
terminusdb db create admin/example1
terminusdb doc insert --graph_type=schema admin/example1 <<EOF
{ "@id" : "Person",
  "@type" : "Class",
  "name" : "xsd:string",
  "occupation" : "xsd:string",
  "friends" : { "@type" : "Set",
                "@class" : "Person" }}
EOF
terminusdb doc insert admin/example1 --message='adding Gavin' <<EOF
{ "@type" : "Person","name" : "Gavin", "occupation" : "Coder"}
EOF

The database name admin/example1 follows an organisation and database pattern, with admin as the default account. The schema is itself stored as documents, which is why the same doc insert command handles both the class and the data. The --message flag is the commit message, which ties each insert to the version history described above.

The README also points to a 15-minutes getting started guide for a longer walk through the same flow. Where the terminusdb binary comes from depends on the install route, covered next.

Docker, Snap and source builds give different halves of the product

The README calls the Docker route the easiest for developers and points to a ten-minute getting started manual with the latest Docker TerminusDB image. Docker brings the server. Snap installs TerminusDB locally as both a git-for-data client and server that can push and pull, and the README presents it as the way to try the command line, for example for ML/Ops and AI use cases that need deterministic symbolic AI processing. Source code installation is also offered.

For deployment, you copy docker-compose.yml from the repository. The setup is two steps. Put the following in a .env file in the source directory:

shell
# Database administrator's password (required)
TERMINUSDB_ADMIN_PASS=

Then run `docker compose up`. The README says TERMINUSDB_ADMIN_PASS is mandatory and must be set, and that TerminusDB should be running at localhost:6363. The compose file backs this up: the password line uses the ${TERMINUSDB_ADMIN_PASS:?error} form, so compose stops with an error when the variable is empty.

Windows with Docker has its own comprehensive guide, which the README links. The repository root has a Dockerfile, a Makefile, a snap/ folder and a distribution/ folder, so all three routes live in one tree.

The compose file maps port 6363 to the change-request service, not to the database server

The README says to expect TerminusDB at localhost:6363, but the services in docker-compose.yml are mapped differently. The terminusdb-server service publishes 6364:6363, which puts the database on host port 6364. A separate change-request-api service publishes 6363:3035, so host port 6363 reaches that service. The compose header, by contrast, says to connect to localhost:6363 and log in as admin with the password from .env. Check which service answers on each port before pointing clients at it.

The file also carries two warnings in comments. The environment settings TERMINUSDB_INSECURE_USER_HEADER=X-User-Forward and TERMINUSDB_INSECURE_USER_HEADER_ENABLED=true are marked to be disabled in production, or to be placed behind an authentication gateway. With that header enabled, a caller who can reach the server can name the user in a request header. The admin password comment says to change it before exposing the instance to the internet.

Two more services run beside the server: vectorlink from image terminusdb/vectorlink:v0.0.8, started with the terminusdb-semantic-indexer serve command, and change-request-api at v0.0.9. The server image itself is terminusdb/terminusdb-server:latest with pull_policy always, so each compose up can pull a newer server than the one you tested.

Vector search arrives in the 12.1 release candidate, with an optional OpenAI key

The README tells you to try the 12.1 release candidate through the vectorsearch/ folder. It has a docker compose setup for 12.1-rc with built-in vector search and local embeddings that need no API key. The README itself says plainly that it is a release candidate, not a final release. Releases confirm the status: v12.1.0-rc1 was published on 2026-10-25, three days before v12.0.9 on 2026-10-28, and v12.0.8 came on 2026-10-12.

The .env.example file lists three variables. TERMINUSDB_ADMIN_PASS is required. OPENAI_KEY is marked optional. BUFFER_AMOUNT is an optional number of pages to buffer for the vector database, set to 120000 in the example. A comment in the main compose file also points to an OpenAI key being added in .env, which matters if you want embeddings from OpenAI rather than the local ones in the release candidate setup.

The practical rule: the main docker-compose.yml is the stable 12.0.x path, and the vector search path is a separate directory with its own README. Running vector features on a production instance means running a candidate build, and the README does not describe an upgrade path from the candidate to the final 12.1 release.

Version 12 adds temporal reasoning and raw JSON, and the Enterprise edition holds back the rest

The README says TerminusDB 12 is maintained by the Gettier team and used in production by many organizations, and that it is now engineered for financial and industrial use cases with high precision math, temporal reasoning and enterprise support. The additions it lists include Allen integer algebra and temporal reasoning, with storage of XSD time datatypes and temporal interval classification handled through datalog reasoning. Range queries over succinct data are described as having constant time retrieval over ordered data of arbitrary size. Raw JSON support stores each object once, deduplicated, with unlimited size, and the README says loads of up to 100mb JSON documents have been seen.

The retrieved README is cut off after those items, so the rest of the version 12 list is not available here.

One line in the Key Resources list defines the open-source boundary. TerminusDB Enterprise is described as adding full JSON-LD, Turtle and RDF/XML documents, enterprise features, very fast commit history queries, higher write performance, clustering, and an API for data product backup and restore beyond the command line tools. The Dockerfile is labelled a community-only build. So in the open-source edition there is no clustering and backup relies on command line tools.

Building from source needs SWI-Prolog 10.0.2, a Rust toolchain and protobuf

The Dockerfile shows what a build requires. It starts from the swipl image with SWIPL_VERSION defaulting to 10.0.2, and the Makefile has the same default, with a comment noting the previous default was 9.2.9. A pack installer stage installs git, curl, build-essential, make, libssl-dev, pkg-config, clang, m4, libgmp-dev and the protobuf compiler and headers, then runs make with distribution/Makefile.deps.

A second stage installs Rust through rustup with the minimal profile and runs cargo install for cargo-swipl. The Rust code in src/rust is built as a dynamic library for the community distribution with make DIST=community, and the Docker build runs cargo swipl test --release unless SKIP_TESTS is set to true. So the core is Prolog, with a Rust library loaded into the Prolog process.

The Makefile offers a dev target for a macOS-friendly build that does not strip libraries and turns on JWT by default so integration tests work out of the box. It also has docker and docker-debug targets, and make docker passes SWIPL_VERSION, SKIP_TESTS, DIST and the git hash as build arguments. Client libraries exist for Python and JavaScript at version 12, with community clients for Rust and Elixir.

Editorial conclusion

TerminusDB fits teams that need a system of record for linked JSON documents where every change is a commit they can diff, branch and query back in time. It does not fit anyone who needs clustering, RDF/XML or Turtle documents, or the fastest commit-history queries, because the README assigns those to the paid Enterprise edition. Before deploying, replace the insecure user-header settings in docker-compose.yml and set a real TERMINUSDB_ADMIN_PASS.

Frequently asked questions

Is there an open source alternative to Neo4j in TerminusDB?

TerminusDB is an open-source graph database under the Apache-2.0 license, with a document API for JSON and JSON-LD. The README does not compare it with Neo4j, so check that its WOQL, GraphQL and REST interfaces fit your queries.

Does TerminusDB need an admin password to start?

Yes. TERMINUSDB_ADMIN_PASS must be set in the .env file, and the compose file stops with an error when it is empty.

Which TerminusDB features need the Enterprise edition?

The README lists full JSON-LD, Turtle and RDF/XML documents, very fast commit history queries, higher write performance, clustering and an API for data product backup and restore as Enterprise features.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. terminusdb/terminusdb on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/terminusdb-terminusdb.svg)](https://hysenlabs.com/projects/terminusdb-terminusdb)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/terminusdb-terminusdb.svg)](https://hysenlabs.com/projects/terminusdb-terminusdb)

Was this useful?