{
  "schema_version": 2,
  "id": "operate/rs/clusters/configure/sync-clocks",
  "title": "Synchronize cluster node clocks",
  "url": "https://redis.io/docs/latest/operate/rs/clusters/configure/sync-clocks/",
  "summary": "Sync node clocks to avoid problems with internal custer communication.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-09-24T10:14:16+01:00",
  "page_type": "content",
  "content_hash": "9a1660de6f8f4ff0f6b0af07d1ba1c82fcadaced071a736a9682796b9335514b",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "To avoid problems with internal cluster communications that can impact your data integrity,\nmake sure that the clocks on all of the cluster nodes are synchronized using Chrony and/or NTP.\n\nWhen you install Redis Software,\nthe install script checks if Chrony or NTP is running.\nIf they are not, the installation process asks for permission to configure a scheduled Cron job.\nThis should make sure that the node's clock is always synchronized.\nIf you did not confirm configuring this job during the installation process,\nyou must use the Network Time Protocol (NTP) regularly to make sure that all server clocks are synchronized.\n\nTo synchronize the server clock, run the command that is appropriate for your operating system."
    },
    {
      "id": "set-up-ntp-synchronization",
      "title": "Set up NTP synchronization",
      "role": "content",
      "text": "To set up NTP synchronization, see the following sections for instructions for specific operating systems."
    },
    {
      "id": "ubuntu-1804-and-ubuntu-2004",
      "title": "Ubuntu 18.04 and Ubuntu 20.04",
      "role": "content",
      "text": "1. Install Chrony, a replacement for NTP:\n   [code example]\n   \n1. Edit the Chrony configuration file:\n   [code example]\n\n1. Add `server pool.ntp.org` to the file, replace `pool.ntp.org` with your own NTP server, then save.\n\n1. Restart the Chrony service: \n   [code example]\n\n1. Check the Chrony service status:\n   [code example]\n   \nFor more details, refer to the official [Ubuntu 20.04 documentation](https://ubuntu.com/server/docs/network-ntp)."
    },
    {
      "id": "rhel-7",
      "title": "RHEL 7",
      "role": "content",
      "text": "1. Install Chrony, a replacement for NTP:\n   [code example]\n\n1. Edit the Chrony configuration file:\n   [code example]\n\n1. Add `server pool.ntp.org` to the file, replace `pool.ntp.org` with your own NTP server, then save.\n\n1. Enable and start the Chrony service:\n   [code example]\n\n1. Check the Chrony service status:\n   [code example]\n\nFor more details, refer to the official [RHEL 7 documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite#sect-Using_chrony)."
    },
    {
      "id": "rhel-8-and-rhel-9",
      "title": "RHEL 8 and RHEL 9",
      "role": "content",
      "text": "1. Install Chrony, a replacement for NTP:\n   [code example]\n\n1. Edit the Chrony configuration file:\n   [code example]\n\n1. Add `server pool.ntp.org` to the file, replace `pool.ntp.org` with your own NTP server, then save.\n\n1. Enable and start the Chrony service:\n   [code example]\n\n1. Check the Chrony service status:\n   [code example]\n\nFor more details, refer to the official [RHEL 8 and 9 documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/configuring-time-synchronization_configuring-basic-system-settings)."
    },
    {
      "id": "amazon-linux-2",
      "title": "Amazon Linux 2",
      "role": "content",
      "text": "1. Install Chrony, a replacement for NTP:\n   [code example]\n\n1. Edit the Chrony configuration file:\n   [code example]\n\n1. Add `server pool.ntp.org` to the file, replace `pool.ntp.org` with your own NTP server, then save.\n\n1. Enable and start the Chrony service:\n   [code example]\n\n1. Check the Chrony service status:\n   [code example]\n\nFor more details, refer to the official [Amazon Linux 2 documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html).\n\nIf you are using Active-Active databases, you must use [Network Time Service (ntpd)](https://redis.io/docs/latest/operate/rs/databases/active-active#network-time-service-ntp-or-chrony)\nto synchronize OS clocks consistently across clusters to handle conflict resolution according to the OS time."
    }
  ],
  "examples": [
    {
      "id": "ubuntu-1804-and-ubuntu-2004-ex0",
      "language": "sh",
      "code": "sudo apt install chrony",
      "section_id": "ubuntu-1804-and-ubuntu-2004"
    },
    {
      "id": "ubuntu-1804-and-ubuntu-2004-ex1",
      "language": "sh",
      "code": "sudo nano /etc/chrony/chrony.conf",
      "section_id": "ubuntu-1804-and-ubuntu-2004"
    },
    {
      "id": "ubuntu-1804-and-ubuntu-2004-ex2",
      "language": "sh",
      "code": "sudo systemctl restart chrony",
      "section_id": "ubuntu-1804-and-ubuntu-2004"
    },
    {
      "id": "ubuntu-1804-and-ubuntu-2004-ex3",
      "language": "sh",
      "code": "sudo systemctl status chrony",
      "section_id": "ubuntu-1804-and-ubuntu-2004"
    },
    {
      "id": "rhel-7-ex0",
      "language": "sh",
      "code": "sudo yum install chrony",
      "section_id": "rhel-7"
    },
    {
      "id": "rhel-7-ex1",
      "language": "sh",
      "code": "sudo nano /etc/chrony.conf",
      "section_id": "rhel-7"
    },
    {
      "id": "rhel-7-ex2",
      "language": "sh ",
      "code": "sudo systemctl enable chronyd && sudo systemctl start chronyd",
      "section_id": "rhel-7"
    },
    {
      "id": "rhel-7-ex3",
      "language": "sh",
      "code": "sudo systemctl status chronyd",
      "section_id": "rhel-7"
    },
    {
      "id": "rhel-8-and-rhel-9-ex0",
      "language": "sh",
      "code": "sudo dnf install chrony",
      "section_id": "rhel-8-and-rhel-9"
    },
    {
      "id": "rhel-8-and-rhel-9-ex1",
      "language": "sh",
      "code": "sudo nano /etc/chrony.conf",
      "section_id": "rhel-8-and-rhel-9"
    },
    {
      "id": "rhel-8-and-rhel-9-ex2",
      "language": "sh",
      "code": "sudo systemctl enable chronyd && sudo systemctl start chronyd",
      "section_id": "rhel-8-and-rhel-9"
    },
    {
      "id": "rhel-8-and-rhel-9-ex3",
      "language": "sh",
      "code": "sudo systemctl status chronyd",
      "section_id": "rhel-8-and-rhel-9"
    },
    {
      "id": "amazon-linux-2-ex0",
      "language": "sh",
      "code": "sudo yum install chrony",
      "section_id": "amazon-linux-2"
    },
    {
      "id": "amazon-linux-2-ex1",
      "language": "sh",
      "code": "sudo nano /etc/chrony.conf",
      "section_id": "amazon-linux-2"
    },
    {
      "id": "amazon-linux-2-ex2",
      "language": "sh",
      "code": "sudo systemctl enable chronyd && sudo systemctl start chronyd",
      "section_id": "amazon-linux-2"
    },
    {
      "id": "amazon-linux-2-ex3",
      "language": "sh",
      "code": "sudo systemctl status chronyd",
      "section_id": "amazon-linux-2"
    }
  ]
}
