Skip to content

Setting up an NTP server

By default, ntpd-rs only acts as an ntp client, and doesn't serve time on any network interface. To enable ntpd-rs as a server, the following can be added to the configuration:

listen = ""
This will cause ntpd-rs to listen on all network interfaces on udp port 123 for ntp client requests. If you only want to listen on a specific network interface, change to the ip address of that interface.

You can now configure a different machine to use your new server by adding to its configuration:

mode = "server"
address = "<your server ip>:123"

Limiting access

If you only want specific ip addresses to be able to access the server, you can configure a list of allowed clients through the allowlist mechanism. For this, edit the server configuration to look like:

listen = ""
filter = ["<allowed ipv4 1>/32", "<allowed ipv4 2>/32", "<allowed ipv6 1>/128"]
action = "ignore"
When configured this way, your server will only respond to the listed ip addresses. You can allow entire subnets at a time by specifying the size of the subnet instead of 32 or 128 after the slash.

Adding your server to the NTP pool

If your ntp server has a public IP address, you can consider making it available as part of the NTP pool. Please note that this can have significant long-term impact in terms of NTP traffic to that particular IP address. Please read the join instructions carefully before joining the pool.