If your LAN takes its time from the public pool, every server, switch and camera depends on a WAN link and on whoever answers UDP 123. A Raspberry Pi GPS NTP server takes that dependency away: a receiver on the roof gives you UTC, a pulse-per-second line marks the exact edge of each second, and chrony turns the pair into a stratum 1 source your clients can poll locally.
We ran the software half of this build in November 2026 on Debian 13 with chrony 4.6.1 and gpsd 3.25, because that is where the config mistakes hide: the NMEA offset, the PPS lock and the falseticker vote. No Pi or GPS board was in the lab for this job, so a simulated receiver fed gpsd and a lab kernel module produced the pulse. The section on how we tested says exactly what that proves and what it does not.
You get the hardware picks first, then the tested chrony and gpsd setup, then what a DIY stratum 1 costs against an appliance.
Quick picks for a stratum 1 build
The board you choose decides the GPIO pin for PPS and the antenna connector, so pick it before you order anything else. These are the parts we would buy, with the trade-off each one carries:
- Best overall HAT, Uputronics GPS/RTC Expansion Board: a u-blox M8 receiver, PPS on GPIO18, an RV-3028 RTC and an SMA jack that powers an active antenna. About €49 from Uputronics, and about $62 from its US reseller Wegmatt; it is not sold on Amazon.
- Cheapest HAT, Adafruit Ultimate GPS HAT: GPS and GLONASS, PPS on GPIO4, a coin cell for the GPS module’s own clock and a u.FL connector that needs an adapter for a roof antenna. About $30 direct from Adafruit, which is where we would order it; Amazon lists it at about $45 with very little stock, check the live price.
- The antenna that matters, Adafruit 28 dB active antenna: 5 m of cable to get the puck onto a window ledge or roof, SMA plug, 3 to 5 V. About $22 at Adafruit.
- The Pi itself, CanaKit Raspberry Pi 5 Essentials Kit 8GB: board, power supply, case and card in one box, so you add the HAT and antenna. Check that the case leaves room above the header, since a HAT on a Pi 5 with a heatsink needs taller standoffs. About $230, check the live price.
- Turnkey under $400, TimeMachines TM1000A: a sealed GPS NTP box with an antenna in the carton and no Linux to maintain. About $350 direct and about $400 on Amazon, check the live price.
- Turnkey for a real network, LeoNTP 1200: PoE powered, rated for more than 100,000 replies per second and with a BNC timing output. Sold by Leo Bodnar; we could not confirm a current price.
For a homelab, the Uputronics board plus a roof antenna is the build we would run, keeping in mind that the maker sells it as test equipment rather than for production systems. The Adafruit HAT works just as well for chrony once you set its PPS pin, and it costs less. Where time is a business dependency, the appliances further down are the safer buy.
How we tested and what we did not run
Every gpsd and chrony command below ran on a Debian 13 VM named ntp-edge-01 at 10.132.0.48, with a second VM, app-lan-client at 10.132.0.50, playing the LAN client. Raspberry Pi OS is Debian based and ships the same packages, so the gpsd defaults file, the chrony drop-in directory and the chronyc output read the same on a Pi. What the VM cannot have is a GPS receiver or a GPIO pin, so we replaced both:
- NMEA source: a small Python script wrote
$GPGGAand$GPRMCsentences for each UTC second, 0.12 s after the second began, and served them on TCP port 2000. On a Pi this line is the HAT’s serial port. - PPS source: a lab-only kernel module registered
/dev/pps0and raised an assert event on every whole second of the VM’s own clock. On a Pi this is thepps-gpiooverlay reading the HAT’s PPS pin.
That proves the plumbing: gpsd to shared memory, chrony’s NMEA and PPS refclocks, the offset measurement, the lock, the falseticker behaviour and serving clients. It does not prove GPS accuracy, because our pulse came from the VM clock rather than a satellite, and the Pi steps (config.txt, the UART and the HAT wiring) were not run on hardware. The hardware specs and prices come from the makers’ pages and the retailers, checked on 21 November 2026.
PPS HATs and appliances side by side
The columns that change the build are the PPS pin, the antenna connector and whether a clock survives a power cut. Values come from each maker’s product page or datasheet.
| Product | Receiver | PPS output | Antenna connector | Clock backup | Price band |
|---|---|---|---|---|---|
| Uputronics GPS/RTC board | u-blox M8, 72 channels | GPIO18 | SMA, 3 V antenna power | RV-3028-C7 RTC, supercaps | about EUR 49 |
| Adafruit Ultimate GPS HAT | PA1616D, GPS + GLONASS | GPIO4 | u.FL | CR1220 cell for the GPS RTC | about $30 to $45 |
| TimeMachines TM1000A | GPS only | 1PPS (TTL) on the serial port | +20 dB active patch antenna included | no holdover | about $350 to $400 |
| LeoNTP 1200 | 72-channel GPS | BNC (PPS, 1 MHz or 10 MHz) | 5 m puck antenna included | holdover, about 2 ms per 24 h typical | not confirmed |
The HATs need a Pi, a power supply and an hour of setup, but they hand you a full Linux box running chrony with every knob exposed. The appliances skip the Linux work and add a vendor’s firmware between you and the config.
The Uputronics GPS/RTC board
This board was designed with PPS disciplined NTP servers in mind, and the datasheet shows it. It puts a u-blox M8 receiver on the HAT, routes its pulse to GPIO18 (the default pin for the pps-gpio overlay) and adds an RV-3028-C7 real-time clock on I2C. The RTC needs its own overlay and a few hwclock changes from the datasheet before Linux uses it, and a Pi 5 already has an onboard RTC once you fit its battery, so on a Pi 5 treat it as a bonus rather than the reason to buy.

