Deploying Teleport
Introduction
Teleport is an open-source identity-aware access platform that provides secure access to infrastructure. It replaces VPNs, shared credentials, and legacy privileged access tools with certificate-based authentication and audit logging.
Key highlights of Teleport:
- SSH Access: Secure server access with short-lived certificates
- Kubernetes Access: Native kubectl access with RBAC integration
- Database Access: Secure access to PostgreSQL, MySQL, MongoDB, and more
- Application Access: Protect internal web applications
- Session Recording: Record and audit all sessions
- SSO Integration: SAML, OIDC, and GitHub authentication
- Role-Based Access: Fine-grained access controls
- Audit Logs: Complete audit trail of all access
- MFA Support: Multi-factor authentication enforcement
- Web UI: Modern web interface for access and administration
This guide walks through deploying Teleport on Klutch.sh using Docker.
Why Deploy Teleport on Klutch.sh
Deploying Teleport on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds Teleport without complex orchestration.
Persistent Storage: Attach persistent volumes for certificates, audit logs, and session recordings.
HTTPS by Default: Secure access plane with automatic SSL certificates.
GitHub Integration: Connect your configuration repository for automatic redeployments.
Prerequisites
Before deploying Teleport on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Teleport configuration
- Basic familiarity with Docker and containerization concepts
- A domain name for your Teleport cluster
Deploying Teleport on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 3080 (web UI and proxy)
Create Your Repository
Create a new GitHub repository with a Dockerfile for Teleport:
FROM public.ecr.aws/gravitational/teleport:14
ENV TELEPORT_CLUSTER_NAME=${TELEPORT_CLUSTER_NAME}ENV TELEPORT_AUTH_TYPE=local
EXPOSE 3023EXPOSE 3024EXPOSE 3025EXPOSE 3080EXPOSE 443
VOLUME ["/var/lib/teleport"]Push to GitHub
Initialize and push your repository to GitHub with your Dockerfile.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project.
Create a New App
Within your project, create a new app and connect your GitHub repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
TELEPORT_CLUSTER_NAME | Your cluster domain (e.g., teleport.example.com) |
TELEPORT_AUTH_TYPE | local (or github, saml, oidc) |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/lib/teleport | 50 GB | Data, certificates, and session recordings |
Deploy Your Application
Click Deploy to start the build process.
Access Teleport
Once deployment completes, access the Teleport web UI at your app URL.
Configuration
Initial Setup
Create the first user:
tctl users add admin --roles=editor,access --logins=root,ubuntuConfiguring teleport.yaml
Create a configuration file:
version: v3teleport: cluster_name: teleport.example.com data_dir: /var/lib/teleport
auth_service: enabled: true listen_addr: 0.0.0.0:3025
proxy_service: enabled: true listen_addr: 0.0.0.0:3023 web_listen_addr: 0.0.0.0:3080 tunnel_listen_addr: 0.0.0.0:3024 public_addr: teleport.example.com:443
ssh_service: enabled: trueAdding Nodes
Connect servers to your Teleport cluster:
- Generate a join token
- Install Teleport agent on the node
- Configure the agent to join your cluster
- Verify node appears in the web UI
SSO Configuration
Set up single sign-on:
- Navigate to Auth Connectors in the web UI
- Add your IdP (GitHub, SAML, OIDC)
- Configure roles and claims mapping
- Test authentication flow
Access Requests
Enable just-in-time access:
- Define roles with access request capabilities
- Users request elevated access
- Admins approve or deny requests
- Access automatically expires
Additional Resources
- Teleport Official Website
- Teleport GitHub Repository
- Teleport Documentation
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Teleport on Klutch.sh gives you a secure infrastructure access platform with automatic builds, persistent storage, and secure HTTPS access. Replace VPNs and shared credentials with certificate-based authentication and complete audit logging.