Connect Edge to a distant backend on EC2 instance


I have an Edge running on localhost on my machine, and a backend running on an (AWS) EC2 instance, and I want to connect them both.

To my understanding, I have to change the URI, proxy address and proxy port on the Edge, but I’m not sure what values to put.


Hi Ghada,

in normal cases you only have to configured apikey and uri:

  • apikey depends on your Metadata authentication on the Backend
  • uri is the URI of the EdgeWebsocket-Service on your server instance, e.g. ws://ipaddress:8081.

In a productive environment you will want to use a proxy server on the Backend (e.g. NGINX) that allows you to configure TLS encryption (for a wss URI) and the normal https port 443. Example NGINX configuration can look like this:

server {
        listen 443 ssl default;

        location / {
                proxy_pass http://localhost:8081;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";

You uri would be wss://ipaddress:443 then.

Proxy configuration is only required if you do not have direct internet access from your Edge (localhost in your case).


1 Like

Hello Stefan,

Thank you for your fast response, it’s very much appreciated!
It works perfectly and the edge is connected.

1 Like