The SMA female jack supplies 3 V, so an active roof antenna plugs straight in with no bias tee. The serial line defaults to 115200 baud, which shortens the NMEA burst each second, and twin 0.2 F supercaps hold the receiver’s state through short power cuts. The datasheet covers both Pi 4 and Pi 5 installs.
Who it’s for: anyone building a server they intend to leave running. Skip it if you want Amazon shipping, because it only sells through Uputronics and regional resellers (Wegmatt in the US, Kubii in France), and note that Uputronics sells it as test equipment, not for production use. For a timing source that matters, that disclaimer is the honest argument for one of the appliances further down.
The Adafruit Ultimate GPS HAT
Adafruit’s HAT is the one you can order from Amazon today, and since June 2021 it carries the PA1616D module (MediaTek MT3333) tracking GPS and GLONASS at up to 10 Hz with -165 dBm sensitivity. Its PPS line goes to GPIO4, not GPIO18, which is the one change it forces in the Pi config below.
The module has a patch antenna on board, which is fine on a desk by a window and poor anywhere else. For an external antenna the HAT has a u.FL socket, so budget for Adafruit’s u.FL to SMA adapter as well. A CR1220 cell keeps the GPS module’s own clock alive, though unlike the Uputronics board this is not a Linux RTC the kernel can read.
Who it’s for: US buyers and anyone who wants the build working this weekend. Skip it if the antenna has to sit on a roof, because the u.FL adapter adds a fragile joint, or if you want the RTC. About $30 at Adafruit and about $45 on Amazon, check the live price.
An active antenna with real cable
Most failed GPS time builds are antenna problems, not chrony problems. Indoors a receiver may hold a fix for minutes and then lose it, and every loss shows up as PPS gaps and a server that drops back to the pool. A powered antenna with enough cable to reach a window or the roof fixes that more cheaply than any other part.

Adafruit’s antenna gives 28 dB of gain, draws about 10 mA from 3 to 5 V and ends in an SMA plug, which fits the Uputronics jack directly and the Adafruit HAT through the u.FL adapter. You can run the cable through a window gap rather than drilling, and keep the puck clear of metal flashing and solar panels.
TimeMachines TM1000A and LeoNTP 1200
If nobody on the team wants to own a Pi, a dedicated NTP server GPS appliance is the honest answer. The TM1000A is a GPS-only NTP box that TimeMachines rates at more than 350 requests per second, with a +20 dB active patch antenna on 5 m of cable in the box. Its serial port also carries a 1PPS signal at TTL level for other gear. It has no holdover, no NTS and no PTP, and the maker’s own page steers new buyers to the TM2000C.
The LeoNTP 1200 sits a class above. Leo Bodnar specifies 30 ns RMS GPS accuracy, NTP replies better than 1 microsecond, more than 100,000 replies per second and 802.3af PoE at about 1 W, plus a BNC output that can carry PPS or a 1 MHz or 10 MHz reference. Holdover drift is typically 2 ms over 24 hours, and a 5 m puck antenna comes with it.

