DropVPS Team
Writer: John hens
How to configure ntp on debian 12.11?

Table of Contents
What you will read?
To ensure accurate system time on your Debian 12 server, configuring NTP (Network Time Protocol) is essential. Debian 12 ships with systemd-timesyncd enabled by default, but for more advanced use cases or better control, switching to chrony or ntpd is recommended.
Step 1: Disable systemd-timesyncd (optional)
If you plan to use chrony or ntpd, it’s better to disable the default time service to avoid conflicts:
sudo systemctl stop systemd-timesyncd
sudo systemctl disable systemd-timesyncd
Step 2: Install the Chrony package
Chrony is the modern replacement for traditional ntpd, and it’s lightweight, fast, and accurate.
sudo apt update
sudo apt install chrony -y
Once installed, check the service status:
sudo systemctl status chrony
It should be active and running.
Step 3: Configure Chrony
Edit the configuration file:
sudo nano /etc/chrony/chrony.conf
Find the default pool entries and replace them with your preferred NTP servers. For example, you can use Debian’s NTP pool:
pool 0.debian.pool.ntp.org iburst
pool 1.debian.pool.ntp.org iburst
pool 2.debian.pool.ntp.org iburst
pool 3.debian.pool.ntp.org iburst
If your server is behind NAT or firewall, ensure that UDP port 123 is open.
sudo chronyc -a makestep
To force Chrony to sync immediately:
chronyc tracking
Optional: Add Local NTP Sources
To use a local NTP server (e.g., for internal time sync in a private network), add a line like this to chrony.conf:
server 192.168.1.1 iburst
Then restart the service:
sudo systemctl restart chrony
Step 4: Verify NTP Time Sync
Check which NTP server your system is using:
chronyc sources -v
You should see a list of peers and their synchronization status. An asterisk (*) next to a server indicates the currently selected time source.
To double-check system time and sync status:
timedatectl status
Look for System clock synchronized: yes and NTP service: active.
Alternative: Use ntpd instead of Chrony
If you prefer to use ntpd:
sudo apt install ntp -y
Edit the configuration file:
sudo nano /etc/ntp.conf
Replace the default pool servers if needed:
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
Restart the service:
sudo systemctl restart ntp
And check the sync status:
ntpq -p
On VPS systems like those provided by dropvps.com, having a reliable NTP setup is crucial for tasks like cron jobs, backups, SSL validation, and distributed system synchronization. With Chrony or NTPD correctly set up, your Debian 12 server will always keep perfect time.