- deps.edn
 - 
com.xtdb/xtdb-core {:mvn/version "{xtdb_version}"} - pom.xml
 - 
<dependency> <groupId>com.xtdb</groupId> <artifactId>xtdb-core</artifactId> <version>{xtdb_version}</version> </dependency> 
XTDB nodes can be embedded within your JVM application, or they can be started standalone through a pre-built XTDB JAR, via Docker, or using Clojure CLI tooling.
This guide will show you how to set up an in-memory node using the core module.
You can then proceed to add further modules (eg for persistence) as required - see the documentation of the individual modules for more information.
XTDB depends on Java 8+.
com.xtdb/xtdb-core {:mvn/version "{xtdb_version}"}
<dependency>
    <groupId>com.xtdb</groupId>
    <artifactId>xtdb-core</artifactId>
    <version>{xtdb_version}</version>
</dependency>
First, add the core module as a project dependency.
We can then start up an in-memory XTDB node with:
(require '[xtdb.api :as xt])
(xt/start-node {})
link:example$test/xtdb/docs/Install.java[role=include]
link:example$test/xtdb/docs/Install.java[role=include]
link:example$test/xtdb/docs/Install.java[role=include]
link:example$test/xtdb/docs/Install.kt[role=include]
link:example$test/xtdb/docs/Install.kt[role=include]
You can start a standalone XTDB node, accessible through HTTP, using a pre-built XTDB JAR.
XTDB pre-built JARs can be found on the relevant GitHub releases page - we’ll use xtdb-in-memory.jar.
Start it in the usual way, with java -jar xtdb-in-memory.jar.
This will open an HTTP port with a console UI on port 3000 - open http://localhost:3000 in your favourite browser.
You can also build custom XTDB JARs with your choice of modules - see the XTDB build blog post for more details.
You can also start a standalone XTDB node using Docker, using:
docker run -p 3000:3000 ghcr.io/xtdb/xtdb-in-memory:1.24.0
Again, this opens up an HTTP server at http://localhost:3000.
Likewise, you can build custom XTDB Docker images - see the XTDB build blog post for more details.
Similarly, to start XTDB using Clojure’s CLI tooling:
{:deps {org.clojure/clojure {:mvn/version "1.10.3"}
        com.xtdb/xtdb-core {:mvn/version "{xtdb_version}"}
        com.xtdb/xtdb-http-server {:mvn/version "{xtdb_version}"}}}
{:xtdb.http-server/server {:port 3000}}
Then, start the node with clojure -m xtdb.main.
You can get a listing of CLI flags using clojure -m xtdb.main -h.
Can you improve this documentation? These fine people already did:
Dan Stone, James Henderson, Jeremy Taylor & Steven DeobaldEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |