Back to site

Timezone and NTP

Configure timezone and NTP synchronization with timedatectl and chrony on a HolyCloud VPS.

Timezone and NTP

Accurate time avoids log errors, authentication issues (Kerberos, JWT), and SSL certificate problems. On a HolyCloud Linux VPS, set the timezone with timedatectl and NTP sync with chrony (default on recent Ubuntu/Debian).

Prerequisites

  • HolyCloud VPS Ubuntu 22.04/24.04 or Debian 12
  • sudo access

Tip: use Europe/Paris for a server serving users in France.

Step 1: check current state

timedatectl status
date
ls -l /etc/localtime

Useful output fields: Time zone, System clock synchronized: yes, NTP service: active.

Step 2: set the timezone

List available zones:

timedatectl list-timezones | grep Europe/Paris

Apply Paris:

sudo timedatectl set-timezone Europe/Paris

Verify:

timedatectl show --property=Timezone --value
date

Manual alternative (symlink):

sudo ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
sudo dpkg-reconfigure -f noninteractive tzdata

Step 3: enable NTP synchronization

Enable NTP via systemd-timesyncd or chrony:

sudo timedatectl set-ntp true
timedatectl status

If System clock synchronized stays no, install chrony:

sudo apt update
sudo apt install -y chrony
sudo systemctl enable --now chrony

Step 4: configure chrony

Edit configuration:

sudo nano /etc/chrony/chrony.conf

On Debian/Ubuntu, default pools are fine:

pool 2.debian.pool.ntp.org iburst

Optional nearby servers:

server 0.fr.pool.ntp.org iburst
server 1.fr.pool.ntp.org iburst

Restart:

sudo systemctl restart chrony

Step 5: verify synchronization

chronyc tracking
chronyc sources -v

Healthy indicators:

  • Reference ID or low stratum (1–3 typical via pool)
  • Low Last offset (milliseconds)
  • chronyc sources: ^* on the active source

Force immediate correction (rarely needed):

sudo chronyc -a makestep

Hardware clock (RTC)

Sync BIOS clock with the system:

sudo timedatectl set-local-rtc 0

0 = RTC in UTC (recommended for Linux servers).

Verification

timedatectl status | grep -E 'Time zone|synchronized|NTP'
chronyc tracking | head -5

Application logs (journalctl) should show timestamps consistent with your timezone.

Need help?

Persistent drift may indicate a long VPS suspend; restart chrony or the VPS from the HolyCloud panel then recheck chronyc tracking.