Connecting Twingate to Render
by Sree Akkineni

Connecting Twingate to Render

We’re excited to announce our integration with Render, a unified cloud to build and run all your apps and websites. Render is one of the companies that is fulfilling the promise of invisible infrastructure on top of public cloud. It provides a platform that automates the operational role and enables developers to focus on building code rather than the often-repetitive tasks of setting up cloud infrastructure i.e. via providing free TLS certificates, a global CDN, DDoS protection, private networks, and auto deploys from Git.

Render allows you to quickly and automatically deploy your applications to its cloud platform; that means you can have all your web services, databases, and background workers in managed infrastructure so you don’t need to think about the difficult realities of scaling and provisioning infrastructure.

In case you’re not familiar with Twingate, Twingate is a zero trust networking platform that allows you to securely access all your internal networks without using VPNs, whether they’re in the cloud, on-prem, or at home.

Below is a step by step guide to deploying Twingate connectors to access various resources you may be hosting on Render.

How to connect Twingate to Render

Step 1 - Connect GitHub account to Render

Make sure your Render account is connected to a GitHub or GitLab repository. For this example we’ll use GitHub. You can do this when you launch your first service on Render or access linking your GitHub profile in your Account Settings panel under the profile sections. By linking your Render to your GitHub.com you can authorize Render to access your repositories.

Step 2 - Create a Remote Network

After creating a Twingate account, from the main “Network” page, add a new Remote Network and give it a name. This represents the network we’re going to connect to — in this case, that would be Render.

🎥 Video tutorial: How to create a Remote Network

If you don’t have a Twingate account already, please click here to sign up.

Step 3 - Add a Connector

The next step is to deploy a Twingate Connector, which is a piece of software that allows for secure access to your remote network and the services running on it. In addition to Render, it can also be deployed to cloud instances (AWS, GCP, Azure, etc.) as well as your home devices, including Synology NAS and Raspberry Pi.

Generate Connector tokens

In this case, we’ll set it up on Render. Click on one of the automatically generated Connectors (the names are random) and complete the following steps:

  1. Click on Docker as the deployment method
  2. Generate tokens. You’ll be prompted to sign in again, after which you should see two new tokens.
  3. Copy the automatically generated shell command. You will soon run this command on your Render instance to install the Connector there.

Step 4 - Deploy

Next, we are going to head to the Twingate Labs GitHub page to start the process of deploying our connectors to Render by clicking the “Deploy to Render” button

twingate render git launch

This will then take us to our Render service page where we will first input in a Service Group Name - we will use “tg-connector”

Next we will need to paste in some metadata variables:

  • TENANT_URL:
  • ACCESS_TOKEN:
  • REFRESH_TOKEN:

The TENANT_URL is your Twingate account name which you can get from your Twingate admin console. Mine in this example is sreetesting.twingate.com

sree testing admin

The ACCESS_TOKEN and REFRESH_TOKEN are both available in your Twingate admin console as well; you will just click the copy button on each one respectively then paste them into Render

connector token pasting access tokens

Once you have pasted in the relevant fields hit the Apply button and Render will begin to start to pull the information from the Git Repository about the Docker instance we want to create and actually run it on their cloud. That Docker container is actually running the Twingate connector software and once that connector software starts up it will connect back to our cloud.

We should get a green check mark next to Create background worker line if the connector has successfully connected to Render.

create background worker

** Important Note **

Any updates Twingate makes to our GitHub repo will automatically cause the connectors to update. If you don’t want this behavior then please clone our repository first before deploying the connectors.


Featured Articles