HOWTO: Use TrueNAS Scale as an NTP time server

I recently came across a thread in the old TrueNAS community forums, where someone asked if SCALE could be used as an NTP server, but they didn’t receive a satisfactory response (at least in my opinion).


TL;DR: Yes, TrueNAS SCALE can be used as an NTP server

TrueNAS SCALE (at least version 25.04, which I’m currently running) is already running an NTP server out of the box. More precisely, it uses Chrony as the time synchronization service.

However, by default, access is restricted to localhost only.


How to Enable NTP Server for Your LAN

To allow other clients in your local network to access the NTP server, we need to modify the chrony config. To ensure this change persists across reboots and updates (and is included in config backups), I recommend adding a startup script.


Steps:

In the WebUI:

Go to:
System > Advanced Settings > Init/Shutdown Scripts > Add

  • Type: Command
  • When: Post Init
  • Command (replace subnet/IP values as needed):
grep -qF "allow 192.168.10.0/24" /etc/chrony/chrony.conf || echo "allow 192.168.10.0/24" >> /etc/chrony/chrony.conf; 
grep -qF "allow 192.168.30.0/24" /etc/chrony/chrony.conf || echo "allow 192.168.30.0/24" >> /etc/chrony/chrony.conf; 
systemctl restart chronyd;

This example allows access from 192.168.10.0/24 and 192.168.30.0/24.
By default if you do not specify a “bindaddress” directive, chrony will bind to all interfaces.
Currently it seems like you can only use one bindaddress directive for each ipv4 and ipv6.
See the chrony configuration documentation for more details.

To check which interfaces use port 123 run:

ss -ulpn | grep :123

on your TrueNAS


Configure Upstream NTP Servers

You can change the NTP servers TrueNAS should sync from via:
System > General Settings > NTP Servers


After Reboot: Test from Another Device

On another PC in your network, run:

ntpdate -q YOUR_TRUENAS_IP

You should see output confirming that your TrueNAS is responding with the correct time.


Useful Commands to Monitor Chrony on TrueNAS

Run these in the TrueNAS shell:

chronyc tracking
chronyc sources
chronyc sourcestats
chronyc clients

Feel free to improve upon this principle and change your chrony configuration file to your needs!

2 Likes

Thank you. This is something that I’ve been wanting for several years since my TrueNAS server runs 24×7 and I have a small number of computers that require time synchronization.