February 4th, 2022

Secure developer infrastructure with Teleport and Coder

author avatar
Ben Potter
Developer Advocate


Organizations adopting DevOps continue to benefit from giving developers on-demand access to resources instead of relying on manual systems and ticket queues. In this post, we’ll discuss how Coder and Teleport work together to empower software teams.

First, let’s define these tools:

Coder allows developers to provision remote workspaces on their organization’s infrastructure. Remote workspaces speed up onboarding time, builds, tests, while still giving developers the flexibility they’re used to with local machines.

Teleport gives developers access to cloud infrastructure including Kubernetes clusters, databases, SSH servers, windows servers, and web applications in an easy and secure fashion.

How it works: automating development workflows

1) Engineers can spin up Coder workspaces with all the tools they need, defined by a container image (this can include the teleport CLI).

Launching a Coder workspace template from a git repository

2) With the Teleport CLI (tsh), it’s simple to connect a Coder workspace to other infrastructure in your clouds, such as a remote Kubernetes cluster, database, SSH servers, or a specific application. Certificates can be short-lived (for debugging) or long-lived (leverage an internal API).

Using Teleport inside a Coder workspace to access additional infrastructure

Try it yourself


To use Teleport inside a Coder workspace, you need to create a custom image. You can also set environment variables to pre-configure Teleport.

Step 1) Let’s create the Dockerfile:

FROM codercom/enterprise-base:ubuntu

USER root

# Add Teleport CLI (tsh, tctl)

RUN curl | sudo apt-key add - && \
    add-apt-repository 'deb stable main' && \
    apt-get update && \
    apt install teleport


# Add any other tools you’ll need for development here (e.g OpenJDK-11, TypeScript, kubectl)

USER coder

Step 2) Build and push the image

# this will use Docker Hub by default
docker build . -t username/coder-image
docker push username/coder-image

Step 3) Create a new Coder workspace with your image. You can connect to the workspace from a web-based or desktop IDE.

If you liked this, share on Twitter, Hacker News, LinkedIn or Reddit


Excited about Coder? Try it now
Get a demo

Install Coder on Docker

  • Be up and running in minutes
  • Free 30-day trial for 5 users
Learn more about running Coder on Docker or contact us
$ docker run --rm -it -p 7080:7080 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v ~/.coder:/var/run/coder \ codercom/coder:1.30.0

Our commitment to open source

Learn more about our projects and our commitment to the open source community.

code-server: the heart of Coder

code-server is the primary open source project we maintain. It allows developers to use a browser to access remote dev environments running VS Code. Coder builds upon the success of code-server and adds features designed for enterprise teams including support for additional IDEs and advanced security features.