Lsyncd – basic setup

This is an example where you install Lsyncd on a CentOS master server and you sync the folder ‘data’ on a slave server with IP

First of all, your master server needs an SSH key setup AND the slave has to have it configured, to allow passwordless SSH connection

Here an article that tells you how to do it.

Configure Lsyncd



Add the service and enable it

On CentoS7 use this:



Once installed, you also need to be sure that Lsyncd logs are managed by Logrotate.

Create/update this file: /etc/logrotate.d/lsyncd


On CentOS7, you need to use sistemctl instead service command:

Test the logrotate config

You can test this using the command:


For more advanced Lsyncd configuration, check this article 🙂