Deploy Connector on Windows with Chocolatey

Docker on Windows OS can be a bit brittle when it comes to networking which is why Twingate has packaged the Twingate Connector as a Chocolatey Package that can be deployed easily on Windows machines.

📘

What is Chocolatey?

Chocolatey is a package manager designed for Windows Operating Systems.

🚧

Open Source Contribution

The Chocolatey Package for the Twingate Connector is an Open Source project developed and maintained outside of our product engineering teams. For support regarding this tool please visit the Github issues page.

Prerequisites

📘

Chocolatey Dependency on Multipass

Chocolatey installs Multipass locally to be able to run certain packages.

Before installing the Chocolatey Package containing the Twingate Connector, you will need to do a few things:

  1. Make sure the version of Windows is compatible with Multipass (see details here).

  2. Install Chocolatey on the Windows Machine that will run the Connector. You can simply follow the official instructions on the Chocolatey website.

  3. Update chocolatey by running the choco upgrade chocolatey command.

👍

Reboot The Windows Machine

Once Chocolatey is installed, you may need to reboot the machine. You can proceed with the following steps without rebooting but if you encounter an issue, we recommend rebooting before retrying to install the Chocolatey Package itself.

Install the Connector Package

  1. In the Twingate Admin Console, create a new Connector and generate an Access Token and a Refresh Token.

Write down the Name of the Connector along with the 2 tokens generated and your tenant name: you will be prompted for each piece of information when deploying the Chocolatey Package itself.

15101510

You can generate Tokens directly from the Connector screen.

  1. Open a Command Prompt (with Administrator Privileges) and run the following command choco install twingate-connector:

The Install process will prompt you for:

  • Connector Name - Use the Connector Name created in the previous step
  • Access Token - Use the token generated in the previous step
  • Refresh Token - Use the token generated in the previous step
  • Twingate URL - Use your tenant name or the full Twingate URL: ex mytenant or mytenant.twingate.com
c:\MyFolder>choco install twingate-connector
Chocolatey v1.1.0
Installing the following packages:
twingate-connector
By installing, you accept licenses for the packages.

twingate-connector v1.41.0
twingate-connector package files install completed. Performing other installation steps.
The package twingate-connector wants to run 'chocolateyinstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): A


Connector name:
  Confirmation (`-y`) is set.
  Respond within 30 seconds or the default selection will be chosen.
fluorescent-gecko

Twingate Access Token:
  Confirmation (`-y`) is set.
  Respond within 30 seconds or the default selection will be chosen.
************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

Twingate Refresh Token:
  Confirmation (`-y`) is set.
  Respond within 30 seconds or the default selection will be chosen.
****************************************************************************************************************************************************************************************************************************************************************************

Twingate URL:
  Confirmation (`-y`) is set.
  Respond within 30 seconds or the default selection will be chosen.
mytenant.twingate.com

Once the installation is done, it should return a message indicating that the installation was successful:

Preparing image for fluorescent-gecko

Configuring fluorescent-gecko

Starting fluorescent-gecko

Waiting for initialization to complete

Launched: fluorescent-gecko

Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The install of twingate-connector was successful.
  Software install location not explicitly set, it could be in package or
  default install location of installer.

Chocolatey installed 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Verify the Status of the Connector

You should be able to confirm the status of the Connector by running the command multipass list:

c:\aFolder>multipass list
Name                    State             IPv4             Image
fluorescent-gecko       Running           172.22.186.68    Ubuntu 22.04 LTS

You should also be able to see the Online Status of the Connector from the Admin Console:

768768

Did this page help you?