{"id":11123,"date":"2025-03-31T06:29:35","date_gmt":"2025-03-31T06:29:35","guid":{"rendered":"https:\/\/mainvps.net\/blog\/?p=11123"},"modified":"2025-04-15T10:50:36","modified_gmt":"2025-04-15T10:50:36","slug":"install-and-configure-ntp-chrony-on-almalinux-9","status":"publish","type":"post","link":"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/","title":{"rendered":"How to Install and Configure NTP (Chrony) on AlmaLinux 9"},"content":{"rendered":"\n<p>It is the Network Time Protocol (NTP) is used to ensure that the clocks of computers are synchronized on networks. It helps ensure that all systems have an accurate time. This is crucial for authentication, logging and system operation. In this guide you will learn How to Install and Configure NTP (Chrony) on AlmaLinux 9<\/p>\n\n\n\n<p>For AlmaLinux 9, Chrony is the default implementation of NTP services. It&#8217;s a light and more efficient alternative to the conventional NTPd daemon. It is specifically made to function efficiently in different conditions, including those with unstable connection to networks.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#Why_Use_Chrony_Over_Traditional_NTP\" >Why Use Chrony Over Traditional NTP?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#Step-by-Step_Guide_to_Installing_and_Configuring_Chrony_on_AlmaLinux_9\" >Step-by-Step Guide to Installing and Configuring Chrony on AlmaLinux 9<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#1_Prerequisites_for_Installing_Chrony_on_AlmaLinux_9\" >1. Prerequisites for Installing Chrony on AlmaLinux 9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#2_Installing_Chrony_on_AlmaLinux_9\" >2. Installing Chrony on AlmaLinux 9<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#3_Configuring_Chrony_for_NTP_Synchronization\" >3. Configuring Chrony for NTP Synchronization<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#4_Setting_the_Timezone_to_AmericaNew_York\" >4. Setting the Timezone to America\/New_York<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#5_Enabling_and_Starting_Chrony_Service\" >5. Enabling and Starting Chrony Service<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#6_Verifying_Time_Synchronization\" >6. Verifying Time Synchronization<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#Troubleshooting_Common_Issues\" >Troubleshooting Common Issues<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#Conclusion_and_Final_Thoughts\" >Conclusion and Final Thoughts<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#FAQs\" >FAQs<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#1_What_is_the_difference_between_Chrony_and_ntpd\" >1. What is the difference between Chrony and ntpd?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#2_How_do_I_check_if_my_system_time_is_synchronized\" >2. How do I check if my system time is synchronized?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#3_Can_I_use_Chrony_as_an_NTP_server\" >3. Can I use Chrony as an NTP server?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#4_How_do_I_restart_the_Chrony_service\" >4. How do I restart the Chrony service?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#5_What_should_I_do_if_Chrony_is_not_syncing_time\" >5. What should I do if Chrony is not syncing time?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#6_How_do_I_force_Chrony_to_update_the_time_immediately\" >6. How do I force Chrony to update the time immediately?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#7_How_do_I_check_which_NTP_servers_my_system_is_using\" >7. How do I check which NTP servers my system is using?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#8_Can_I_use_Chrony_to_synchronize_time_without_an_internet_connection\" >8. Can I use Chrony to synchronize time without an internet connection?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#9_How_do_I_check_the_accuracy_of_my_systems_time_synchronization\" >9. How do I check the accuracy of my system\u2019s time synchronization?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#10_How_do_I_disable_Chrony_if_I_want_to_use_a_different_time_synchronization_method\" >10. How do I disable Chrony if I want to use a different time synchronization method?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#11_How_do_I_allow_other_machines_to_sync_with_my_Chrony_server\" >11. How do I allow other machines to sync with my Chrony server?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#12_What_should_I_do_if_my_system_is_not_syncing_even_after_setting_up_Chrony\" >12. What should I do if my system is not syncing even after setting up Chrony?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#13_Can_I_configure_Chrony_to_use_a_specific_NTP_server_instead_of_a_pool\" >13. Can I configure Chrony to use a specific NTP server instead of a pool?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#14_Does_Chrony_work_with_virtual_machines\" >14. Does Chrony work with virtual machines?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#15_What_is_the_difference_between_iburst_and_burst_in_Chrony_configuration\" >15. What is the difference between iburst and burst in Chrony configuration?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#16_How_do_I_configure_Chrony_to_use_a_local_clock_instead_of_external_NTP_servers\" >16. How do I configure Chrony to use a local clock instead of external NTP servers?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#17_What_is_the_stratum_level_in_NTP_and_why_is_it_important\" >17. What is the stratum level in NTP, and why is it important?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#18_Can_I_configure_Chrony_to_sync_time_only_at_boot_and_not_continuously\" >18. Can I configure Chrony to sync time only at boot and not continuously?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#19_What_ports_does_Chrony_use_for_NTP_synchronization\" >19. What ports does Chrony use for NTP synchronization?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/#20_How_do_I_limit_access_to_my_Chrony_NTP_server_to_specific_clients\" >20. How do I limit access to my Chrony NTP server to specific clients?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Use_Chrony_Over_Traditional_NTP\"><\/span><strong>Why Use Chrony Over Traditional NTP?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Chrony offers several advantages over the traditional <strong>ntpd<\/strong> service:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Faster Synchronization:<\/strong> Chrony quickly adjusts the system clock, even if there are significant differences.<\/li>\n\n\n\n<li><strong>Better Performance in Unstable Networks:<\/strong> It handles intermittent network connections more efficiently.<\/li>\n\n\n\n<li><strong>Supports Servers and Clients:<\/strong> It can be used both as an NTP client and a server.<\/li>\n\n\n\n<li><strong>Lower Resource Usage:<\/strong> Chrony consumes fewer system resources compared to ntpd.<\/li>\n<\/ul>\n\n\n\n<p>For these reasons, Chrony is the recommended choice for NTP synchronization on <strong>AlmaLinux 9<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-by-Step_Guide_to_Installing_and_Configuring_Chrony_on_AlmaLinux_9\"><\/span>Step-by-Step Guide to Installing and Configuring Chrony on AlmaLinux 9<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Prerequisites_for_Installing_Chrony_on_AlmaLinux_9\"><\/span>1. <strong>Prerequisites for Installing Chrony on AlmaLinux 9<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Before proceeding with the installation, ensure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A system running <strong>AlmaLinux 9<\/strong><\/li>\n\n\n\n<li>A user account with <strong>sudo<\/strong> privileges<\/li>\n\n\n\n<li>An active internet connection<\/li>\n<\/ul>\n\n\n\n<p>To check if Chrony is already installed, run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>chronyd --version<br><\/pre>\n\n\n\n<p>If it returns a version number, Chrony is installed; otherwise, follow the steps below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Installing_Chrony_on_AlmaLinux_9\"><\/span><strong>2. Installing Chrony on AlmaLinux 9<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To install <strong>Chrony<\/strong>, use the <strong>dnf<\/strong> package manager:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo dnf install chrony -y<br><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"699\" src=\"https:\/\/mainvps.net\/blog\/wp-content\/uploads\/2025\/03\/almalinux.webp\" alt=\"install chrony almalinux\" class=\"wp-image-11176\" style=\"width:582px;height:auto\" srcset=\"https:\/\/mainvps.net\/blog\/wp-content\/uploads\/2025\/03\/almalinux.webp 728w, https:\/\/mainvps.net\/blog\/wp-content\/uploads\/2025\/03\/almalinux-300x288.webp 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/figure>\n\n\n\n<p>After installation, verify the installation:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>chronyc tracking<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"852\" height=\"438\" src=\"https:\/\/mainvps.net\/blog\/wp-content\/uploads\/2025\/03\/Untitled-design-5.webp\" alt=\"almalinux 9 chronyc tracking\" class=\"wp-image-11179\" srcset=\"https:\/\/mainvps.net\/blog\/wp-content\/uploads\/2025\/03\/Untitled-design-5.webp 852w, https:\/\/mainvps.net\/blog\/wp-content\/uploads\/2025\/03\/Untitled-design-5-300x154.webp 300w, https:\/\/mainvps.net\/blog\/wp-content\/uploads\/2025\/03\/Untitled-design-5-768x395.webp 768w\" sizes=\"auto, (max-width: 852px) 100vw, 852px\" \/><\/figure>\n\n\n\n<p>If installed correctly, you should see details about the current NTP synchronization.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Configuring_Chrony_for_NTP_Synchronization\"><\/span>3. <strong>Configuring Chrony for NTP Synchronization<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Once Chrony is installed, configure it to use the appropriate <strong>NTP servers<\/strong>.<\/p>\n\n\n\n<p>1. <strong>Edit the Chrony configuration file:<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo nano \/etc\/chrony.conf<\/pre>\n\n\n\n<p>2. <strong>Replace the default NTP servers with ones closer to America\/New_York.<\/strong><br>Find and modify the following lines: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">plaintext<br>pool 0.north-america.pool.ntp.org iburst <br>pool 1.north-america.pool.ntp.org iburst <br>pool 2.north-america.pool.ntp.org iburst <br>pool 3.north-america.pool.ntp.org iburst<\/pre>\n\n\n\n<p><strong>Save and exit<\/strong> (Press <code>CTRL+X<\/code>, then <code>Y<\/code>, and <code>Enter<\/code>).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Setting_the_Timezone_to_AmericaNew_York\"><\/span><strong>4. Setting the Timezone to America\/New_York<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To ensure your server operates in the correct timezone:<\/p>\n\n\n\n<p>1. <strong>Check the current timezone:<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br><code>timedatectl status<\/code><\/pre>\n\n\n\n<p>2. <strong>Set the timezone to America\/New_York:<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo timedatectl set-timezone America\/New_York<\/pre>\n\n\n\n<p>3. <strong>Verify the change:<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>imedatectl status<\/pre>\n\n\n\n<p>Your system should now display the correct timezone.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Enabling_and_Starting_Chrony_Service\"><\/span><strong>5. Enabling and Starting Chrony Service<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>After configuration, enable and start the <strong>Chrony<\/strong> service:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo systemctl enable --now chronyd<br><\/pre>\n\n\n\n<p>To check if the service is active:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>systemctl status chronyd<br><\/pre>\n\n\n\n<p>You should see an <strong>active (running)<\/strong> status.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Verifying_Time_Synchronization\"><\/span><strong>6. Verifying Time Synchronization<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To confirm that your server is synchronizing correctly, use:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>chronyc tracking<\/pre>\n\n\n\n<p>For a detailed list of connected NTP servers:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>chronyc sources -v<br><\/pre>\n\n\n\n<p>If everything is working, you should see a list of servers and synchronization details.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting_Common_Issues\"><\/span><strong>Troubleshooting Common Issues<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If Chrony is not working as expected, try these solutions:<\/p>\n\n\n\n<p>1. <strong>Restart Chrony<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo systemctl restart chronyd<\/pre>\n\n\n\n<p>2. <strong>Manually sync the time<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br><code>sudo chronyc makestep<\/code><\/pre>\n\n\n\n<p>3. <strong>Ensure Chrony is allowed through the firewall<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo firewall-cmd --add-service=ntp --permanent sudo firewall-cmd --reload<\/pre>\n\n\n\n<p>4. <strong>Check logs for errors<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo journalctl -xeu chronyd<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion_and_Final_Thoughts\"><\/span><strong>Conclusion and Final Thoughts<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If you follow this guide You have successfully installed and set up&nbsp;<strong>Chrony<\/strong>&nbsp;as an&nbsp;<strong>NTP server\/client<\/strong>&nbsp;using&nbsp;<strong>AlmaLinux<\/strong>&nbsp;that ensures accurate time synchronization with&nbsp;<strong>America\/New York<\/strong>&nbsp;timezone.&nbsp;Chrony&#8217;s light and compact design is a great option for the latest Linux systems, offering rapid as well as reliable timing.<\/p>\n\n\n\n<p>If you encounter any issues, feel free to revisit the <strong>troubleshooting section<\/strong> or check the official <strong>Chrony documentation<\/strong> for additional support<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"FAQs\"><\/span><strong>FAQs<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_What_is_the_difference_between_Chrony_and_ntpd\"><\/span><strong>1. What is the difference between Chrony and ntpd?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Chrony is a modern, faster, and more reliable alternative to <strong>ntpd<\/strong>. It is better suited for systems with unstable network connections and offers quicker time synchronization.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_How_do_I_check_if_my_system_time_is_synchronized\"><\/span><strong>2. How do I check if my system time is synchronized?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>chronyc tracking<br><\/pre>\n\n\n\n<p>If it shows an active NTP server, your system is synchronized.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Can_I_use_Chrony_as_an_NTP_server\"><\/span><strong>3. Can I use Chrony as an NTP server?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Yes! Modify the <code>\/etc\/chrony.conf<\/code> file and allow other systems to sync with your server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_How_do_I_restart_the_Chrony_service\"><\/span><strong>4. How do I restart the Chrony service?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Use:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo systemctl restart chronyd<br><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_What_should_I_do_if_Chrony_is_not_syncing_time\"><\/span><strong>5. What should I do if Chrony is not syncing time?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Ensure that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The correct <strong>NTP servers<\/strong> are listed in <code>\/etc\/chrony.conf<\/code><\/li>\n\n\n\n<li>The <strong>firewall<\/strong> allows <strong>NTP traffic<\/strong><\/li>\n\n\n\n<li>The service is <strong>running and enabled<\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_How_do_I_force_Chrony_to_update_the_time_immediately\"><\/span><strong>6. How do I force Chrony to update the time immediately?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If your system clock is significantly out of sync, you can force Chrony to update the time immediately by running:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash\nsudo chronyc makestep\n\nThis will correct any large discrepancies between the system time and the NTP servers.<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_How_do_I_check_which_NTP_servers_my_system_is_using\"><\/span><strong>7. How do I check which NTP servers my system is using?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To view the NTP servers your system is connected to, use:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash\nchronyc sources -v\n\nThis will display a list of configured NTP servers and their statuses.<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"8_Can_I_use_Chrony_to_synchronize_time_without_an_internet_connection\"><\/span><strong>8. Can I use Chrony to synchronize time without an internet connection?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Yes, but you need to configure Chrony as an <strong>NTP server<\/strong> and sync it with a hardware clock or another trusted time source within your network. You can do this by modifying <code>\/etc\/chrony.conf<\/code> and allowing other local clients to sync with your Chrony server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"9_How_do_I_check_the_accuracy_of_my_systems_time_synchronization\"><\/span><strong>9. How do I check the accuracy of my system\u2019s time synchronization?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To check how well your system is synchronized, run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>chronyc tracking<br><\/pre>\n\n\n\n<p>This will show details like the estimated error and drift rate of your system clock.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"10_How_do_I_disable_Chrony_if_I_want_to_use_a_different_time_synchronization_method\"><\/span><strong>10. How do I disable Chrony if I want to use a different time synchronization method?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If you prefer to use a different NTP client, you can disable Chrony with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo systemctl stop chronyd<br>sudo systemctl disable chronyd<code><br><\/code><\/pre>\n\n\n\n<p>If you want to remove it completely:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo dnf remove chrony -y<br><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"11_How_do_I_allow_other_machines_to_sync_with_my_Chrony_server\"><\/span><strong>11. How do I allow other machines to sync with my Chrony server?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To make your Chrony instance act as an NTP server, edit <code>\/etc\/chrony.conf<\/code> and add:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">plaintext<br>allow 192.168.1.0\/24<br><br><br>Replace <code>192.168.1.0\/24<\/code> with your actual network subnet. Restart Chrony for the changes to take effect:<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo systemctl restart chronyd<br><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"12_What_should_I_do_if_my_system_is_not_syncing_even_after_setting_up_Chrony\"><\/span><strong>12. What should I do if my system is not syncing even after setting up Chrony?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If Chrony is not syncing, try the following steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li style=\"font-size:18px\"><strong>Ensure Chrony is running<\/strong> <br>bash<br>sudo systemctl status chronyd<\/li>\n\n\n\n<li style=\"font-size:18px\"><strong>Restart the service<\/strong> <br>bash<br>sudo systemctl restart chronyd<\/li>\n\n\n\n<li style=\"font-size:18px\"><strong>Manually trigger a sync<\/strong> <br>bash<br>sudo chronyc makestep<\/li>\n\n\n\n<li style=\"font-size:18px\"><strong>Check for firewall rules blocking NTP traffic<\/strong> <br>bash<br>sudo firewall-cmd &#8211;list-services <br>sudo firewall-cmd &#8211;add-service=ntp &#8211;permanent <br>sudo firewall-cmd &#8211;reload<\/li>\n\n\n\n<li><strong>Verify connectivity to NTP servers<\/strong> bashCopyEdit<code>chronyc sources -v<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"13_Can_I_configure_Chrony_to_use_a_specific_NTP_server_instead_of_a_pool\"><\/span><strong>13. Can I configure Chrony to use a specific NTP server instead of a pool?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Yes, instead of using a pool, you can specify a particular NTP server in <code>\/etc\/chrony.conf<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">plaintext<br>server time.nist.gov iburst<br><\/pre>\n\n\n\n<p>Replace <code>time.nist.gov<\/code> with your preferred NTP server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"14_Does_Chrony_work_with_virtual_machines\"><\/span><strong>14. Does Chrony work with virtual machines?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Yes, but VMs can have time drift issues. To reduce this, ensure:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Chrony is correctly configured and running.<\/li>\n\n\n\n<li>Your hypervisor (VMware, <a href=\"https:\/\/mainvps.net\/blog\/what-is-kvm\/\">KVM<\/a>, VirtualBox, etc.) has proper time synchronization settings.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"15_What_is_the_difference_between_iburst_and_burst_in_Chrony_configuration\"><\/span><strong>15. What is the difference between <code>iburst<\/code> and <code>burst<\/code> in Chrony configuration?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>iburst<\/code><\/strong>: When the system boots up, it sends multiple time requests rapidly to get accurate time quickly.<\/li>\n\n\n\n<li><strong><code>burst<\/code><\/strong>: Sends multiple requests all the time, which can overload the NTP server.<br>For normal configurations, <strong><code><a href=\"https:\/\/en.m.wikipedia.org\/wiki\/Iburst?redirect=no\" target=\"_blank\" rel=\"noopener\">iburst<\/a><\/code><\/strong> is recommended.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"16_How_do_I_configure_Chrony_to_use_a_local_clock_instead_of_external_NTP_servers\"><\/span><strong>16. How do I configure Chrony to use a local clock instead of external NTP servers?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If you want Chrony to use the local hardware clock instead of syncing with external NTP servers, add this line to <code>\/etc\/chrony.conf<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">plaintext<br>server 127.127.1.0<br><\/pre>\n\n\n\n<p>Also, set the system clock as the preferred time source:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">plaintext<br>local stratum 10<br><br><br>Restart Chrony to apply the changes:<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">bash<br>sudo systemctl restart chronyd<br><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"17_What_is_the_stratum_level_in_NTP_and_why_is_it_important\"><\/span><strong>17. What is the <code>stratum<\/code> level in NTP, and why is it important?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The <strong>stratum level<\/strong> indicates how far away a system is from an authoritative time source:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Stratum 0<\/strong> \u2013 Reference clocks (e.g., atomic clocks, GPS)<\/li>\n\n\n\n<li><strong>Stratum 1<\/strong> \u2013 Directly connected NTP servers<\/li>\n\n\n\n<li><strong>Stratum 2+<\/strong> \u2013 Servers synchronized from other NTP sources<br>A lower stratum means a more accurate time source. Chrony adjusts its stratum dynamically based on its synchronization status.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"18_Can_I_configure_Chrony_to_sync_time_only_at_boot_and_not_continuously\"><\/span><strong>18. Can I configure Chrony to sync time only at boot and not continuously?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Yes, modify <code>\/etc\/chrony.conf<\/code> and add:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">plaintext<br>makestep 1 -1<br><\/pre>\n\n\n\n<p>This ensures that Chrony corrects time at startup but doesn\u2019t adjust continuously.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"19_What_ports_does_Chrony_use_for_NTP_synchronization\"><\/span><strong>19. What ports does Chrony use for NTP synchronization?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Chrony uses <strong>UDP port 123<\/strong> for NTP communication. Ensure your firewall allows incoming and outgoing connections on this port.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"20_How_do_I_limit_access_to_my_Chrony_NTP_server_to_specific_clients\"><\/span><strong>20. How do I limit access to my Chrony NTP server to specific clients?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>In <code>\/etc\/chrony.conf<\/code>, use the <strong>allow<\/strong> directive to specify which IPs or subnets can connect:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\">plaintext<br>allow 192.168.1.100<br>allow 192.168.1.0\/24<code><br><\/code><\/pre>\n\n\n\n<p>This restricts access only to the listed IPs and subnet..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is the Network Time Protocol (NTP) is used to ensure that the clocks of computers are synchronized on networks. It helps ensure that all systems <a class=\"read-more-link\" href=\"https:\/\/mainvps.net\/blog\/install-and-configure-ntp-chrony-on-almalinux-9\/\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":11236,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-11123","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-servers"],"_links":{"self":[{"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/posts\/11123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/comments?post=11123"}],"version-history":[{"count":4,"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/posts\/11123\/revisions"}],"predecessor-version":[{"id":11180,"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/posts\/11123\/revisions\/11180"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/media\/11236"}],"wp:attachment":[{"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/media?parent=11123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/categories?post=11123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mainvps.net\/blog\/wp-json\/wp\/v2\/tags?post=11123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}