Stack Twingate connector - JiltedGeek/Docker-Portainer GitHub Wiki

On the Twingate admin page add a new connector (via the remote network page of your network in Twingate).

Select the Docker option to generate the tokens needed in the stack below.

Add the name of your network, tokens and run the stack and that is it.

version: '3.8'

services:
  twingate-connector:
    image: twingate/connector:latest
    container_name: twingate-connector
    restart: unless-stopped
    environment:
      - TWINGATE_NETWORK= #add your networkname without quotes or other symbols, also leave out the domain suffix. Just the name is enough
      - TWINGATE_ACCESS_TOKEN= #add the token you generated, also without quotes or other symbols
      - TWINGATE_REFRESH_TOKEN= #add the last token that you generated, same way as before no quotes etc.
      - TWINGATE_LABEL_HOSTNAME=${HOSTNAME}
    cap_add:
      - NET_ADMIN
    sysctls:
      - net.ipv4.ping_group_range=0 2147483647
    security_opt:
      - no-new-privileges:true

On the twingate page you should see the connector lighting up green now.