Who they suit: the TM1000A suits a small office that wants a box on a shelf; the LeoNTP suits a network with hundreds of clients or lab gear that wants a 10 MHz reference. Skip them if you want to read chrony’s statistics and tune the config, because neither gives you a shell. The original LeoNTP is discontinued, so make sure a listing is the 1200. The TM1000A is about $350 direct and about $400 on Amazon, check the live price.
How the pieces fit together
Two signals leave the HAT, and they do different jobs. The serial NMEA stream says which second it is, but it arrives tens to hundreds of milliseconds late and with jitter. The PPS line says exactly when the second starts, but it carries no label. chrony needs both:
- gpsd reads NMEA from the serial port and writes each timestamp into NTP shared memory segment 0.
- The kernel’s
pps-gpiodriver timestamps each pulse edge and exposes it as/dev/pps0. - chrony reads SHM 0 as a refclock called NMEA, uses it only to number the seconds, and locks the PPS refclock to it.
- chrony disciplines the Pi’s clock from PPS and answers NTP requests from the LAN on UDP 123 as stratum 1.
You should keep pool servers in the config as well. They never steer the clock while PPS is healthy, but they give chrony something to compare against and a fallback when the antenna loses sky.
The UART and PPS overlay on the Pi
This is the one part we could not run, because it needs the Pi and the HAT. Both HATs talk NMEA on GPIO14 and GPIO15, which on a Pi 5 is UART0 and appears as /dev/ttyAMA0. The Pi 5’s own debug UART is a separate connector (ttyAMA10), so nothing else competes for the header pins once the serial console is off. On a Pi 4 or Pi 3 the naming differs: ttyAMA0 is the Bluetooth UART and the header pins get the mini UART, so use /dev/serial0 in the gpsd config below or add dtoverlay=disable-bt.
Turn the login console off and the serial hardware on first. In sudo raspi-config, open Interface Options, then Serial Port, answer No to a login shell and Yes to the serial port hardware. Then open the boot config:
sudo vim /boot/firmware/config.txt
On a Pi 5, raspi-config’s serial step writes dtparam=uart0=on, which is what puts UART0 on the header pins (on a Pi 4 or Pi 3 it writes enable_uart=1 instead). Make sure that line is present and add the PPS overlay for the Uputronics board, whose pulse is on GPIO18:
dtparam=uart0=on
dtoverlay=pps-gpio,gpiopin=18
On the Adafruit HAT, change the overlay to gpiopin=4, since its PPS pad is wired to GPIO4. A wrong pin gives you a /dev/pps0 that exists but never fires, which looks exactly like an antenna with no fix. Install the tools and reboot so the overlay loads:
sudo apt update
sudo apt install -y gpsd gpsd-clients pps-tools chrony
sudo reboot
Give the receiver a clear view of the sky and a few minutes for its first fix before you test anything. The HAT’s fix LED is the quickest check that the antenna is doing its job. Testing earlier wastes time, because a receiver without a fix gives chrony nothing trustworthy to lock to, and the symptoms look like a wiring fault. The Uputronics board is slower still: its u-blox firmware holds the pulse back until it knows the leap seconds, which the datasheet says can take up to 12.5 minutes after a cold start even though position lock comes in under 30 seconds.
The PPS pulse check
Test PPS before gpsd or chrony are involved, because it is the signal everything else depends on. ppstest from pps-tools reads the device directly and prints one line per pulse:
sudo ppstest /dev/pps0
Our lab pulse produced five assert events in five seconds, each stamped a few tens of microseconds after the whole second, with the sequence number counting up by one:
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1795266342.000067849, sequence: 852 - clear 0.000000000, sequence: 0
source 0 - assert 1795266343.000055360, sequence: 853 - clear 0.000000000, sequence: 0
source 0 - assert 1795266344.000052159, sequence: 854 - clear 0.000000000, sequence: 0
source 0 - assert 1795266345.000069346, sequence: 855 - clear 0.000000000, sequence: 0
source 0 - assert 1795266346.000057283, sequence: 856 - clear 0.000000000, sequence: 0
Press Ctrl+C to stop it. If the sequence number jumps or a second goes missing, the receiver is losing its fix, and that gap will show up later as PPS dropping out of chrony’s selection. The same check rendered in the terminal looks like this.

