Skip to main content

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 Machine Identity agent for Teleport’s Machine ID feature. It programmatically issues and continuously renews short-lived certificates for services, workloads, and CI/CD pipelines — eliminating the need for long-lived secrets. tbot supports SPIFFE-compatible X.509 and JWT SVIDs, Kubernetes credentials, database credentials, and SSH identities.
tbot [<flags>] <command> [<args> ...]
tbot requires a bot identity registered with the cluster via tctl bots add. The bot uses a join token (or a bound keypair) to authenticate and then continuously renews its credentials.

Global Flags

These flags apply to every tbot subcommand.
FlagDefaultDescription
-c, --configno defaultPath to a configuration file.
-d, --[no-]debugfalseEnable verbose logging to stdout.
--log-formattextLog output format: json or text.
--[no-]fipsfalseEnable FIPS compliance mode. Requires a FIPS-compliant binary.
--[no-]insecurefalseTrust the Auth Server or Proxy certificate on first connect without verification. Do not use in production.

Global Environment Variables

VariableDefaultDescription
TBOT_CONFIG_PATHno defaultPath to a configuration file (same as --config).
TBOT_DEBUGfalseEnable verbose logging to stdout.

tbot start

Start tbot in daemon mode to continuously issue and renew credentials. The start command accepts a sub-service type that determines what kind of output credentials are produced.

tbot start legacy

Start tbot with a configuration file or a legacy output (certificates written to a directory).
tbot start legacy [<flags>]
FlagDefaultDescription
--proxy-serverno defaultAddress of the Teleport Proxy Server.
-a, --auth-serverno defaultAddress of the Teleport Auth Server.
--tokenno defaultBot join token or path to a file with a token value.
--join-methodno defaultJoin method: token, iam, ec2, gcp, github, gitlab, kubernetes, azure, azure_devops, bitbucket, circleci, spacelift, tpm, terraform_cloud, oracle, bound_keypair, env0.
--ca-pinno defaultCA pin to validate the Auth Server on first connect.
--destination-dirno defaultDirectory to write short-lived machine certificates.
--data-dirno defaultDirectory for internal bot state. Access should be restricted.
--certificate-ttlno defaultTTL of short-lived machine certificates.
--renewal-intervalno defaultHow often to renew certificates (must be less than the certificate TTL).
--storageno defaultA destination URI for tbot’s internal storage, e.g. file:///foo/bar.
--[no-]oneshotfalseQuit after the first credential renewal.
--[no-]scopedfalseIndicates whether tbot should run in scoped mode. Required when authenticating as a scoped Bot.
--pid-fileno defaultFull path to the PID file.
--diag-addrno defaultIf set in debug mode, a diagnostics service will listen on this address.
Example:
tbot start legacy \
  --proxy-server=teleport.example.com:443 \
  --token=/var/lib/teleport/bot-token \
  --destination-dir=/opt/machine-id \
  --data-dir=/var/lib/teleport/bot

tbot start identity

Start tbot and produce an identity output for SSH and Teleport API access.
tbot start identity --destination=DESTINATION [<flags>]
FlagDefaultDescription
--destinationno defaultDestination URI, e.g. file:///opt/machine-id.
--proxy-serverno defaultAddress of the Teleport Proxy Server.
-a, --auth-serverno defaultAddress of the Teleport Auth Server.
--tokenno defaultBot join token.
--join-methodno defaultMethod to use to join the cluster.
--join-urino defaultAn optional URI with joining and authentication parameters.
--ca-pinno defaultCA pin to validate the Auth Server on first connect.
--certificate-ttlno defaultTTL of short-lived certificates.
--renewal-intervalno defaultRenewal interval.
--clusterno defaultSpecific leaf cluster for which to issue an identity.
--[no-]allow-reissuefalseAllow reissue of the credentials output by this command.
--storageno defaultDestination URI for tbot’s internal storage.
--reader-userno defaultAdditional Linux user allowed by ACLs to read the destination.
--reader-groupno defaultAdditional Linux group allowed by ACLs to read the destination.
--registration-secretno defaultFor bound keypair joining, specifies a registration secret for use at first join.
--registration-secret-pathno defaultFor bound keypair joining, specifies a file containing a registration secret.
--static-key-pathno defaultFor bound keypair joining, specifies a path to a static key.
--[no-]oneshotfalseQuit after the first credential renewal.
--[no-]scopedfalseIndicates whether tbot should run in scoped mode.
--pid-fileno defaultFull path to the PID file.
--diag-addrno defaultIf set in debug mode, a diagnostics service will listen on this address.
Example:
tbot start identity \
  --destination=file:///opt/machine-id \
  --proxy-server=teleport.example.com:443 \
  --token=my-bot-token

