Install and configure the Teleport agent as a background service

Install and configure the Teleport agent as a background service
Photo by Misael Moreno / Unsplash

Install the teleport service

sudo curl https://apt.releases.teleport.dev/gpg \
-o /usr/share/keyrings/teleport-archive-keyring.asc

source /etc/os-release

echo "deb [signed-by=/usr/share/keyrings/teleport-archive-keyring.asc] \
https://apt.releases.teleport.dev/${ID?} ${VERSION_CODENAME?} stable/v11" \
| sudo tee /etc/apt/sources.list.d/teleport.list > /dev/null

sudo apt-get update

sudo apt-get install teleport -y

As a single command.

sudo curl https://apt.releases.teleport.dev/gpg -o /usr/share/keyrings/teleport-archive-keyring.asc;source /etc/os-release;echo "deb [signed-by=/usr/share/keyrings/teleport-archive-keyring.asc] \
https://apt.releases.teleport.dev/${ID?} ${VERSION_CODENAME?} stable/v11" | sudo tee /etc/apt/sources.list.d/teleport.list > /dev/null; sudo apt-get update; sudo apt-get install teleport -y

Add an app

When adding apps to Teleport, the command provided is intended for non-privileged users. The command can be modified to run and install as a super user service by making the following changes.

Replace --output=$HOME/.config/app_config.yaml with --output=file

Replace --auth-server=<teleport_server_url>:443 with proxy

Remove --data-dir=$HOME/.config

Prefix with sudo

Example:

sudo teleport configure --app-name=<app_name> --app-uri=http://<app_uri> --roles=app --token=<token> --proxy=<teleport_server_url>:443 --output=file