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
teseladb start --dbpath ./dataThe 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:
| Port | What for |
|---|---|
| 27017 | Clients and drivers, always with TLS |
| 27100 | Traffic between nodes, with mutual TLS |
| 27200 | Administration with teseladb admin, /metrics and /healthz |
| 27080 | REST API and MCP server |
Step 2. Read the root password
cat ./data/root-credentials.txtIn 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:
| File | Content | Permissions |
|---|---|---|
pki/ca.pem, pki/ca.key | Certificate authority of the cluster | 0644 / 0600 |
pki/node.pem, pki/node.key | Certificate and key of this node | 0644 / 0600 |
master.key | Master key, which encrypts the other keys | 0600 |
root-credentials.txt | The root user and its first password | 0600 |
Check that it works
curl -s -o /dev/null -w "%{http_code}\n" --cacert ./data/pki/ca.pem https://127.0.0.1:27200/healthzIt 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.