tbot start database

Start tbot and produce database credentials as output.
tbot start database --destination=DESTINATION --service=SERVICE \
  --username=USERNAME --database=DATABASE [<flags>]
FlagDefaultDescription
--destinationno defaultDestination URI.
--serviceno defaultThe database service name.
--usernameno defaultThe database user name.
--databaseno defaultThe name of the database.
--formatno defaultCredential format: tls, mongo, cockroach.
--proxy-serverno defaultAddress of the Teleport Proxy Server.
--tokenno defaultBot join token.
--certificate-ttlno defaultTTL of short-lived certificates.
--renewal-intervalno defaultRenewal interval.
--storageno defaultDestination URI for tbot’s internal storage.
--reader-userno defaultAdditional Linux user allowed by ACLs to read the destination.
--reader-groupno defaultAdditional Linux group allowed by ACLs to read the destination.
Example:
tbot start database \
  --destination=file:///opt/machine-id/db \
  --service=my-postgres-db \
  --username=app_user \
  --database=production \
  --proxy-server=teleport.example.com:443 \
  --token=my-bot-token

tbot start kubernetes

Start tbot and produce Kubernetes credentials.
tbot start kubernetes --destination=DESTINATION \
  --kubernetes-cluster=KUBERNETES-CLUSTER [<flags>]
FlagDefaultDescription
--destinationno defaultDestination URI.
--kubernetes-clusterno defaultName of the Kubernetes cluster in Teleport.
--proxy-serverno defaultAddress of the Teleport Proxy Server.
--tokenno defaultBot join token.
--certificate-ttlno defaultTTL of short-lived certificates.
--renewal-intervalno defaultRenewal interval.
--storageno defaultDestination URI for tbot’s internal storage.
--reader-userno defaultAdditional Linux user allowed by ACLs to read the destination.
--reader-groupno defaultAdditional Linux group allowed by ACLs to read the destination.
--[no-]disable-exec-pluginfalseDisable the exec plugin (allows credentials to be used without the tbot binary).
--[no-]oneshotfalseQuit after the first credential renewal.
--[no-]scopedfalseIndicates whether tbot should run in scoped mode.
Example:
tbot start kubernetes \
  --destination=file:///opt/machine-id/kube \
  --kubernetes-cluster=my-cluster \
  --proxy-server=teleport.example.com:443 \
  --token=my-bot-token

tbot start workload-identity-x509

