Download & Install

Install with a package manager

  • Docker

  • Windows

  • Linux

  • macOS

  1. Ensure Docker is installed and running:

    docker version
  2. Pull the latest TypeDB Docker image:

    docker pull vaticle/typedb:latest

No package manager option for Windows. See the Download and install manually section below.

  1. Add the TypeDB repository:

    sudo apt install software-properties-common apt-transport-https gpg
    gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 8F3DA4B5E9AEF44C
    gpg --export 8F3DA4B5E9AEF44C | sudo tee /etc/apt/trusted.gpg.d/vaticle.gpg > /dev/null
    echo "deb [ arch=all ] https://repo.vaticle.com/repository/apt/ trusty main" | sudo tee /etc/apt/sources.list.d/vaticle.list > /dev/null
  2. Update the package cache:

    sudo apt update
  3. Ensure Java 11+ is installed:

    sudo apt install openjdk-11-jre

    TypeDB supports OpenJDK and Oracle JDK.

  4. Check the latest version number for typedb-server and its dependencies:

    apt show typedb-server

    This will show a console output like this:

    Package: typedb-server
    Version: 2.15.0
    Priority: optional
    Section: contrib/devel
    Maintainer: Vaticle <[email protected]>
    Installed-Size: unknown
    Depends: openjdk-11-jre, typedb-bin (=2.12.0)
    Download-Size: 71.8 MB
    APT-Sources: https://repo.vaticle.com/repository/apt trusty/main all Packages
    Description: TypeDB (server)

    Take note of the latest typedb-server version shown in the Package field and the corresponding typedb-bin package version shown in the Depends field.

    To get some other version of TypeDB installed, we can use the apt show typedb-server=2.14.1, where 2.14.1 — version number, can be replaced with the version we need.

  5. Install typedb-server, typedb-console, and typedb-bin packages using the versions from the previous command (server and console have the same version number. Here we will use 2.15.0 for example):

    sudo apt install typedb-server=2.15.0 typedb-console=2.15.0 typedb-bin=2.12.0

The typedb-server and typedb-console packages are updated more often than typedb-bin that is why their version numbers might differ. By default, APT will look for the exact same version of typedb-bin and that will result in an error. To prevent this use apt show as shown above to invoke an apt install command with the specific version for every package.

  1. Ensure Homebrew is installed.

  2. Install TypeDB:

    brew install typedb

For the versions prior to 2.19.0 and ARM64/AArch64 architecture (e.g., a macbook with the M1 processor) we don’t recommend using Homebrew.

To install the older versions of TypeDB on ARM64 architecture, see the Running TypeDB on an M1 MacBook and use the manual installation instead.

Download and install manually

  • Docker

  • Windows

  • Linux

  • macOS

Get the docker image from the Docker hub or build it from source code with bazel.

  1. Ensure Java 11+ is installed. TypeDB supports OpenJDK and Oracle JDK.

  2. Get the latest release for Windows: Download

  3. Create a new directory for TypeDB files, and extract the .zip archive into the created directory. It can be done through GUI or using the following commands (replace C:\Users\username\Downloads\typedb-all-windows-2.21.1.zip with the path to the downloaded archive):

    mkdir "C:\Program Files\TypeDB"
    tar xvf "C:\Users\username\Downloads\typedb-all-windows-2.21.1.zip" -C "C:\Program Files\TypeDB"
  4. Update the PATH environment variable with the path to the typedb.bat file (replace typedb-all-windows-2.21.1 with the actual name of the extracted directory):

    setx /M PATH "%path%;C:\Program Files\TypeDB\typedb-all-windows-2.21.1"

It may be required to restart the terminal window for the changes to environment variables to take effect.

  1. Ensure Java 11+ is installed. TypeDB supports OpenJDK and Oracle JDK.

  2. Get the latest release for Linux: Download

  3. Create a new directory, extract the contents of the .zip archive into the created directory (replace ~/Downloads/typedb-all-linux-2.21.1.tar.gz with the path to the downloaded archive):

    mkdir /opt/typedb
    tar -xzf ~/Downloads/typedb-all-linux-2.21.1.tar.gz -C /opt/typedb
  4. Add a symlink to the TypeDB executable in the /usr/local/bin directory (replace typedb-all-linux-2.21.1 with the actual name of the extracted directory):

    ln -s /opt/typedb/typedb-all-linux-2.21.1/typedb /usr/local/bin/typedb
  1. Ensure Java 11+ is installed. TypeDB supports OpenJDK and Oracle JDK.

  2. Get the latest release for linux: Download

  3. Create a new directory, extract the contents of the .zip archive into the created directory (replace ~/Downloads/typedb-all-mac-2.21.1.zip with the path to the downloaded archive):

    sudo mkdir /opt/typedb
    unzip ~/Downloads/typedb-all-mac-2.21.1.zip -d /opt/typedb
  4. Add a symlink to the TypeDB executable in the /usr/local/bin directory (replace typedb-all-mac-2.21.1 with the actual name of the extracted directory):

    ln -s /opt/typedb/typedb-all-mac-2.21.1/typedb /usr/local/bin/typedb

Start the server

  • Docker

  • Windows

  • Linux

  • macOS

The TypeDB container exposes TypeDB’s default port, 1729, and uses its default data directory, /opt/typedb-all-linux/server/data.

The following command starts a named TypeDB container, maps its connection port to the host machine, and creates a docker volume named try-typedb mapped to the data directory — making it persistent across container restarts.

docker run --name try-typedb -d -v try-typedb-data:/opt/typedb-all-linux/server/data/ -p 1729:1729 --platform linux/amd64 vaticle/typedb:latest

The --platform linux/amd64 parameter is required to run the TypeDB container on macOS with the ARM64/AArch64 architecture. Support for linux/arm64 will be released in a future version of TypeDB.

The following variables should be noted and can be modified:

  • try-typedb — the name of the container,

  • try-typedb-data — the name of the volume to persist data,

  • latest — the version of TypeDB.

Run the following command in a terminal:

typedb server

TypeDB will run in the foreground. If the terminal running TypeDB is closed, TypeDB will be shut down. We recommend opening a new terminal to run TypeDB Console.

Alternatively, use a typedb.bat server command directly from the directory with TypeDB files to start a TypeDB server without environment variables setup.

If the following error occurs, please try to install the "C++ redistributable" by following the instructions here.

Exception in thread "main" java.lang.UnsatisfiedLinkError:
C:\Users\Vaticle\AppData\Local\Temp\ortools-java\win32-x86-64\jniortools.dll: Can't find dependent libraries

Run the following command in a terminal:

typedb server

TypeDB will run in the foreground. If the terminal running TypeDB is closed, TypeDB will be shut down. We recommend opening a new terminal to run TypeDB Console.

Run the following command in a terminal:

typedb server

TypeDB will run in the foreground. If the terminal running TypeDB is closed, TypeDB server will be shut down. We recommend opening a new terminal to run TypeDB Console.

Stop the server

  • Docker

  • Windows

  • Linux

  • macOS

docker stop try-typedb

Press Ctrl+C in the terminal running TypeDB. Confirm action if requested.

Press Ctrl+C in the terminal running TypeDB.

Press Ctrl+C in the terminal running TypeDB.

After installation

After the very first installation of TypeDB we recommend using our Quickstart guide to set up a database and try different types of queries with TypeDB Studio.

Alternatively, any other TypeDB Client can be used to connect to a TypeDB server.

To learn more about TypeDB check the Fundamentals section, starting from the Type system page.