<commit_before>---
pageid: install
title: Installation
layout: docs
section: Installation
permalink: docs/install.html
redirect_from: docs/install/index.html
---

## System Requirements

Watchman is known to compile and pass its test suite on:

 * <i class="fa fa-linux"></i> Linux systems with `inotify`
 * <i class="fa fa-apple"></i> macOS (uses `FSEvents` on 10.7+,
   `kqueue(2)` on earlier versions)
 * <i class="fa fa-windows"></i> Windows x64 on Windows 7,
   Windows Server 2012 R2 and later is currently in **beta** status.

Watchman used to support the following systems, but no one is actively
maintaining them.  The core of the code should be OK, but they likely don't
build.  We'd love it if someone would step forward to maintain them:

 * BSDish systems (FreeBSD 9.1, OpenBSD 5.2) that have the
   `kqueue(2)` facility
 * Illumos and Solaris style systems that have `port_create(3C)`

Watchman relies on the operating system facilities for file notification,
which means that you will likely have very poor results using it on any
kind of remote or distributed filesystem.

Watchman does not currently support any other operating system not covered by
the list above.

## Download for Windows (Beta)

Watchman is considered to be in **beta** status for Windows but has
a reasonably sized group of users depending on it already, and we expect
to remove the beta label in the coming months.

Watchman was built to support Windows Server 2012 R2 and later, but has
had community-provided patches that enable support for Windows 7 and later.

At this time, we recommend running the latest master build of watchman on
Windows; see below for binary downloads!