On a Pi, the assert times only sit near the whole second once the clock is already close to UTC, so a fresh board can show large fractions. What matters at this stage is one line per second. A time_pps_fetch() error -1 (Connection timed out) line instead means no pulse: wrong pin, no fix, or the overlay did not load. On the Uputronics board, rule out the 12.5 minute cold start wait before you touch the wiring.
gpsd as the NMEA feed
gpsd owns the serial port and publishes time into NTP shared memory, where chrony picks it up. Its Debian defaults live in one file.
sudo vim /etc/default/gpsd
Point DEVICES at the HAT’s UART, add -n so gpsd polls the receiver without waiting for a client, and turn off USB hotplug since the receiver is on the header:
DEVICES="/dev/ttyAMA0"
GPSD_OPTIONS="-n"
USBAUTO="false"
In our lab the same file held DEVICES="tcp://127.0.0.1:2000" for the simulated receiver; the other two lines were identical. The section on gpsd and pseudo terminals below explains why it had to be TCP. Restart gpsd and make sure it starts at boot:
sudo systemctl enable --now gpsd
sudo systemctl restart gpsd
Three checks confirm the chain: the service is up, gpsd reports a 3D fix with a time, and shared memory unit 0 is receiving samples. ntpshmmon ships in Debian’s gpsd package itself.
systemctl status gpsd --no-pager | head -9
gpspipe -w -n 6 | grep -m1 TPV
sudo ntpshmmon -n 4
The TPV line shows "mode":3 (a 3D fix) and a UTC time, and every NTP0 sample shows the system clock at receipt (Clock) about 0.120 s after the GPS second it carries (Real). That gap is the serial delay chrony has to correct for:

