Our NTP Stratum 1 Server: Raspberry Pi, GPS and Lessons Learned

By Richard DEMONGEOT | Updated 27 October 2026 (published 14 January 2026) | Reading time: 12 min
Raspberry Pi with GPS module for NTP Stratum 1 server

Our NTP Stratum 1 server: a Raspberry Pi with a GPS module and PPS signal.

In our time synchronization infrastructure, a small device has a place of its own: a Raspberry Pi equipped with a GPS receiver, whose clock is locked to the PPS signal at the microsecond level. This Stratum 1 server answers the public directly, through the NTP pool, over NTP and NTS, on IPv4 and IPv6. Our 16 Stratum 2 servers count it among their sources, alongside other public Stratum 1 servers (see the architecture, reading of 23 October 2026). You can follow the live state of the whole fleet on our status & monitoring page.

Stratum 0: Atomic Time References

Stratum 0 sources are not NTP servers per se. They are physical devices that provide an absolute time reference:

  • Atomic clocks: Use vibrations of cesium or rubidium atoms. Accuracy on the order of nanoseconds over millions of years.
  • GPS/GNSS receivers: GPS satellites carry atomic clocks and broadcast a time signal. The PPS (Pulse Per Second) signal offers sub-microsecond accuracy.
  • Radio signals: DCF77 (Germany), MSF (United Kingdom), WWVB (USA) - transmitters synchronized to national atomic clocks.

Stratum 1: Our GPS Server

Our Stratum 1 server is built around a Raspberry Pi equipped with a GPS module with PPS output. Here is how this setup works:

The GPS Receiver and the PPS Signal

The GPS module provides two types of information:

  1. NMEA data: Text sentences containing position, date and time (arriving ~175 ms late over our 9600-baud serial line)
  2. PPS signal: An electrical pulse precisely at the start of each second (accuracy < 1 microsecond)
cgps output showing GPS satellites and accuracy

Output of the cgps command on the previous installation: 12+ satellites in view, position fixed with accuracy of +/- 8 meters, time offset of 0.257ms.

The combination of both is essential: NMEA provides the current second (but with a variable delay), while PPS provides the exact instant of the second change. The NTP daemon uses NMEA to "know what time it is" and PPS to "know exactly when the second changes". In our setup, NMEA numbers the PPS pulses (lock NMEA), but chrony only accepts the PPS once independent NTS sources have confirmed the NMEA second: after a power cut, our receiver gets the second wrong until it receives the GPS-UTC offset from the satellites (details and measurements).

chrony Configuration with GPS

Since 23 October 2026, our server runs chrony (configuration below as of 27 October). The PPS is read directly by the kernel (pps-gpio driver on GPIO4, exposed as /dev/pps0), and NMEA time arrives through gpsd, which places it in shared memory (SHM):

# /etc/chrony/conf.d/refclock.conf - Stratum 1 GPS

# NMEA via gpsd (SHM 0): never selected on its own; offset 0.16 compensates
# for the delay of the sentence behind the second it announces
refclock SHM 0 refid NMEA noselect poll 4 offset 0.16 precision 1e-1 delay 0.2

# Kernel PPS: the reference, announced under the refid GPS. Numbered by NMEA,
# it starts as noselect; a service makes it selectable once at least
# 3 NTS sources confirm the NMEA second (30 min at most)
refclock PPS /dev/pps0 lock NMEA refid GPS poll 4 noselect

# /etc/chrony/sources.d/list.sources - validation servers (excerpt)
server ntp-p1.obspm.fr iburst
server ptbtime1.ptb.de iburst nts
server nts.netnod.se iburst nts
server time.cloudflare.com iburst nts
# ... and our Stratum 2 servers, which themselves follow ntp-0:
# last-resort witnesses, seen at stratum 8 at least
server ntp1.rdem-systems.be iburst nts minstratum 8

# /etc/chrony/conf.d/stratumweight.conf
# 1 s per stratum level in the choice of source (default 0.001 s)
stratumweight 1

Our Stratum 2 servers query ntp-0 over IPv6 (all but one, which the Pi ignores), so that chrony recognises its own address in their reply and discards those that follow it (details).

The NTP Peer Selection Algorithm

NTP does not simply use "the first available source". It implements a sophisticated algorithm to select the best time source among all configured ones.

Selection Metrics

For each source, NTP calculates several metrics:

Metric Description Ideal
Stratum Level in the NTP hierarchy As low as possible
Delay Round-trip time to the server < 50ms
Offset Difference between the local clock and the server < 10ms
Jitter Variation of the offset over time < 5ms
Reach Response history (octal, 377 = 8/8 successes) 377

Interpreting ntpq -c peers

ntpq -c peers output showing NTP sources

Output of ntpq -c peers on our previous installation (ntpd, until 23 October 2026): the * character indicates the selected source (here PPS), + valid candidates, - rejected outliers.

The characters at the beginning of each line have a specific meaning:

Symbol Meaning
* sys.peer - Source currently selected for synchronization
+ candidate - Valid source, candidate for replacement if the primary fails
- outlier - Source rejected by the selection algorithm (too large a deviation)
# selected - Distance too great, but otherwise acceptable
x falseticker - Source considered to be providing incorrect time

The Intersection Algorithm

