Quick start with one node

Start a node, find the root password and check that it answers.

You will start a TeselaDB node on your machine, read the root password and check that the node answers. A single node is already a complete database: it stores your collections, splits them into ranges and serves the drivers.

What you will get

It takes about five minutes. At the end you have a node listening on 127.0.0.1 with TLS and users on, ready for you to connect with mongosh or with the driver of your language the same way you would connect to a MongoDB server, with the same kind of connection string except for the address of the node and its CA.

Before you begin

You need the teseladb binary on your PATH. If you do not have it yet, follow Install on Linux.

Step 1. Start the node

Shell
teseladb start --dbpath ./data

The node keeps its data in the directory you give it with --dbpath; without that option it uses ./teseladb-data. When it starts it opens four ports on 127.0.0.1, each for a different kind of traffic, and the client one only accepts TLS:

PortWhat for
27017Clients and drivers, always with TLS
27100Traffic between nodes, with mutual TLS
27200Administration with teseladb admin, /metrics and /healthz
27080REST API and MCP server

Step 2. Read the root password

Shell
cat ./data/root-credentials.txt

In an empty directory, the first start creates the security of the cluster and leaves these files inside ./data. The log says where the credentials file is. It never writes its content, so the root password can only be read in that file:

FileContentPermissions
pki/ca.pem, pki/ca.keyCertificate authority of the cluster0644 / 0600
pki/node.pem, pki/node.keyCertificate and key of this node0644 / 0600
master.keyMaster key, which encrypts the other keys0600
root-credentials.txtThe root user and its first password0600

Check that it works

Shell
curl -s -o /dev/null -w "%{http_code}\n" --cacert ./data/pki/ca.pem https://127.0.0.1:27200/healthz

It should print 200. /healthz answers that way when the node is serving, and if another code comes out or the command cannot connect, the node's log says what it is missing. To try without PKI or users you can start with --insecure. The node warns about it in the log and only listens on 127.0.0.1, unless you add --insecure-allow-remote. That mode is only for your machine; on any other one, start the node with TLS and with users.

Clean up

Stop the node with Ctrl+C. If you will not use it again, delete the ./data directory.

Next steps

To connect with mongosh or with the driver of your language, follow Connect your application.