Our 120 ms is the delay we built into the simulator, so do not copy it. A real receiver’s delay depends on the module, the baud rate and how many sentences it sends each second, which is why the next step measures it instead of guessing.
The NMEA offset measurement
Debian’s chrony reads every .conf file in /etc/chrony/conf.d/, so the refclocks go in their own file and the pool lines in the main config stay as they are. Create it.
sudo vim /etc/chrony/conf.d/gps-pps.conf
Start with the NMEA refclock on noselect and no offset, so chrony measures it against the pool without ever steering the clock from it. The PPS line is already in its final form apart from trust, which comes later for a reason the troubleshooting section shows. Without the offset, chrony’s NMEA row reports the raw serial delay, and that is the number we want.
refclock SHM 0 refid NMEA noselect
refclock PPS /dev/pps0 refid PPS lock NMEA poll 3 prefer
Restart chrony, wait a couple of minutes for the statistics to fill, and read the offset column.
sudo systemctl restart chrony
chronyc sources
chronyc sourcestats
NMEA sits at +120 ms with a standard deviation of 27 microseconds, which is the delay ntpshmmon showed. PPS is already selected (#*) at +477 ns, because lock NMEA only needs NMEA to number the seconds, not to be accurate:

Let it run for an hour on real hardware before you trust the number, because NMEA delay wanders more on a busy serial line than our simulator did. The figure goes into the offset option next.
The final refclock config
With the offset measured, give NMEA its correction and a generous delay so its error bound stays wide, keep it on noselect, and mark PPS as trust. The last line lets the LAN query this server. This is the file exactly as it ran on ntp-edge-01:
refclock SHM 0 refid NMEA offset 0.120 delay 0.2 poll 3 noselect
refclock PPS /dev/pps0 refid PPS lock NMEA poll 3 trust prefer
allow 10.132.0.0/20
Each option earns its place, and two of them are easy to get wrong:
- offset 0.120: your measured NMEA delay in seconds. It has to land comfortably inside chrony’s 0.4 s lock limit for
lockto number pulses correctly, but an accurate value keeps the NMEA row readable. - noselect on NMEA: NMEA is never used to set the clock, so its jitter can never pull the server off.
- lock NMEA: pairs each pulse with the second NMEA named, so PPS needs no network to know the date.
- trust: per the chrony.conf reference, a trusted source can only be rejected as a falseticker by another trusted source, so a few milliseconds of pool asymmetry cannot vote PPS out. The cost is covered in troubleshooting.
- allow 10.132.0.0/20: replace it with your LAN range. Without an
allow, no clients get access and chronyd runs purely as an NTP client.
The chrony docs mark the SHM refclock as deprecated in favour of SOCK, where gpsd writes PPS time to /run/chrony.ttyAMA0.sock and serial time to /run/chrony.clk.ttyAMA0.sock, and must start after chronyd. SHM still works in the chrony package Debian ships and is what we tested, so the config keeps it. Restart and check tracking.
sudo systemctl restart chrony
chronyc -n sources
chronyc tracking
After five minutes the server reported Reference ID PPS, stratum 1, a root delay of one nanosecond and an RMS offset of 48 microseconds, with the pool servers now marked ^? because they disagree with PPS by around 10 ms:

If you want a jitter figure, read the sourcestats row. PPS held a standard deviation of 18 microseconds over 40 seconds in our VM. That number reflects a hypervisor’s timer, and a GPIO pulse on bare metal should do better, but we did not measure one, so we are not quoting a figure for it.
Time service for the LAN
chrony already listens on UDP 123 once allow is set. If the Pi runs ufw, open the port to the LAN only, never to the internet:
sudo ufw allow from 10.132.0.0/20 to any port 123 proto udp
On each Linux client running chrony, add the Pi as a preferred source in a file of its own, so a package upgrade never overwrites it:
echo "server 10.132.0.48 iburst prefer" | sudo tee /etc/chrony/sources.d/gps-lan.sources
sudo chronyc reload sources
Leave your client’s pool lines alone, because you want them as a cross-check against the Pi. We captured the client earlier in the run, before trust was added, during a window when the server had PPS selected. After six polls, app-lan-client chose the GPS server (^*) at stratum 1 and reported itself as stratum 2, 1 microsecond from NTP time with a root delay of 0.28 ms. What the same client did after trust is in troubleshooting, and it matters.

Back on the server, chronyc clients lists who is asking and how often, and ss confirms chronyd holds UDP 123:
sudo chronyc -n clients
sudo ss -ulnp "sport = :123"
The client at 10.132.0.50 had sent eight NTP requests with none dropped, polling every 64 seconds (Int 6 means 2 to the power 6):

Point your network gear at the same address. Our Cisco NTP configuration guide covers IOS routers and switches, and configuring NTP on ESXi and vCenter covers the hypervisors. For RHEL family clients, chrony on Rocky Linux and AlmaLinux uses the same server line in /etc/chrony.conf.
Troubleshooting
These are the failures we hit in the lab, with the exact messages and what fixed each one. Two of them are lab artifacts with a Pi equivalent, and we say which, because the message is identical while the cause is not. Work through them in order, since a gpsd problem upstream makes every chrony symptom downstream look worse than it is.
chronyd: Detected falseticker PPS
Before we added trust, chrony selected PPS, then voted it out eight seconds later and fell back to a pool server, over and over. The journal shows the loop, and chronyc -n sources marks PPS with x:
sudo journalctl -u chrony --no-pager | grep -E "falseticker|Selected"
Four pool servers agreed with each other at about 5 ms behind PPS, so the majority won.

In our lab the cause was the pulse itself, which came from the VM clock rather than a satellite. On real hardware the same message appears when an asymmetric uplink makes every pool server read a few milliseconds off in the same direction. Adding trust to the PPS line fixed it in both cases, but only add it once ppstest and the NMEA offset check pass, because trust also stops chrony from catching a PPS line that really is wrong.
A client marks the GPS server with x
That cost showed up on our client later the same hour. With a self-generated pulse and trust, ntp-edge-01 drifted with its own clock, and app-lan-client’s chrony noticed:
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- 193.104.37.238 3 6 377 28 -444us[ -444us] +/- 44ms
^* 45.138.55.61 1 6 377 29 +441us[ +514us] +/- 5007us
^+ 162.159.200.1 3 6 377 29 -625us[ -552us] +/- 9529us
^- 156.106.214.52 2 6 377 29 -3173us[-3173us] +/- 50ms
^x 10.132.0.48 1 6 377 28 +14ms[ +14ms] +/- 322us
The server was 14 ms off and the client refused it, which is the behaviour you want. On a Pi, a receiver that keeps pulsing with a bad fix would look the same, and only clients with independent sources can catch it. So keep at least three pool or upstream servers on every client, and alert when chronyc tracking on the Pi stops showing PPS as the reference.
gpsd: SER: device open of /dev/ttyAMA0 failed: Permission denied(13)
On our VM this came from AppArmor: Debian’s gpsd profile allows serial devices but denies /dev/pts, and our first simulator used a pseudo terminal linked to /dev/ttyAMA0. On a Pi the same error usually means the serial console still owns the port. Check that console=serial0 is gone from /boot/firmware/cmdline.txt and that gpsd is the only process with the device open:
sudo fuser -v /dev/ttyAMA0
If a getty appears in that list, the console is still attached to the UART, so run the raspi-config serial step again and reboot. Stopping the getty by hand only lasts until the next boot, because systemd starts it again from the kernel command line.
gpsd: sourcetype 6 not using for NTP
If you test this build without hardware using a pseudo terminal, gpsd happily decodes the fix and then refuses to publish time. Its debug log (gpsd -N -D 5) says so in one line:
gpsd:PROG: NTP:SHM: ntpshm_alloc(/dev/ttyAMA0) sourcetype 6 not using for NTP.
Source type 6 is a pty, and gpsd’s ntpshm code skips it, so ntpshmmon stays empty and chrony’s NMEA row never fills. Serving the simulated NMEA over TCP (DEVICES="tcp://127.0.0.1:2000") got time into shared memory immediately. A real UART on a Pi is not affected.
What a DIY stratum 1 costs against an appliance
Using the prices we saw on 21 November 2026, a Pi build is cheaper than the cheapest appliance, but not by as much as people expect once the Pi itself is counted:
| Build | Parts | Approximate cost | What you maintain |
|---|---|---|---|
| Pi 5 + Adafruit HAT | CanaKit kit, HAT, 28 dB antenna, u.FL to SMA adapter | about $280 to $300 | Raspberry Pi OS updates, gpsd, chrony config |
| Pi 5 + Uputronics board | CanaKit kit, board, 28 dB antenna | about $300 to $320 with the US reseller price | Same, plus the RTC overlay if you use the board’s RTC |
| TimeMachines TM1000A | Box and patch antenna | about $350 to $400 | Firmware only |
| LeoNTP 1200 | Box and 5 m antenna | price not confirmed | Firmware only, PoE powered |
The table hides the variable that decides most purchases, which is whether a Pi is already sitting in a drawer. Each option wins in a different situation.
- DIY with a spare Pi: the HAT and antenna come to about $55 to $85, and you also get chrony’s statistics, logs you can alert on and a config you control, none of which the TM1000A exposes.
- TM1000A: wins when nobody wants another Linux host to patch and the client count is small.
- LeoNTP 1200: wins when clients run into the hundreds or other gear wants a BNC PPS or 10 MHz reference.
Whichever you pick, the clients should still carry pool servers, because the lab showed that only an independent source catches a stratum 1 that has gone wrong.
Before a Pi becomes the office clock, spend a little more on resilience. These are the additions we would make, cheapest first.
- Power: a UPS HAT for the Raspberry Pi keeps chrony running through short outages, so clients never see the server vanish and the PLL never restarts from scratch.
- Storage: a decent microSD card survives chrony’s drift file and the journal writing every few seconds for years.
- Console: a USB TTL serial adapter gets you in when the network config goes wrong, which matters on a box with no keyboard on a high shelf.
- A second GPS server: two stratum 1 sources let clients outvote one that fails, and this is the scaling path we would take before buying an appliance.
If the roof antenna is already up for an ADS-B feeder, put the GPS puck beside it, and see our chrony NTP server guide for Debian for the pool and access settings the main config should carry.

