Officially out now: The TypeDB 3.0 Roadmap >>

Connect to server

This guide covers connecting to TypeDB Cloud, TypeDB Community Edition and TypeDB Enterprise servers with Studio, Console, and Driver SDKs.

Understanding connections

TypeDB uses a gRPC-based protocol for external communications, including queries. TypeDB clients, like Studio and Console, as well as language-specific drivers with native APIs, have been developed to implement this protocol.

Connect to TypeDB Cloud

The TypeDB Cloud dashboard provides connection instructions.

  • Studio

  • Console

Run Studio and follow instructions below:

  1. In the TypeDB Cloud dashboard, find the cluster you want to connect, and click Connect. Copy the displayed connection URI, replacing the password placeholder with your actual database password.

  2. In Studio, click Connect to TypeDB. Paste the copied URI into the Connection URI field and click Connect.

Run TypeDB Console using the --cloud argument to set a list of addresses and ports to connect to:

Connect to TypeDB Cloud or TypeDB Enterprise
typedb console --cloud=<server-address> --username=<username> --password --tls-enabled=true

You will be prompted for a password.

For newly deployed clusters, the default username and password are admin and password. After connecting for the first time, you will be required to change the password before queries can be run.

For programmatic access, use one of the TypeDB drivers via native API:

Drivers
  • Rust

  • Python

  • Node.js

  • Java

  • C#

  • C++

  • C

Connect to TypeDB Cloud
let driver = Connection::new_cloud(&["127.0.0.1:1729"], Credential::with_tls("admin", "password", None)?)?;

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
driver = TypeDB.cloud_driver("127.0.0.1:1729", TypeDBCredential("admin", "password", tls_enabled=True))

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
let cloudDriver = await TypeDB.cloudDriver("127.0.0.1:1729", new TypeDBCredential("admin","password"));

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
TypeDBDriver driver = TypeDB.cloudDriver("127.0.0.1:1729", new TypeDBCredential("admin", "password", true ));

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
ITypeDBDriver driver = TypeDB.Driver.Drivers.CloudDriver(SERVER_ADDR, new TypeDBCredential("admin", "password", true));

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
TypeDB::Driver driver = TypeDB::Driver::cloudDriver({"127.0.0.1:1729"}, TypeDB::Credential("admin", "password", true));

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
Credential* credential = credential_new(
        CLOUD_USERNAME,
        CLOUD_PASSWORD,
        "path/to/tls_root_ca",
        true);
const char* addrs[] = {addr, NULL};
connection = connection_open_cloud(addrs, credential);
credential_drop(credential);

Where 127.0.0.1:1729 is the address and port to connect to.

After connecting to TypeDB Cloud, see how to create a database and manage sessions and transactions.

Connect to TypeDB Community Edition

A network connection to TypeDB Community Edition requires the address and port of the server to connect to.

  • Studio

  • Console

Run Studio and follow instructions below:

Click Connect to TypeDB. Your connection URI is typedb-core://<host>:<port> (e.g: typedb-core://localhost:1729).

Run Console using the --core argument to set the address and port to connect to:

Connect to TypeDB Community Edition
typedb console --core=<server-address>

The --core argument is used to set the TypeDB Community Edition server IP address and port to connect to, for example, 10.0.0.5:1729.

For programmatic access, use one of the TypeDB drivers via native API:

  • Rust

  • Python

  • Node.js

  • Java

  • C#

  • C++

  • C

Connect to TypeDB Community Edition
let driver = Connection::new_core("127.0.0.1:1729")?;

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Community Edition
driver = TypeDB.core_driver("127.0.0.1:1729")

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Community Edition
let coreDriver = await TypeDB.coreDriver("127.0.0.1:1729");

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Community Edition
TypeDBDriver driver = TypeDB.coreDriver("127.0.0.1:1729");

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Community Edition
ITypeDBDriver driver = TypeDB.Driver.Drivers.CoreDriver(SERVER_ADDR);

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Community Edition
TypeDB::Driver driver = TypeDB::Driver::coreDriver("127.0.0.1:1729");

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Community Edition
connection = connection_open_core(SERVER_ADDR);

Where 127.0.0.1:1729 is the address and port to connect to.

After connecting to TypeDB Community Edition, see how to create a database and manage sessions and transactions.

Connect to TypeDB Enterprise

A network connection to a TypeDB Enterprise cluster requires address and port of at least one server in the cluster, as well as username and password of a user.

  • Studio

  • Console

Run Studio and follow instructions below:

  1. In the TypeDB Cloud dashboard, find the cluster you want to connect, and click Connect. Copy the displayed connection URI, replacing the password placeholder with your actual database password.

  2. In Studio, click Connect to TypeDB. Paste the copied URI into the Connection URI field and click Connect.

Run TypeDB Console using the --cloud argument to set a list of addresses and ports to connect to:

Connect to TypeDB Cloud or TypeDB Enterprise
typedb console --cloud=<server-address> --username=<username> --password --tls-enabled=true

You will be prompted for a password.

For newly deployed clusters, the default username and password are admin and password. After connecting for the first time, you will be required to change the password before queries can be run.

For programmatic access, use one of the TypeDB drivers via native API:

Drivers
  • Rust

  • Python

  • Node.js

  • Java

  • C#

  • C++

  • C

Connect to TypeDB Cloud
let driver = Connection::new_cloud(&["127.0.0.1:1729"], Credential::with_tls("admin", "password", None)?)?;

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
driver = TypeDB.cloud_driver("127.0.0.1:1729", TypeDBCredential("admin", "password", tls_enabled=True))

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
let cloudDriver = await TypeDB.cloudDriver("127.0.0.1:1729", new TypeDBCredential("admin","password"));

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
TypeDBDriver driver = TypeDB.cloudDriver("127.0.0.1:1729", new TypeDBCredential("admin", "password", true ));

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
ITypeDBDriver driver = TypeDB.Driver.Drivers.CloudDriver(SERVER_ADDR, new TypeDBCredential("admin", "password", true));

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
TypeDB::Driver driver = TypeDB::Driver::cloudDriver({"127.0.0.1:1729"}, TypeDB::Credential("admin", "password", true));

Where 127.0.0.1:1729 is the address and port to connect to.

Connect to TypeDB Cloud
Credential* credential = credential_new(
        CLOUD_USERNAME,
        CLOUD_PASSWORD,
        "path/to/tls_root_ca",
        true);
const char* addrs[] = {addr, NULL};
connection = connection_open_cloud(addrs, credential);
credential_drop(credential);

Where 127.0.0.1:1729 is the address and port to connect to.

After connecting to TypeDB Enterprise, see how to create a database and manage sessions and transactions.

Learn more

See how to create a new database in TypeDB.

See how to manage sessions in TypeDB.