             else
                 callback null
 
-        .on 'error', (err) ->
+        onError = (err) ->
             log.error err
             callback err
+
+        # Launch replication
+        replicate(urlParser.format(url) + 'cozy', options)
+        .on 'change', onChange
+        .on 'uptodate', onUptoDate # Called only for a continuous replication
+        .on 'complete', onComplete # Called only for a single replication
+        .on 'error', onError

            callback err


    runReplication: (fromRemote, toRemote, continuous, rebuildFs, fetchBinary, callback) ->
        deviceName = config.getDeviceName()
        continuous ?= false
        rebuildFs ?= false

                doc.docType is 'Folder' or doc.docType is 'File'
            live: continuous

        # Do not need rebuild until docs are added
        needTreeRebuild = false

        # Set authentication
        url = urlParser.parse remoteConfig.url
        url.auth = "#{deviceName}:#{remoteConfig.devicePassword}"

        # Define action after replication completion
        applyChanges = (callback) ->

