Here is the post to Set up an NTP Server here to synchronize the time of BERGHOF’s Raspberry Pi-based modular CODESYS PLC.Time synchronization is very important to identify the cause of problems when they occur, so make sure all devices are synchronized to the same time.
Thank you for the equipment from BERGHOF.Also, for this article, the NTP Server is installed on Seeed Studio’s computer r1025-10.
Come on, let’s enjoy FA.

Foreword
Thank you from the bottom of my heart for visiting my technical blog and YouTube channel.
We are currently running the “Takahashi Chris” radio show with Full-san (full@桜 八重 (@fulhause) / X) which I deliver every Wednesday night.
Sharing, not hoarding, technical knowledge
We publish technical information related to factory production technology and control systems for free, through blogs and videos.
With the belief that “knowledge should be accessible to everyone,” we share practical know-how and real-world troubleshooting cases from our own field experience.
The reason we keep it all free is simple: to help reduce the number of people who struggle because they simply didn’t know.
If you’ve ever thought:
- “Will this PLC and device combination actually work?”
- “I’m having trouble with EtherCAT communication—can someone test it?”
- “I want to try this remote I/O, but we don’t have the testing environment in-house…”
Feel free to reach out!If lending equipment or sharing your configuration is possible, we’re happy to verify it and share the results through articles and videos.
(We can keep company/product names anonymous if requested.)
How can you support us?
Currently, our activities are nearly all unpaid, but creating articles and videos takes time and a proper testing environment.If you’d like to support us in continuing and expanding this content, your kind help would mean a lot.
Membership (Support our radio show)
This support plan is designed to enhance radio with Mr Full.
https://note.com/fulhause/membership/join
Amazon Gift List (equipment & books for content production)
Lists equipment and books required for content creation.
https://www.amazon.co.jp/hz/wishlist/ls/H7W3RRD7C5QG?ref_=wl_share
Patreon (Support articles & video creation)
Your small monthly support will help to improve the environment for writing and verifying articles.
https://www.patreon.com/user?u=84249391
Palpay
A little help goes a long way.
https://paypal.me/soup01threes?country.x=JP&locale.x=ja_JP
Just trying to share things that could’ve helped someone—if only they’d known.
Your support helps make knowledge sharing more open and sustainable.
Thank you for being with us.
soup01threes*gmail.com
Technical knowledge shouldn’t be kept to ourselves.
Seeed Studio Side
Install NTP Server with the following command.
sudo apt update sudo apt install ntp |
Next, edit the NTP configuration file.
sudo nano /etc/ntpsec/ntp.conf |
This is the NTP configuration file.
The following settings control which devices can access the NTP server.The settings in the figure below allow access only from the 192.168.3.0/24 network.
# Restrict default access restrict default kod nomodify notrap nopeer noquery # Allow localhost restrict 127.0.0.1 # Allow network restrict 192.168.13.0 mask 255.255.255.0 nomodify notrap |
Edit the configuration file and save the file.Then restart the NTP service to reflect the changes.
sudo systemctl restart ntp |
Once the settings are reflected, verify that other devices can connect to the NTP server.The status of the NTP server can be checked with the following command:
ntpq -p |
Berghof Side
The last step is to configure the NTP Server from the Berghof controller: go to the Berghof Web Server, enter the Check Box for Time and date>Time syncing>Use ntpdate, set the IP address of the NTP Server andSet the IP address of the NTP Server.