If you encounter issues with the Windows version of watchman, please report
them via GitHub!  [You can find the list of known Windows issues here](
https://github.com/facebook/watchman/issues?utf8=%E2%9C%93&q=is%3Aopen+Windows).

## Binary Downloads for Linux, macOS and Windows (Beta)

*Note: binaries are built from master only.  We don't provide binaries for v4.9.0*

Watchman is continuously deployed as it passes our internal test validation
inside Facebook and doesn't use manually assigned or "approved" version numbers.

Outside FB we have automation that cuts a tag and builds binaries on Monday of
each week and assigns a tag based on the date.  That process is in a beta
state; some or all of the binaries may not be present for any given tag.

You can find the binary downloads in the [latest release](https://github.com/facebook/watchman/releases/latest)

### Windows

* Download and extract the windows release from the [latest release](https://github.com/facebook/watchman/releases/latest)
* It will be named something like `watchman-vYYYY.MM.DD.00-windows.zip`
* It contains a `bin` folder.  Move that somewhere appropriate and update your `PATH` environment to reference that location.

### Linux and macOS

* Download and extract the release for your system from the [latest release](https://github.com/facebook/watchman/releases/latest)
* It will be named something like `watchman-vYYYY.MM.DD.00-linux.zip`

```
$ unzip watchman-*-linux.zip
$ cd watchman-vYYYY.MM.DD.00-linux
$ sudo mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman
$ sudo cp bin/* /usr/local/bin
$ sudo cp lib/* /usr/local/lib
$ sudo chmod 755 /usr/local/bin/watchman
$ sudo chmod 2777 /usr/local/var/run/watchman
```

## Build/Install

### Installing on macOS or Linux via Homebrew

To build the most recent release currently tracked by
[Homebrew](http://brew.sh/):

```bash
$ brew update
$ brew install watchman
```

To install the latest build from github:

```bash
$ brew install --HEAD watchman
```

### Installing on macOS via macports

To install the package maintained by [MacPorts](https://www.macports.org):

```bash
$ sudo port install watchman
```

### Installing from source

You can use these steps below to get watchman built.  You will need `libssl-dev`,
`autoconf`, `automake` and `libtool` (or `glibtool` on macOS).

You may optionally build watchman without `pcre` and `python` support (see
configuration options below).

For python support, you will need `setuptools` and may need to install a
`python-dev` or `python-devel` package. To build the C++ client library you will
need to install `libfolly`.

See below for some more information on options to configure your build.

```bash
$ # use the latest stable release
$ git clone https://github.com/facebook/watchman.git -b {{ site.data.current_release.tag }} --depth 1
$ cd watchman 
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
```

### Compile Time Configuration Options

Our configure script accepts all the standard options, but there are a couple
that are specific to watchman that might be relevant to your needs:<commit_msg>Add Windows Chocolatey Install Documentation (#852)<commit_after>---
pageid: install
title: Installation
layout: docs
section: Installation
permalink: docs/install.html
redirect_from: docs/install/index.html
---

## System Requirements

Watchman is known to compile and pass its test suite on:

 * <i class="fa fa-linux"></i> Linux systems with `inotify`
 * <i class="fa fa-apple"></i> macOS (uses `FSEvents` on 10.7+,
   `kqueue(2)` on earlier versions)
 * <i class="fa fa-windows"></i> Windows x64 on Windows 7,
   Windows Server 2012 R2 and later is currently in **beta** status.

Watchman used to support the following systems, but no one is actively
maintaining them.  The core of the code should be OK, but they likely don't
build.  We'd love it if someone would step forward to maintain them:

 * BSDish systems (FreeBSD 9.1, OpenBSD 5.2) that have the
   `kqueue(2)` facility
 * Illumos and Solaris style systems that have `port_create(3C)`

Watchman relies on the operating system facilities for file notification,
which means that you will likely have very poor results using it on any
kind of remote or distributed filesystem.

Watchman does not currently support any other operating system not covered by
the list above.

## Download for Windows (Beta)

Watchman is considered to be in **beta** status for Windows but has
a reasonably sized group of users depending on it already, and we expect
to remove the beta label in the coming months.

Watchman was built to support Windows Server 2012 R2 and later, but has
had community-provided patches that enable support for Windows 7 and later.

At this time, we recommend running the latest master build of watchman on
Windows; see below for binary downloads!

If you encounter issues with the Windows version of watchman, please report
them via GitHub!  [You can find the list of known Windows issues here](
https://github.com/facebook/watchman/issues?utf8=%E2%9C%93&q=is%3Aopen+Windows).

## Binary Downloads for Linux, macOS and Windows (Beta)

*Note: binaries are built from master only.  We don't provide binaries for v4.9.0*

Watchman is continuously deployed as it passes our internal test validation
inside Facebook and doesn't use manually assigned or "approved" version numbers.

Outside FB we have automation that cuts a tag and builds binaries on Monday of
each week and assigns a tag based on the date.  That process is in a beta
state; some or all of the binaries may not be present for any given tag.

You can find the binary downloads in the [latest release](https://github.com/facebook/watchman/releases/latest)

### Windows

* Download and extract the windows release from the [latest release](https://github.com/facebook/watchman/releases/latest)
* It will be named something like `watchman-vYYYY.MM.DD.00-windows.zip`
* It contains a `bin` folder.  Move that somewhere appropriate and update your `PATH` environment to reference that location.

### Linux and macOS

* Download and extract the release for your system from the [latest release](https://github.com/facebook/watchman/releases/latest)
* It will be named something like `watchman-vYYYY.MM.DD.00-linux.zip`

```
$ unzip watchman-*-linux.zip
$ cd watchman-vYYYY.MM.DD.00-linux
$ sudo mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman
$ sudo cp bin/* /usr/local/bin
$ sudo cp lib/* /usr/local/lib
$ sudo chmod 755 /usr/local/bin/watchman
$ sudo chmod 2777 /usr/local/var/run/watchman
```

## Build/Install

### Installing on macOS or Linux via Homebrew

To build the most recent release currently tracked by
[Homebrew](http://brew.sh/):

```bash
$ brew update
$ brew install watchman
```

To install the latest build from github:

```bash
$ brew install --HEAD watchman
```

### Installing on macOS via macports

To install the package maintained by [MacPorts](https://www.macports.org):

```bash
$ sudo port install watchman
```

### Installing on Windows via Chocolatey

Watchman is available to install via the [Chocolatey](https://www.chocolatey.org) Windows package manager.  Installation is as simple as:

```powershell
PS C:\> choco install watchman
```

The package is maintained by the community rather than by Facebook, Inc., so if you experience issues with installation/uninstallation, you should [contact the package maintainers](https://chocolatey.org/packages/watchman/ContactOwners) for assistance.

### Installing from source

You can use these steps below to get watchman built.  You will need `libssl-dev`,
`autoconf`, `automake` and `libtool` (or `glibtool` on macOS).

You may optionally build watchman without `pcre` and `python` support (see
configuration options below).

For python support, you will need `setuptools` and may need to install a
`python-dev` or `python-devel` package. To build the C++ client library you will
need to install `libfolly`.

See below for some more information on options to configure your build.

```bash
$ # use the latest stable release
$ git clone https://github.com/facebook/watchman.git -b {{ site.data.current_release.tag }} --depth 1
$ cd watchman 
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
```

### Compile Time Configuration Options

Our configure script accepts all the standard options, but there are a couple
that are specific to watchman that might be relevant to your needs:
{'fraction_non_alphanumeric': 0.08659855173097906, 'fraction_numerical': 0.009622061303442118, 'mean_word_length': 4.397216274089936, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, 'https://': 14, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1054531', 'n_tokens_mistral': 2973, 'n_tokens_neox': 2783, 'n_words': 1334}