NTP uses an intersection algorithm (Marzullo's algorithm) to determine which sources are consistent with each other. The principle is simple: if the majority of sources agree on a time range, the sources that deviate from it are considered "falsetickers" and excluded.

Major Reliable Time Sources Worldwide

For a robust NTP infrastructure, it is essential to know the most reliable time sources. Here are the main worldwide references:

National Metrology Institutes (Stratum 1)

Organization Country Access
PTB (Physikalisch-Technische Bundesanstalt) Germany Restricted access / on request
Paris Observatory (LNE-SYRTE) France Restricted access / on request
NIST (National Institute of Standards) USA Restricted access / on request
NPL (National Physical Laboratory) UK Restricted access / on request

NTP Services from Major Tech Companies

Provider Servers Specifics
Google Public NTP time.google.com Leap smearing (smooth leap second handling)
Cloudflare Time time.cloudflare.com NTS (Network Time Security) available
Apple time.apple.com Used by Apple devices
Meta time.facebook.com Leap smearing

The Leap Second

The leap second is a one-second adjustment applied to UTC time to compensate for the gradual slowdown of the Earth's rotation. Unlike atomic time (TAI), which flows perfectly regularly, UTC must remain synchronized with the Earth's rotation (astronomical time).

For NTP, the leap second is announced via the leap indicator in NTP packets. Stratum 1 servers connected to atomic clocks receive this information and propagate it to their clients. The ntpd and chrony daemons automatically handle the insertion of the extra second.

The pool.ntp.org Project

The NTP Pool Project is a collaborative initiative that brings together thousands of volunteer NTP servers worldwide. The addresses 0.pool.ntp.org through 3.pool.ntp.org (or their regional variants like fr.pool.ntp.org) automatically redirect to nearby and available servers.

RDEM Systems actively contributes to the French NTP pool with 16 Stratum 2 servers. You can check our reliability score on our official NTP Pool page, along with the live scoreboard of this specific Stratum 1: ntppool.org/scores/82.65.124.136.

Our Setup in Detail

Hardware Used

  • Raspberry Pi 3 Model B Rev 1.2 (1 GB RAM) in a case with heatsink
  • 52Pi GPS board (Quectel L80 module, MediaTek MT3339 chip), plugged onto the GPIO header: 9600-baud serial line and PPS on GPIO4
  • Outdoor GPS antenna, with a view of the sky
  • Ethernet connection (no WiFi to minimize latency)

Software (since 23 October 2026)

  • Raspberry Pi OS Lite Trixie (Debian 13), kernel 6.18
  • gpsd 3.25 - reads the NMEA sentences and places them in shared memory
  • chrony 4.6.1 - NTP daemon, with NTS (TCP port 4460) over IPv4 and IPv6
  • pps-gpio (kernel driver) and pps-tools - PPS signal input and checks

Until 23 October 2026, the same Raspberry Pi ran Raspbian 10 with ntpd 4.2.8, without NTS, and its PPS went through a user-space program. The change is told on the rebuild page. This Pi sits in our founder's personal lab (in French), home of both Stratum 1 servers.

Our Infrastructure Architecture

 [GPS Satellites]                 [Other public Stratum 1]
        |                          Paris Observatory,
 [PPS Signal + NMEA]               PTB, LINX
        |                                   |
 [Raspberry Pi - Stratum 1]                 |
 ntp-0-hq.rdem-systems.com                  |
 IPv4 + IPv6, NTS                           |
    |        |                              |
    |        +-------------+----------------+
    |                      |
    |      [ntp1 ... ntp16: Stratum 2, NTS]
    |                      |
    +----------+-----------+
               |
         [NTP Pool FR]
               |
         [Your servers]

Reading of 25 October 2026 around 16:40 CET (refid field of our servers): 10 of our 16 Stratum 2 servers were following this Raspberry Pi, all over its IPv6 address, 5 the Paris Observatory and 1 a public Swiss NTS server, ntp01.maillink.ch. Chrony chooses its source and may switch at any time: this reading describes a state, not a guarantee.

Why not make it the only source of the fleet? Because it would be a single point of failure: one machine, connected through a consumer access line, outside AS206014. Our Stratum 2 servers count it among several Stratum 1 servers, with no preference: each keeps the source that looks best to it, and the others take over if it goes down, as during its outage of 23 October 2026. The details of the 16 servers are on our infrastructure page.

🔍 You can validate your infrastructure's synchronization with check-ntp.net (real-time diagnostics from a third-party network)

Free NTP Tools

Three independent tools to diagnose your time synchronization:

Frequently asked questions

What is an NTP Stratum 1 server?

An NTP Stratum 1 server is a time server directly connected to a reference source (Stratum 0) such as a GPS receiver or an atomic clock. It provides time with an accuracy of a few microseconds.

What is the PPS signal in NTP?

PPS (Pulse Per Second) is an electrical signal emitted precisely at the start of each second by GPS receivers. It offers sub-microsecond accuracy and allows the clock to be synchronized with great precision.

What is a leap second?

A leap second is a one-second adjustment added to or removed from UTC time to compensate for the gradual slowdown of the Earth's rotation. When added, the clock displays 23:59:60 before moving to 00:00:00.

What is leap smearing?

Leap smearing is a technique used by Google and others to handle leap seconds. Instead of abruptly adding one second, they spread the adjustment over several hours by slightly slowing down the clock.