Start tbot and produce a SPIFFE-compatible X.509 SVID output.
tbot start workload-identity-x509 --destination=DESTINATION [<flags>]
FlagDefaultDescription
--destinationno defaultDestination URI, e.g. file:///opt/svid.
--name-selectorno defaultThe name of the workload identity to issue. Mutually exclusive with --label-selector.
--label-selectorno defaultA label-based selector for which workload identities to issue. Mutually exclusive with --name-selector.
--[no-]include-federated-trust-bundlesfalseIf set, include federated trust bundles in the output.
--proxy-serverno defaultAddress of the Teleport Proxy Server.
--tokenno defaultBot join token.
--join-methodno defaultMethod to use to join the cluster.
--join-urino defaultAn optional URI with joining and authentication parameters.
--ca-pinno defaultCA pin to validate the Auth Server on first connect.
--certificate-ttlno defaultTTL of short-lived certificates.
--renewal-intervalno defaultRenewal interval.
--storageno defaultDestination URI for tbot’s internal storage.
--reader-userno defaultAdditional Linux user allowed by ACLs to read the destination.
--reader-groupno defaultAdditional Linux group allowed by ACLs to read the destination.
--registration-secretno defaultFor bound keypair joining, specifies a registration secret for use at first join.
--registration-secret-pathno defaultFor bound keypair joining, specifies a file containing a registration secret.
--static-key-pathno defaultFor bound keypair joining, specifies a path to a static key.
--[no-]oneshotfalseQuit after the first credential renewal.
--[no-]scopedfalseIndicates whether tbot should run in scoped mode.
--pid-fileno defaultFull path to the PID file.
--diag-addrno defaultIf set in debug mode, a diagnostics service will listen on this address.
Example:
tbot start workload-identity-x509 \
  --destination=file:///opt/svid \
  --name-selector=my-workload-identity \
  --proxy-server=teleport.example.com:443 \
  --token=my-bot-token

tbot start workload-identity-api

Start tbot with a workload identity API listener. Compatible with the SPIFFE Workload API and Envoy SDS.
tbot start workload-identity-api --listen=LISTEN [<flags>]
FlagDefaultDescription
--listenno defaultThe address on which the workload identity API should listen. Prefixed with unix:// or tcp://.
--name-selectorno defaultThe name of the workload identity to issue. Mutually exclusive with --label-selector.
--label-selectorno defaultA label-based selector for which workload identities to issue. Mutually exclusive with --name-selector.
--proxy-serverno defaultAddress of the Teleport Proxy Server.
-a, --auth-serverno defaultAddress of the Teleport Auth Server.
--tokenno defaultBot join token.
--join-methodno defaultMethod to use to join the cluster.
--join-urino defaultAn optional URI with joining and authentication parameters.
--ca-pinno defaultCA pin to validate the Auth Server on first connect.
--certificate-ttlno defaultTTL of short-lived certificates.
--renewal-intervalno defaultRenewal interval.
--storageno defaultDestination URI for tbot’s internal storage.
--registration-secretno defaultFor bound keypair joining, specifies a registration secret for use at first join.
--registration-secret-pathno defaultFor bound keypair joining, specifies a file containing a registration secret.
--static-key-pathno defaultFor bound keypair joining, specifies a path to a static key.
--[no-]oneshotfalseQuit after the first credential renewal.
--[no-]scopedfalseIndicates whether tbot should run in scoped mode.
--pid-fileno defaultFull path to the PID file.
--diag-addrno defaultIf set in debug mode, a diagnostics service will listen on this address.
Example:
tbot start workload-identity-api \
  --listen=unix:///run/spiffe.sock \
  --name-selector=my-workload \
  --proxy-server=teleport.example.com:443 \
  --token=my-bot-token

tbot configure

Generate tbot configuration output as YAML — useful for creating a tbot.yaml file without manually writing it. The configure subcommands mirror the start subcommands but print configuration YAML instead of starting the agent.
tbot configure <service-type> [<flags>]
Available service types: legacy, identity, database, database-tunnel, kubernetes, kubernetes/v2, application, application-proxy, application-tunnel, workload-identity-x509, workload-identity-jwt, workload-identity-api, workload-identity-aws-roles-anywhere, ssh-multiplexer, noop Example — generate identity config:
tbot configure identity \
  --destination=file:///opt/machine-id \
  --proxy-server=teleport.example.com:443 \
  --token=my-bot-token
Example — write to a config file:
tbot configure legacy \
  --proxy-server=teleport.example.com:443 \
  --token=my-bot-token \
  --destination-dir=/opt/machine-id \
  --data-dir=/var/lib/teleport/bot \
  > /etc/tbot.yaml

tbot init

