Packet

This document presents a non-Kubernetes method of installing a Transponder. Please refer to the Transponder on Kubernetes page if you want to install Transponder on Kubernetes.

In this tutorial we will deploy Transponder (a lightweight self-hosted Webhook Relay version) on Packet Cloud provider with automatically configured HTTPS using Let’s Encrypt and Cloudflare.

Step 1: Provision Server

When choosing an instance, even the smallest t1.small.x86 should be enough for most use-cases. In this tutorial we will use Ubuntu 19.04, however there’s no requirement on the OS itself, as long as it supports Docker:

Create Packet server

Step 2: Install Docker for the appropriate OS version

There are several ways to install Docker, some of them are described here: https://docs.docker.com/install/linux/docker-ce/ubuntu/.

In this case we will use a convenience script from Docker:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

<output truncated>

Now, install Docker Compose. Instructions can be found here: https://docs.docker.com/compose/install/:

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Step 3: Configure domain name

At this point it would be a good idea to create an elastic IP so later there’s less configuration on the DNS side. For the sake of simplicity, we will just use existing public IP that we have got for this machine.

Add a wildcard A record pointing at the public IP of the server.

Configure DNS

Once it’s created, you can also get your Cloudflare API key so

If you are not going to use HTTP/HTTPS tunnels and are only going to use webhook forwarding functionality, you can create a non wildcard record.

Step 4: Deploy Transponder

Let’s get an example configuration from our Transponder examples repository:

mkdir -p /opt/transponder
cd /opt/transponder

curl https://raw.githubusercontent.com/webhookrelay/transponder-deployment/master/cloudflare-dns/docker-compose.yaml > docker-compose.yaml

Now, get an .env example file:

curl https://raw.githubusercontent.com/webhookrelay/transponder-deployment/master/cloudflare-dns/.env.example > .env

and populate it:

vim .env

Step 5: Start it

docker-compose up -d

To login, pick any subdomain under the wildcard and HTTPS_API_PORT as port, in our case since we set HTTPS_API_PORT=9302, the URL to connect to the admin dashboard will be: https://my.transponder.synpse.net:9302/login:

Login

Client configuration

You will need to specify several details for the relay client so it can connect to this custom webhook server. Create a new file called transponder.sh and specify these variables:

export RELAY_API_ADDRESS=https://my.transponder.synpse.net:9302
export RELAY_KEY=cbcf9ee2-7fd2-4e2c-aa59-9c3fc441fdd4
export RELAY_SECRET=change-me
export RELAY_GRPC_API_ADDRESS=your-server-domain:9300
export RELAY_TUNNEL_API_ADDRESS=tunnel.transponder.synpse.net:443

Source them (or just copy & paste it to your terminal):

source transponder.sh

Now, to create a new tunnel:

relay connect --host foo.transponder.synpse.net --crypto flexible http://localhost:4000
Connecting:
http://foo.transponder.synpse.net <----> http://localhost:4000
Using default region from settings
2019-11-24 23:39:01.141 INFO client starting {"version": "develop", "tunnels": ["c8acae3d-b4c0-4be4-bb1b-c2d970948ed8"]}
2019-11-24 23:39:01.142 INFO initiating tunnel connection
2019-11-24 23:39:01.142 INFO dialing server... {"network": "tcp", "addr": "tunnel.transponder.synpse.net:443"}
2019-11-24 23:39:01.245 INFO adding HTTP tunnel foo.transponder.synpse.net ---> http://localhost:4000
2019-11-24 23:39:01.245 INFO adding WS tunnel foo.transponder.synpse.net ---> localhost:4000
2019-11-24 23:39:01.245 INFO tunnel proxy configuration updated

You will also be able to see the tunnel in the UI:

Tunnel in the UI