ThingWorx Edge MicroServer (EMS) > Configuring the EMS to Listen on IP Other Than localhost
Configuring the EMS to Listen on IP Other Than localhost
You can configure an EMS to listen on a specific IP address or on all IP addresses available on the device, using the http_server group of the configuration file. If a device has one network card and it is configured with an IP address of 11.11.11.1, the device effectively has two IP addresses, 11.11.11.1 and 127.0.0.1 (localhost). To configure the specific IP address, set the host property, as follows:
"http_server" : {
"host" : "11.11.11.1",
"port": 9010
}
In this configuration, any application must use the specific IP address to access the device. “localhost” does not work.
If a device has two or more network cards with corresponding IP addresses and you want users to access the device using any of the IP addresses available, use 0.0.0.0 for the host IP address, as follows:
"http_server" : {
"host": “0.0.0.0”,
"port": 9010
}
* 
When making a connection to a device, do NOT use the 0.0.0.0 address. Instead, you MUST use one of the actual IP addresses to connect. This configuration setting just makes it possible to connect on any of the possible IP addresses.
In either configuration, you can leave the port number as is or change it.
It is important to keep in mind that these configurations expose the REST interface to any client on the network that wants to access the EMS. To provide secure access, configure a user name and password for the HTTP server as well as SSL, as shown here:
"http_server" : {
"user": "acmeAdmin”,
"password": "some_encrypted_password",
"ssl": true
}
To encrypt the user password, refer to Encrypting Application Keys, Passwords, and Passphrases.
Was this helpful?