> Source: https://docs.cyberelements.io/saas/Usage/Configuration/EdgeGateway/ConfigureAnNTPServer/

# Configuring an NTP server on the Edge Gateway

Using an NTP server allows you to synchronize the clocks on your machines with that of the NTP server.
This documentation covers how to configure an NTP server for the CyberElements Edge Gateway server.

> **Prerequisites**
>
> SSH or console access + the ability to use the superuser account on the machine are required. In addition, it is necessary to ensure that the server has UDP port 123 open to the desired NTP server(s).

The NTP configuration on the server is set in the file `/etc/systemd/timesyncd.conf`.
To do this, uncomment line 16 (remove the `#` at the beginning of the line) and specify the NTP server(s) to be configured.

> **Example**
>
> To configure the servers ntp1.systancia.local and 172.16.20.20, the file would be configured as follows:
>
> ```
> 15
> 16
> 17
> 18
> 19
> 20
> 21
> 22
> ```

> **Synchronize the system time with the Mediation Controller server**
>
> To synchronize the clock between the Edge Gateway server and the Mediation Controller server, simply enter the server `127.0.0.1` in the NTP configuration.

> **Information**
>
> More information on configuring the file can be obtained with the command `man timesyncd.conf`.

After saving the new configuration, you must restart the systemd-timesyncd service:

```
1
```
