Skip to content
Workers
Visit Workers on GitHub
Set theme to dark (⇧+D)

Install / Update

Install

Install with npm

$ npm i @cloudflare/wrangler -g

Install with cargo

$ cargo install wrangler

If you don’t have cargo or npm installed, you will need to follow these additional instructions.

Additional Installation Instructions

Wrangler can be installed both through npm and through Rust’s package manager, Cargo.

Using npm

  1. If you don’t already have npm on your machine, install it using npm’s recommended method, a node.js version manager.

    If you have already installed npm with a package manager, it is possible you will run into an EACCES error while installing wrangler. This is related to how many system packagers install npm. You can either uninstall npm and reinstall using the npm recommended install method (a version manager), or use one of our other install methods.

  2. Install Wrangler by running:

    $ npm i @cloudflare/wrangler -g

Using cargo

  1. Install cargo:

    Rustup, a tool for installing Rust, will also install Cargo. On Linux and macOS systems, rustup can be installed as follows:

    $ curl https://sh.rustup.rs -sSf | sh

    Additional installation methods are available on the Rust site.

  2. Install wrangler:

    $ cargo install wrangler

    By default we vendor OpenSSL to make things easier when installing, but this can make the binary size a bit larger. If you want to use your system OpenSSL, provide the feature flag sys-openssl when running install.

    cargo install wrangler --features sys-openssl

Manual Install

  1. Download the binary tarball for your platform from our releases page. You don’t need to download wranglerjs, wrangler will install that for you.

  2. Unpack the tarball and place the binary wrangler somewhere on your PATH, preferably /usr/local/bin for linux/macOS or Program Files for windows.

Update

To update Wrangler, follow the below instructions (customized for either an NPM or Cargo install):

Updating Wrangler with NPM:

$ npm uninstall -g @cloudflare/wrangler && npm install -g @cloudflare/wrangler

Updating Wrangler with Cargo:

$ cargo install wrangler --force