# Configuration

**Content**

* Configure device service IP and related service IPs
* Configure device service port
* Configure the logging location of the device server (debugging information)

## Configure IP

The device service configuration file is res/configuration.toml. Set the Device service IP to the device Host IP of the device service installed, i.e., 172.16.8.130

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-LdcUvTuwQF0oNpRitAC%2F-LdcVdI_Tfx9HnYt6l45%2Fimage.png?alt=media\&token=e640b262-9e15-4d49-bc57-6edfba481d07)

Set all other hosts to the device IP of EdgeX's microservices installed, i.e., 172.16.8.87. By default, the device service and EdgeX's microservices are installed on the same device. In this case, the Service IP and other host IPs are the same. Note that the Host IP should be physical IP, instead of localhost.

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-LdcUvTuwQF0oNpRitAC%2F-LdcVtgNjAnfMBdSHQmz%2Fimage.png?alt=media\&token=7b00c6ec-5d34-49e8-a83f-35278d6ee96b)

## Configure the Port

The port settings of the device service and other services in the configuration.toml file are preset. Please make sure the port is not blocked and duplicated.

#### Device Service Port Usage List

| Device Service | Service Port |
| -------------- | ------------ |
| IPS420         | 49983        |
| VPM            | 49984        |
| GPS            | 49985        |
| ColdChain      | 49986        |
| IPSM90         | 49987        |
| System         | 49992        |
| SSK320         | 49996        |
| Retail         | 49997        |

#### &#x20;Docker Port Usage List

| Docker Service | Port           |
| -------------- | -------------- |
| consul         | 8400/8500/8600 |
| mongo          | 27017          |
| logging        | 48061          |
| notifications  | 48060          |
| metadata       | 48081          |
| data           | 48080          |
| command        | 48082          |
| scheduler      | 48085          |
| export-client  | 48071          |
| export-distro  | 48070          |
| rulesengine    | 48075          |
| mqtt-broker    | 1883           |
| ui             | 4000           |
| dataagent      | 4001           |
| portainer      | 9000           |

## Configure the logging

The logging section in the configuration.toml file specifies the long term persistence of log messages for query/analysis/bug diagnosis.

```
[Logging]
EnableRemote = false
File = "./device-adv-ipsm90.log"
Level = "INFO"
```

The options include

* EnableRemote key: specify if the logging is at local or remote.&#x20;
* File key: specify the file path and filename to save logging entries.
* Level key; specify the logging level. The option supports ERROR, WARN, INFO, DEBUG and TRACE level.
