Download & Install
Install with a package manager
-
Docker
-
Windows
-
Linux
-
macOS
-
Ensure Docker is installed and running:
docker version
-
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.
-
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
-
Update the package cache:
sudo apt update
-
Ensure Java 11+ is installed:
sudo apt install openjdk-11-jre
TypeDB supports OpenJDK and Oracle JDK.
-
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 correspondingtypedb-bin
package version shown in theDepends
field.To get some other version of TypeDB installed, we can use the
apt show typedb-server=2.14.1
, where2.14.1
— version number, can be replaced with the version we need. -
Install
typedb-server
,typedb-console
, andtypedb-bin
packages using the versions from the previous command (server and console have the same version number. Here we will use2.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.
-
Ensure Homebrew is installed.
-
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.
-
Ensure Java 11+ is installed. TypeDB supports OpenJDK and Oracle JDK.
-
Get the latest release for Windows: Download
-
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 (replaceC:\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"
-
Update the
PATH
environment variable with the path to thetypedb.bat
file (replacetypedb-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.
-
Ensure Java 11+ is installed. TypeDB supports OpenJDK and Oracle JDK.
-
Get the latest release for Linux: Download
-
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
-
Add a symlink to the TypeDB executable in the
/usr/local/bin
directory (replacetypedb-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
-
Ensure Java 11+ is installed. TypeDB supports OpenJDK and Oracle JDK.
-
Get the latest release for linux: Download
-
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
-
Add a symlink to the TypeDB executable in the
/usr/local/bin
directory (replacetypedb-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.