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.

Prerequisites

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

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

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

  • Update chocolatey by running the choco upgrade chocolatey command.

Install the Connector Package

  • 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.

You can generate Tokens directly from the Connector screen.
2. 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:

Updating the Connector

  • Retrieve the name of the Multipass instance hosting the Connector by running the command:
multipass list
  • Apply the Connector update to the instance by running the command (and replacing <instance name> with your own):
multipass exec <instance name> -- sudo -- sh -c 'apt update && apt install -yq twingate-connector && systemctl restart twingate-connector'

Last updated 1 month ago