Twingate

Docker Container

If you are running Twingate Connectors as containers, the instructions specific to each environment below cover how to upgrade Connectors. Please keep in mind the best practices for upgrading detailed in Upgrading Connectors to avoid downtime for your users.

Linux: Command line / EC2 / VM

The following command can be used to upgrade running Connectors that have been deployed on a host using the Docker CLI. The script automates:

  1. Pulling the latest Connector image (twingate/connector:latest)
  2. Comparing any running containers to the latest image
  3. Stopping any out of date containers, deleting them, and restarting them with the same environment variables and the latest image
curl https://binaries.twingate.com/connector/docker-upgrade.sh | bash

AWS Elastic Container Service (ECS)

In order to upgrade a a running ECS Connector service, it needs to be restarted with the "Force new deployment" option selected. You can either do this via the AWS Management Console or with the AWS CLI.

Management Console

  1. Select the name of the running Connector service in your ECS cluster and choose "Update".
  2. Select the "Force new deployment" option, then "Skip to review".
  3. Click "Update Service".

The service will automatically restart and pull the latest image. Note: the image that is pulled depends on the ECS task definition attached to the ECS service. Our recommended task definition uses a tag that will pull newer versions when available, but if you have modified the task definition, this behavior may be different in your case.

AWS CLI

The command below will force a new deployment of your running ECS Service. Note that you need the name of the ECS Service, Cluster name, and AWS region to run the command.

aws ecs update-service --region <REGION> --cluster <CLUSTER_NAME> --service <SERVICE_NAME> --force-new-deployment

Azure Container Instance

You can upgrade any Connectors running as a container instance on Azure with the following CLI command. This will automatically download the latest image.

You will need the container name and Resource Group name to run the command.

az container restart --name <CONTAINER_NAME> --resource-group <RESOURCE_GROUP>

Manual steps

To manually upgrade a connector using the Docker command line, the following steps will pull the latest Connector image. Note: you will need to reprovision the Connector in the Twingate Admin console since this method does not preserve the authentication tokens for the running Connector.

docker ps
# Copy either the container ID or name
docker container rm -f [ container ID or name ]
docker image rm -f twingate/connector

# Obtain a new Docker run command from the Twingate admin console by reprovisioning the connector
docker run ...

Updated 11 days ago


Docker Container


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.