What is an NTP server?
An NTP server is a machine that answers time requests using the Network Time Protocol. A client, such as your laptop, a VPS or a router, sends it a small packet; the server replies with timestamps; the client works out how far its own clock is off, allowing for the time the packet spent on the network, and corrects itself. Repeated every few minutes to hours, this keeps clocks across the internet within milliseconds to tens of milliseconds of each other.
The current version, NTPv4, is defined in RFC 5905. It runs over UDP on port 123, assigned by IANA. The RFC states that primary servers on modern machines are precise to within a few tens of microseconds, and that clients on fast local networks stay within a few hundred microseconds. Over the public internet the result depends on the network path; a few to a few tens of milliseconds is typical.
What is NTP and how does it work?
NTP does not simply copy the server's clock. Each exchange records four timestamps: when the client sent the request, when the server received it, when the server replied, and when the client received the reply. From these the client calculates two numbers:
- Offset: how far the local clock is ahead of or behind the server.
- Delay: the round-trip network time, so the offset can be corrected for it.
A good client asks several servers, discards ones that disagree with the majority, and then adjusts the clock gradually (slewing) rather than jumping it, so programs never see time go backwards. Large errors, such as after a server has been powered off for days, are corrected with a single step, usually at boot.
NTP always carries UTC. Your time zone, such as IST (UTC+5:30), is applied by the operating system when it displays the time, which is why setting a server's time zone and syncing its clock are separate jobs.
NTP stratum levels explained
NTP organises servers in layers called strata, by distance from a reference clock. RFC 5905 defines them as follows:
| Stratum | Meaning | Example |
|---|---|---|
| 0 | Unspecified or invalid; reference clocks are commonly described as stratum 0 | An atomic clock or GPS receiver |
| 1 | Primary server, directly connected to a reference clock | A national lab or GPS-fed time server |
| 2 to 15 | Secondary server, synchronised over NTP to the stratum above | Public pool servers, company time servers |
| 16 | Unsynchronised | A client that has lost all its sources |
A higher stratum number does not mean worse time in practice. A stratum 3 server one network hop away often gives a more accurate result than a stratum 1 server across the world, because network delay and jitter matter more than the stratum count.
NTP servers in India: NPL, NIC and the pool
Indian Standard Time is maintained by CSIR-National Physical Laboratory (NPL) in New Delhi. NPL describes its NTP service as using its UTC(NPLI) time scale as the reference, and publishes the hostnames time.nplindia.org and time.nplindia.in. The National Informatics Centre (NIC) runs samay1.nic.in and samay2.nic.in.
| Hostname | Run by | Notes |
|---|---|---|
time.nplindia.org / time.nplindia.in | CSIR-NPL | The national time reference; NPL's page describes multiple server stacks |
samay1.nic.in, samay2.nic.in | National Informatics Centre | Listed by CERT-In alongside NPL |
0.in.pool.ntp.org to 3.in.pool.ntp.org | NTP Pool Project volunteers | The India zone listed 39 active IPv4 and 35 IPv6 servers when checked |
time.windows.com | Microsoft | The default for Windows machines not joined to a domain |
There is also a compliance angle. CERT-In's cyber security directions of 28 April 2022 require service providers, intermediaries, data centres, body corporates and government organisations to synchronise their ICT system clocks with the NTP servers of NIC or NPL, or with servers traceable to them. CERT-In's FAQs (May 2022) clarify that other accurate, standard time sources may be used as long as they do not deviate from NPL and NIC, that system clocks do not have to be set to IST, and that customers using a cloud's native time service may keep using it. If your organisation falls under the directions, check with your compliance team; adding NPL or NIC as sources on your own servers is a simple way to show traceability.
Why server time sync matters
| System | What goes wrong | Tolerance |
|---|---|---|
| SSL/TLS certificates | A clock outside the certificate's validity dates makes valid certificates look expired or not yet valid | Any error past the validity window |
| Two-factor login codes (TOTP) | Codes are rejected because client and server compute different time windows | RFC 6238 uses 30-second steps by default |
| Kerberos / Active Directory logins | Authentication fails between client and domain controller | 5 minutes by default (Microsoft) |
| Logs and incident response | Events from different servers cannot be put in the right order | Ideally milliseconds |
| Cron jobs and trading bots | Scheduled tasks fire early or late, for example around the 9:15 IST market open | Depends on the job; seconds can matter |
| Databases and replication | Timestamps and time-based conflict resolution go wrong | Ideally milliseconds |
A wrong clock on a visitor's device causes the browser error explained in our guide to NET::ERR_CERT_DATE_INVALID; a wrong clock on your server causes the same class of failure for every outbound HTTPS call it makes.
How to check time sync on a Linux VPS
Start with the command that works on every systemd distribution:
timedatectl
Look for two lines: System clock synchronized: yes and NTP service: active. If either says no or inactive, the server is not keeping time.
Which time service is running depends on the release. Ubuntu's documentation says that since Ubuntu 25.10, chrony is used by default; older releases, including Ubuntu 24.04 LTS, use systemd-timesyncd, a lightweight SNTP client. On upgraded systems timesyncd may still be the active service. Debian, AlmaLinux and Rocky Linux servers commonly use chrony too.
With chrony
chronyc tracking
chronyc sources -v
tracking shows the current source, its stratum and the system time offset. In sources, the line starting with ^* is the server currently selected; ^+ marks good alternatives and ^? marks sources that are unreachable. To step a badly wrong clock immediately:
sudo chronyc makestep
With systemd-timesyncd
timedatectl timesync-status
sudo timedatectl set-ntp true
Set the time zone separately
sudo timedatectl set-timezone Asia/Kolkata
This changes only how time is displayed; NTP keeps working in UTC underneath. Our Ubuntu VPS initial setup guide includes this step.
How to point a Linux server at Indian NTP servers
For chrony, add server lines to /etc/chrony/chrony.conf on Debian and Ubuntu (/etc/chrony.conf on RHEL-family systems), or to a file in /etc/chrony/sources.d/ where your release supports it:
server time.nplindia.org iburst
server samay1.nic.in iburst
server samay2.nic.in iburst
pool in.pool.ntp.org iburst
Then restart and confirm:
sudo systemctl restart chrony
chronyc sources -v
For systemd-timesyncd, set NTP=time.nplindia.org samay1.nic.in samay2.nic.in under [Time] in /etc/systemd/timesyncd.conf and run sudo systemctl restart systemd-timesyncd. List at least three sources: with only two, a client cannot tell which one is wrong when they disagree. Some networks cannot reach every public time server, so check chronyc sources after any change and keep the pool as a fallback.
How to check and fix time on a Windows VPS
Windows uses the Windows Time service (W32Time). Open Command Prompt as administrator; Microsoft's documentation notes that w32tm needs local administrator rights:
w32tm /query /status
w32tm /query /peers
w32tm /resync
To use Indian sources instead of the default time.windows.com:
w32tm /config /manualpeerlist:"time.nplindia.org samay1.nic.in samay2.nic.in" /syncfromflags:manual /update
w32tm /resync
Microsoft recommends three or more time servers when you list several peers. A server joined to an Active Directory domain normally takes its time from the domain hierarchy instead, so change this only on stand-alone servers or on the domain's top time source. Our guide to Windows Server covers editions and roles.
Time sync inside a virtual machine
A VPS is a virtual machine, and its clock is a little different from a physical server's. On KVM, Linux guests normally use the paravirtual kvm-clock clock source, which reads time from the host efficiently and does not drift the way an emulated hardware clock can. You can see which clock source is in use with:
cat /sys/devices/system/clocksource/clocksource0/current_clocksource
A good clock source keeps time ticking smoothly, but it does not make the time correct: the guest still needs NTP to stay aligned with UTC, especially after a snapshot restore or a migration, when the guest clock can be minutes or hours behind. That is the moment chrony's step correction at boot earns its keep. If timedatectl shows synchronised after a restore, you are fine; if not, run sudo chronyc makestep.
The firewall is the other common cause of a VPS that never syncs. NTP clients send from the server to UDP port 123 on the time server, so outbound UDP 123 must be allowed. Most default firewall policies, including ufw's, allow outbound traffic, but hand-written iptables or nftables rules that drop outbound UDP will silently stop time sync.
NTP vs SNTP vs NTS
| NTP | SNTP | NTS | |
|---|---|---|---|
| What it is | The full protocol: multiple sources, filtering, gradual clock discipline | A simplified client mode of the same packets | Network Time Security: authentication added to NTP |
| Standard | RFC 5905 | Covered in RFC 5905 (previously RFC 4330) | RFC 8915 |
| Ports | UDP 123 | UDP 123 | TCP 4460 for key exchange, then UDP 123 |
| Example software | chrony, ntpd, W32Time | systemd-timesyncd, many routers | chrony (Ubuntu 25.10 and later enable it by default) |
Plain NTP is not authenticated, so an attacker on the network path could feed a server false time. NTS fixes that by using TLS to agree keys and then protecting each time packet, which is why newer distributions are switching to it.
Should you run your own NTP server?
Most single servers should be NTP clients only. Running an NTP server makes sense when you have several machines on a private network and want them all to agree with one internal source, or for devices that cannot reach the internet. With chrony, serving time to your own subnet takes one line, such as allow 10.0.0.0/24, plus a firewall rule for UDP 123 from that range only. Never leave an NTP server open to the whole internet without need; misconfigured NTP servers have been abused for amplification attacks.
Time sync on your Bigdomainhost server
A KVM VPS in Mumbai (BOM-1) or Delhi NCR (DEL-1), from ₹674 per 30 days, is a full virtual machine with root access, so it keeps its own clock and you control its time service, sources and time zone exactly as described above. The same applies to our Windows VPS, where W32Time does the job.
If your server's clock will not stay in sync, message us on WhatsApp at +91 75994 50220 at any time, or call during IST working hours.
This guide was written by the Bigdomainhost team with AI assistance; facts and commands were checked against the linked sources on 26 November 2026.
Sources (checked )
- IETF (RFC Editor): RFC 5905: Network Time Protocol Version 4
- IETF (RFC Editor): RFC 8915: Network Time Security for NTP
- IETF (RFC Editor): RFC 6238: TOTP: Time-Based One-Time Password Algorithm
- CSIR-National Physical Laboratory: NTP time dissemination service (time.nplindia.org / time.nplindia.in)
- CERT-In: Directions under section 70B(6) of the IT Act, 28 April 2022
- CERT-In: FAQs on Cyber Security Directions, May 2022 (Q40 to Q43, NIC and NPL NTP servers)
- NTP Pool Project: India zone (in.pool.ntp.org)
- Ubuntu: About time synchronisation
- Ubuntu: Synchronize time using chrony
- chrony: chronyc command documentation
- Linux kernel documentation: KVM-specific MSRs (kvmclock)
- Microsoft Learn: Windows Time service tools and settings (w32tm)
- Microsoft Learn: Maximum tolerance for computer clock synchronization (Kerberos)