Initialize a destination directory for writes from a separate bot user. This sets up POSIX ACLs so that the bot can write certificates but another process (your workload) can only read them.
tbot init [<flags>]
FlagDefaultDescription
--destination-dirno defaultDirectory to write short-lived machine certificates.
--init-dirno defaultIf using a config file with multiple destinations, controls which destination dir to configure.
--bot-userno defaultEnables POSIX ACLs and defines Linux user that can read/write short-lived certificates.
--reader-userno defaultEnables POSIX ACLs and defines Linux user that will read short-lived certificates.
--ownerno defaultLinux user:group owner of the destination directory. Defaults to the Linux user running tbot if unspecified.
--[no-]cleanfalseIf set, removes unexpected files and directories from the destination.
-a, --auth-serverno defaultAddress of the Teleport Auth Server.
--proxy-serverno defaultAddress of the Teleport Proxy Server.
Example:
tbot init \
  --destination-dir=/opt/machine-id \
  --bot-user=teleport \
  --reader-user=myapp

tbot proxy

Start a local TLS proxy via tsh to connect to Teleport in single-port mode. Used when the workload needs to connect through the proxy.
tbot proxy [<flags>] [<args>...]
FlagDefaultDescription
--destination-dirno defaultThe destination directory to provide tsh for authentication.
--proxy-serverno defaultAddress of the Teleport Proxy Server in host:port form.
--clusterno defaultThe cluster name. Extracted from the certificate if unset.
Example:
tbot proxy \
  --destination-dir=/opt/machine-id \
  --proxy-server=teleport.example.com:443 \
  -- ssh --proxy my-node

tbot version

Print the version of the tbot binary.
tbot version

tbot.yaml Configuration

While tbot can be started entirely from flags, using a YAML configuration file is recommended for production deployments. Use tbot configure to generate a config file. Example tbot.yaml:
version: v2
proxy_server: teleport.example.com:443
onboarding:
  join_method: token
  token: /var/lib/teleport/bot-token
storage:
  type: directory
  path: /var/lib/teleport/bot
outputs:
  - type: identity
    destination:
      type: directory
      path: /opt/machine-id
Key configuration fields:
FieldDescription
versionConfiguration schema version (use v2).
proxy_serverAddress of the Teleport Proxy Service.
auth_serverAddress of the Teleport Auth Service (prefer proxy_server).
onboarding.join_methodHow to join the cluster: token, iam, ec2, gcp, github, gitlab, kubernetes, tpm, etc.
onboarding.tokenToken value or path to a file containing the token.
storage.typeInternal state storage type. Use directory for filesystem storage.
storage.pathPath to the internal state directory (restrict access to the bot user).
outputsList of credential output configurations.
certificate_ttlDefault TTL for issued certificates.
renewal_intervalHow often to renew certificates (must be less than certificate_ttl).
oneshotIf true, quit after the first renewal.
debugEnable verbose debug logging.
fipsEnable FIPS 140 compliance mode.
diag_addrAddress for the diagnostics/healthz endpoint.
The storage.path directory contains the bot’s private key material. Restrict access to this directory to the tbot process user only. If an attacker gains access to this directory, they can impersonate the bot.

tbot install systemd

Generate and install a systemd unit file for tbot.
tbot install systemd [<flags>]
FlagDefaultDescription
--nametbotName for the systemd unit.
--userteleportUser the service runs as.
--groupteleportGroup the service runs as.
--systemd-directory/etc/systemd/systemDirectory where the unit file is written.
--pid-fileno defaultOverrides the PID file path set in the systemd unit file.
--[no-]writefalseWrite the unit file. If not set, outputs to stdout (dry-run).
--[no-]forcefalseOverwrite existing unit file if present.
--[no-]anonymous-telemetryfalseEnable anonymous telemetry.
Example:
# Preview the unit file
tbot install systemd

# Write the unit file
tbot install systemd --write
Use tbot wait --diag-addr=127.0.0.1:3040 to block until a running tbot instance reports all services healthy — useful in initialization scripts that must wait for credentials to be available before starting a workload.

Build docs developers (and LLMs) love