                 deviceName: deviceName
                 password: password
             Devices.registerDeviceSafe options, (err, credentials) ->
-                callback err, credentials
+                return callback err if err
+                config = file: true
+                setDesignDoc = filterSDK.setDesignDoc.bind filterSDK
+                setDesignDoc cozyUrl, deviceName, password, config, (err) ->
+                    callback err, credentials
 
 
     # Save the config with all the informations for synchonization



    # Register current device to remote Cozy and then save related informations
    # to the config file
    addRemote: (cozyUrl, syncPath, deviceName, callback = ->) =>
        @registerRemote cozyUrl, deviceName, (err, credentials) =>
            if err
                log.error 'An error occured while registering your device.'

async     = require 'async'
fs        = require 'fs'
os        = require 'os'
path      = require 'path-extra'
readdirp  = require 'readdirp'
url       = require 'url'
filterSDK = require('cozy-device-sdk').filteredReplication
log       = require('printit')
    prefix: 'Cozy Desktop  '
    date: true

