ThingWorx WebSocket-based Edge MicroServer (WS EMS) and Lua Script Resource (LSR) > Additional Configuration of WS EMS > Example Configurations > Gateway Mode with Self-Identifying Remote Things Example
  
Gateway Mode with Self-Identifying Remote Things Example
The WS EMS can be configured to run as a gateway, acting as the communication conduit and providing message relaying services for one or more remote things.
The WS EMS keeps a registry of the remote things it acts as a gateway for. You can set up the remote things to “self-identify” with the WS EMS. That is, when the remote things initialize and connect to the WS EMS, they send the information that uniquely identifies them to the WS EMS. This information is stored in the registry of the WS EMS.
For more information on configuring the auto_bind group of the configuration file, refer to the section, Configuring Automatic Binding for WS EMS and to the section, AutoBound Gateways.
The example below illustrates how to configure the WS EMS for this scenario:

{
"ws_servers": [{
"host" : "acmeServer.mycompany.com",
"port": 443
},
{
"host" : "fallback_server.somewhere.com",
"port": 443
}]
"appKey" : "some_encrypted_application_key",
"ws_connection": {
"encryption" : "ssl"
},
"auto-bind": [{
"name" : "EdgeGateway001",
"gateway": true
},
{
"name" : "EdgeThing001",
"host" : "some_ip_address",
"port": 8443
}]
}
To encrypt an Application Key, see Encrypting Application Keys, Passwords, and Passphrases.