Documentation Index
Fetch the complete documentation index at: https://mintlify.com/gravitational/teleport/llms.txt
Use this file to discover all available pages before exploring further.
tbot is the agent that powers Teleport Machine Identity. It runs on your infrastructure — on a Linux host, inside a Kubernetes pod, or within a CI/CD job — and is responsible for authenticating to the Teleport cluster and writing short-lived certificates to a configured destination. Tools like ssh, kubectl, psql, and custom applications then use those certificates to access Teleport-protected resources without ever holding a long-lived credential.
tbot is designed to be both simple and flexible. For CI/CD workloads it runs in one-shot mode, joining the cluster once, issuing credentials, and exiting immediately. For long-running processes it runs as a daemon, continuously renewing credentials before they expire.
Installation
tbot is distributed as part of the Teleport client tools package and is available for Linux, macOS, and Windows. On Linux, it is most commonly installed via the system package manager alongside the rest of the Teleport binaries.
Verify the installation:
Running tbot
Daemon mode (long-running)
In daemon modetbot continuously renews credentials in the background. This is the recommended mode for production deployments on Linux servers or Kubernetes clusters.
tbot install systemd command to generate and install a systemd unit file:
One-shot mode (CI/CD)
In one-shot modetbot authenticates, issues credentials once, and exits. Use the --oneshot flag:
The configure subcommand
Thetbot configure subcommand generates a tbot.yaml configuration file from command-line flags and writes it to stdout or a file:
The init subcommand
tbot init initializes a destination directory with the correct ownership and POSIX ACLs so that a separate process (different user) can read the credentials tbot writes:
tbot runs as the teleport user but the consuming process (e.g. Jenkins) runs as a different user.
tbot.yaml configuration
tbot is fully driven by a YAML configuration file. The file has five top-level sections: version, cluster address, onboarding (authentication), storage, and services (what credentials to produce).
Minimal example
Full example: SSH and Kubernetes outputs
This configuration runstbot as a daemon, issues SSH credentials to one directory, and issues a Kubernetes kubeconfig to another — all from a single tbot process.
Configuration reference
Top-level fields
| Field | Description |
|---|---|
version | Configuration version. Always v2 for current deployments. |
proxy_server | Address of the Teleport Proxy in host:port form. |
auth_server | Address of the Teleport Auth Server directly (not recommended; use proxy_server). |
credential_ttl | Duration for which issued certificates are valid (e.g. 1h, 5m). Maximum is 24 hours. |
renewal_interval | How often tbot renews certificates. Must be less than credential_ttl. |
oneshot | If true, tbot exits after issuing credentials once. |
debug | Enables verbose debug logging. |
storage | Configuration for tbot’s internal state (see Storage). |
onboarding | Authentication configuration (see Onboarding). |
services | List of outputs to generate (see Services). |
Onboarding
Theonboarding block controls how tbot authenticates to the Teleport cluster on first run.
github, gitlab, circleci, bitbucket, azure_devops, iam (AWS), gcp, azure, kubernetes, spacelift, terraform_cloud, tpm, token, and others.
Storage
Thestorage block configures where tbot keeps its internal renewable credentials — the bot’s own identity, not the output artifacts.
Never share the storage directory between multiple
tbot instances. Each tbot process must have its own storage path. Sharing storage causes certificate generation counter mismatches and will lock the bot.Services
Services define the credentialstbot outputs. Multiple services can be configured in a single tbot instance.
identity (SSH and Teleport API)
Writes SSH credentials and anssh_config file for use with OpenSSH or the Teleport API client.
kubernetes/v2
Writes akubeconfig.yaml file for Kubernetes cluster access. The v2 variant supports multiple clusters and dynamic label selectors.
workload-identity-api
Exposes a SPIFFE Workload API socket. Workloads connect to this socket to receive SVIDs and trust bundles.workload-identity-x509
Writes X.509 SVID files (svid.pem, svid_key.pem, ca.pem) to a directory.
workload-identity-jwt
Writes a JWT SVID to a file.Output destinations
Each service writes to a destination. Three destination types are available:Directory
Writes files to a path on the local filesystem. This is the most common destination type.readers— Additional Linux users or groups that should be granted read access via POSIX ACLs.
Kubernetes Secret
Writes credentials into a Kubernetes Secret. Useful whentbot runs as a Kubernetes deployment and other pods need to consume the credentials.
Memory
Stores credentials in memory only. They are lost whentbot exits. Suitable for short-lived CI/CD jobs.
Certificate renewal
In daemon mode,tbot renews certificates automatically. The renewal cycle is:
tbotissues credentials with a TTL ofcredential_ttl(default: 1 hour).tbotwaits forrenewal_intervalbefore renewing (default: 20 minutes, or certificate TTL divided by 3 if unset).- Before the renewal interval elapses,
tbotcontacts the Auth Service and issues fresh certificates, replacing the previous ones in the destination. - Consuming processes that watch the credential files (e.g. SPIFFE SDKs) pick up the new certificates automatically.
The maximum
credential_ttl is 24 hours. This limit exists to bound the window of exploitation if a certificate is compromised and to encourage short-lived credential practices.tbot fails to renew (e.g. due to a network partition), it keeps the existing certificates active until they expire. Once renewed, it resumes normal operation.
Key commands
tbot start
Startstbot with a configuration file:
| Flag | Description |
|---|---|
-c, --config | Path to the configuration file |
--oneshot | Exit after issuing credentials once |
--debug | Enable verbose logging |
--proxy-server | Override the proxy address from the config file |
--token | Override the join token from the config file |
--join-method | Override the join method from the config file |
--diag-addr | Address to expose diagnostics endpoint |
tbot configure
Generates atbot.yaml from flags:
identity, kubernetes, kubernetes/v2, database, application, workload-identity-api, workload-identity-x509, workload-identity-jwt, and others.
tbot init
Initializes a destination directory:tbot spiffe-inspect
Tests the SPIFFE Workload API by requesting SVIDs from the socket:tbot install systemd
Generates and installs a systemd unit file:Global flags
These flags apply to alltbot commands:
| Flag | Default | Description |
|---|---|---|
-c, --config | — | Path to the configuration file |
-d, --debug | false | Enable verbose logging to stdout |
--log-format | text | Log output format: text or json |
--fips | false | Enable FIPS compliance mode |
--insecure | false | Trust the cluster certificate on first connect without verification (do not use in production) |
Environment variables
| Variable | Description |
|---|---|
TBOT_CONFIG_PATH | Path to the configuration file (equivalent to --config) |
TBOT_DEBUG | Enable verbose logging (equivalent to --debug) |
TELEPORT_PROXY | Teleport Proxy address |
TELEPORT_BOT_TOKEN | Join token value or path to a file containing the token |
TELEPORT_AUTH_SERVER | Teleport Auth Server address (prefer TELEPORT_PROXY) |
Next steps
Getting Started
Follow a complete walkthrough: create a bot, issue certificates, and access a server from GitHub Actions.
Workload Identity
Configure tbot to expose a SPIFFE Workload API for service-to-service authentication.
Introduction
Learn the core concepts: bots, join tokens, bot instances, and artifacts.
tctl Reference
Manage bots, tokens, roles, and bot instances from the command line with tctl.
