• Android
  • iOS
  • macOS
  • Windows

Codebook Sync

Introduction

Codebook's Sync feature allows you to make changes to your Codebook records on multiple devices and keep them all up-to-date. It also provides a convenient means to restore your data from another device in the event of data loss. Codebook's Desktop WiFi service allows you to sync between mobile and desktop devices on your local network. Codebook can also sync with Dropbox and Google Drive. All data transmitted during sync is encrypted with your Sync Key. Codebook's Sync feature is decentralized, your data is not uploaded to any cloud service that we run. Additional information about how the Sync feature replicates your changes is available here.

Setting up the Sync feature for the first time is a simple process, instructions are available below. By default, all changes made on both sides of a sync will be exchanged and applied. To change this, see Sync Operations.

Codebook supports four different sync services:

  • Desktop WiFi
  • Dropbox
  • Google Drive
  • Local Folder (macOS and Windows only)

The Desktop WiFi service lets you sync Codebook on a mobile device (e.g. Android, iPhone) with Codebook on a Mac or Windows PC over your local WiFi network. When Codebook is running and unlocked on the desktop it starts up a sync service (when enabled, in Preferences) and listens for connections from Codebook on your mobile device. Launch Codebook on the mobile device and use the Sync view to initiate sync with the desktop.

The Desktop WiFi service uses port 57419. Your data is encrypted with your Sync Key over the network.

Directly syncing desktop-to-desktop and mobile-to-mobile over WiFi is not currently supported.

If you're having trouble using the Desktop WiFi sync service, we have a troubleshooting guide here that may be helpful. As always, please feel free to reach out to our support team for help.

If you are using both iOS and macOS, and are unable to use a local WiFi network for sync, you can create a temporary, or Ad Hoc, WiFi network for sync. More information is available here.

Dropbox and Google Drive Sync allow you to sync Codebook with your cloud service, which can be a convenient way to keep multiple devices in sync. When you sync with either service Codebook will setup and use a folder on the cloud service named Zetetic. It contains encrypted metadata and change-set files, encrypted portions of your data. The files in this folder are SQLCipher databases, encrypted with your Sync Key, and they allow another copy of Codebook to sync with the same account and replicate your data onto a new device, along with any changes.

Each copy of Codebook must sync separately and to the same cloud account for all of your devices to contain all of your changes. For example, suppose you have a desktop and a mobile copy of Codebook and they are both setup to sync with the same Dropbox account. When you sync from your desktop copy, changes you have made since your last sync will be stored on your cloud account and changes from your mobile copy of Codebook that have been synced will be made on the the desktop copy. Your mobile device will need to be synced for it to contain the updates from your desktop device.

Note: Though the files Codebook stores in your Dropbox or Google Drive have the file extension .db, you will not be able to double-click to open them on your desktop.

Codebook for macOS and Windows supports an additional sync service called Local Folder. Like the name implies, it allows you to select any folder (that you have write access to) on your local machine and Codebook will use that as a sync endpoint. When you start a sync with Local Folder, Codebook will set that folder up as an encrypted remote similar to how it works with Dropbox and Google Drive. This is particularly useful with folders mounted over the network.

  1. Setup your Sync Key.

    You create one Sync Key which is used for all of your devices. This may have been done when you installed Codebook. You create your Sync Key on one device and then copy it to your other devices by scanning a Codebook generated QR code (directly from another device running Codebook or from a printed Backup Copy) or entering a Backup Word List which is also generated in Codebook.

    For detailed instructions to on how to create a Sync Key see Setup Your Sync Key.

    For detailed instructions for adding a Sync Key to another device see Copy Sync Key.

  2. Set Sync Preferences

    On macOS

    1. Open the Codebook Preferences window. Codebook -> Preferences.
    2. Select the Sync tab on the Preferences window.
    3. Check the Enable Sync box.
    4. Select sync method: Desktop WiFi, Dropbox, Google Drive or Local Folder Sync.

      mac preferences screen

    On Windows

    1. Open the Codebook Preferences window, select the File menu -> Preferences.
    2. Select the Sync tab on the Preferences window.
    3. Select sync method: Desktop WiFi, Dropbox, Google Drive or Local Folder Sync.
    4. Click Ok

      windows preference screen

    On iOS

    1. Open the Codebook Sync screen. Tap More -> Sync.

      ios settings screen

    2. Select the sync service to use:

      • Tap the Service row
      • Tap to select Desktop WiFi, Dropbox, or Google Drive

        ios sync set service screen ios sync set type screen

    3. Set Computer or Account:

      • For Desktop WiFi:

        1. Tap Computer to Browse Network.
        2. Select the network from those that are displayed. (This must match the network being used on the desktop.)

          ios sync wifi screen ios sync local network screen

      • For Dropbox or Google Drive - Tap Account to Authorize the use of your Dropbox or Google Drive Account.

        1. Tap Account to connect.
        2. Enter your cloud service account information and authorize Codebook to access your account.

          ios sync google drive screen

    On Android

    1. Open the Codebook Sync screen. Tap Home -> Sync
    2. Set the Service:

      • Tap Service
      • Tap Desktop WiFi or Dropbox or Google Drive

        android sync screen android sync wifi sync screen android sync selector screen

    3. Set Computer or Account:

      • For Desktop WiFi - Tap Computer to select the Network (This must match the Network being used on the desktop.)

        android sync wifi computer sync screen android sync wifi network screen

      • For Dropbox or Google Drive - Tap Account to connect your Dropbox or Google Drive Account

        android sync wifi google drive sync screen android sync cloud authorize screen

Used to Sync a mobile device with a desktop.

  1. Open Codebook and leave it running and signed in on your Mac or Windows computer
  2. Launch Codebook on your iOS or Android device, and go to the Sync view:
  3. Ensure Service is set to WiFi, and the Computer row matches the local same local network that is being used by your desktop - Tap Start

If your desktop does not show up in the network browser, or sync is interrupted due to network problems, we’ve got some tips for troubleshooting.

On macOS

There are two ways to start the Sync process:

    1. Select the Sync Menu
    2. Click Start Sync.

  1. Click the Sync button from the Codebook toolbar.

On Windows

There are two ways to start the Sync process:

    1. Select the Sync Menu
    2. Click Sync with (cloud service).

  1. Click the Sync button from the Codebook toolbar.

On iOS

  1. Open the Codebook Sync screen. Tap More -> Sync
  2. Tap Start in the upper right hand corner

On Android

  1. Open the Codebook Sync screen. Tap Home -> Sync
  2. Tap the Sync symbol in the upper right hand corner.

You may be prompted to sign in to your Dropbox or Google Drive account if you have not already done so from within Codebook.

Updates you have made on this device will be stored in the cloud service and Codebook changes made on another device that have already been synced with this service will be reflected on this device.

Because Codebook Sync allows you to exchange all changes to your data with every device you use, it has to employ a conflict resolution strategy for situations where multiple devices have changes to the same piece of data. Codebook resolves such conflicts by choosing to persist the most recent edit. For example, if you change the same Password on two different devices and then run Sync, you will find that both devices will end up with a value for that Password field that corresponds to whichever one was edited last.

More information about how Codebook Sync replication works is available.