Back to services

Unison

Unison is a file-synchronization tool for OSX, Unix, and Windows.

View alternatives to Unison
Suggest edit
Open source
Self-hostable
GPL-3.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Note: We were unable to fetch the official website this time. The content below was written based on what is generally known about Unison, so please refer to the official website and documentation for specific details.

Introduction

Unison is a bidirectional file synchronization tool, originally developed by Benjamin C. Pierce and others at the University of Pennsylvania, and now maintained by the community as an open-source project. It keeps two copies of a set of files (on the same machine or on different machines) consistent. Changes made on either side are propagated to the other. If the same file has been modified on both sides, Unison flags it as a conflict and leaves it to the user to resolve.

Unlike one-way mirroring tools such as rsync, Unison tracks the state from the last synchronization, so it can tell which side made a change. This makes it well suited to alternately editing the same set of files on multiple devices.

Key Features

  • Bidirectional sync: Additions, modifications and deletions on either side are propagated to the other.
  • Conflict detection: Files modified on both sides are not silently overwritten. Instead, they are listed so the user can choose which version to keep.
  • Cross-platform: Supports Linux, macOS, Windows and other Unix-like systems, and can synchronize between different operating systems.
  • Remote sync: Can connect to remote hosts over SSH, or directly via sockets.
  • Incremental transfer: Uses an rsync-like compressed transfer algorithm that sends only the changed parts of a file, which is reasonably efficient even on slow networks.
  • Safer after interruptions: If a sync fails or is interrupted midway, Unison tries to keep the copies and metadata on both sides in a consistent state.
  • Command line and graphical interface: Provides a text interface suited to scripts and servers, as well as a GTK-based graphical interface.
  • Configuration files (profiles): The root directories, ignore rules and various options for a sync can be saved as a profile and reused later.

Target Users and Use Cases

  • Developers and technical users who want to keep working directories consistent across desktops, laptops and servers.
  • Users who don't want to depend on third-party cloud storage and prefer to control their own data.
  • Mixed environments that need to exchange files between Linux, macOS and Windows.
  • Scenarios where local files need to be synchronized to a VPS or home server over SSH.

Core Strengths

  • No central server and no dependence on cloud services; the data stays entirely under the user's control.
  • The synchronization logic has been proven over a long time, is fairly robust, and handles conflicts cautiously.
  • Can be run by ordinary users without root privileges.
  • Free and open source, released under the GPL license.

Installation and Usage

It is usually available directly on major platforms:

# Debian / Ubuntu
sudo apt install unison

# macOS (Homebrew)
brew install unison

On Windows and other platforms, you can download precompiled binaries from the project's releases page, or build it yourself from source.

Basic usage examples:

# Sync two local directories
unison /path/to/dirA /path/to/dirB

# Sync with a remote host over SSH
unison /home/user/docs ssh://user@server//home/user/docs

For remote sync, Unison must be installed on both ends. It is best to use the same version or mutually compatible versions.

Technical Requirements

  • Written mainly in OCaml; building from source requires the OCaml toolchain.
  • For remote sync, Unison must be installed on both ends, and the two machines must be able to reach each other over SSH or sockets.
  • The graphical interface requires GTK-related dependencies.

Notable Characteristics

  • Unison is best suited to synchronizing between two copies. When synchronizing across several devices, a common approach is to use one host as the hub in a star topology.
  • It is not a real-time sync tool; by default it has to be run manually or triggered by a scheduled task. Newer versions support continuous synchronization in combination with file monitoring.
  • If you want an out-of-the-box solution that syncs multiple devices in real time, you may want to consider alternatives such as Syncthing.