Timeserver - Printable Version

+- OpenMarine (
+-- Forum: OpenPlotter (
+--- Forum: Feature Requests (
+--- Thread: Timeserver (/showthread.php?tid=1776)

Pages: 1 2

RE: Timeserver - ironman - 2022-04-27

(2022-04-27, 04:31 AM)SCarns Wrote:
(2022-04-27, 01:46 AM)SCarns Wrote: I did this.  After you set up SignalK to set the time in the RPi, you set up a simple NTP server to run on the Pi. Then, you give all the other devices the Pi’s IP address as the time server to connect to.  It works fine and there’s nothing else needed besides installing an NTP server onto the Pi.  I think I used Chrony, but I can’t remember. Easy to do if you google “how to set up an NTP server on raspberry pi”

This link will get you started:

But in a nutshell, here's the NTP server install:

$ sudo apt-get update
$ sudo apt-get install ntp
$ sntp --version (optional)
$ sudo nano /etc/ntp.conf (to make any needed changes to the server settings, as needed)
$ sudo service ntp restart
$ sudo service ntp status (If it says "Active", you're good)

Then you need to point your clients to the IP address of your new server. This will depend a lot on your clients systems. The above article goes into how to setup linux clients further down in the article. In Linux systems, you'll simply add the location of your new NTP server to the client's "/etc/ntp.conf" file and reboot.


Beauty, thx! I was afraid that the ntp server would interfere with timedatectl that is running in openplotter, but with your hint I just tried and at first glance it seems to happily co-exist.

I added the following line to /etc/dnsmasq.conf to have the ntp-server be advertised by DHCP:

Which seems to have worked:
Quote:pi@openplotter:~ $ sudo nmap --script broadcast-dhcp-discover -e wlan9
Starting Nmap 7.70 ( ) at 2022-04-27 22:04 CEST
Pre-scan script results:
| broadcast-dhcp-discover:
|   Response 1 of 1:
|     IP Offered:
|     DHCP Message Type: DHCPOFFER
|     Server Identifier:
|     IP Address Lease Time: 2m00s
|     Renewal Time Value: 1m00s
|     Rebinding Time Value: 1m45s
|     Subnet Mask:
|     Broadcast Address:
|     Router:
|     Domain Name Server:
|_   NTP Servers:

NTP server responds as well:
pi@openplotter:/var/log $ sudo sntp localhost
sntp 4.2.8p12@1.3728-o (1)
2022-04-27 22:19:25.568520 (-0100) +0.001661 +/- 0.473509 localhost ::1 s3 no-leap

Now the next thing is to try this at the boat where I have an Ubuntu client desperately in need of proper time. Will keep this thread posted.

RE: Timeserver - SCarns - 2022-04-29

(2022-04-27, 07:50 PM)Sailoog Wrote: I think this is something we could add to openplotter-settings app.

That would be excellent. And why not? This set up makes perfect sense on a boat where the only access to correct time in through a GPS receiver and SignalK already updates the server time with it. Would it also be possible to set up a client? For example, I have more then on Pi on board and SK is the primary. I would be cool to be able to have the second one look to the primary for time updates.

I vote +1 for that upgrade! It would be easier to set up through a software interface/settings app than to struggle through with a terminal interface trying, copying and pasting to get it to work. Thanks!

RE: Timeserver - Sailoog - 2022-05-15

ntp server is already added in openplotter-settings v3.3.1

test and report any issue here: