Skip to main content

Install / Update

Caution

This page is for Wrangler v1, which has been deprecated. Learn how to update to the latest version of Wrangler.

Install

Install with npm

npm i @cloudflare/wrangler -g

EACCESS error

You may have already installed npm. It is possible that an EACCES error may be thrown while installing Wrangler. This is related to how many systems install the npm binary. It is recommended that you reinstall npm using a Node version manager like nvm or Volta.

Install with cargo

Assuming you have Rust’s package manager, Cargo, installed, run:

cargo install wrangler

Otherwise, to install Cargo, you must first install rustup. 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.

Windows users will need to install Perl as a dependency for openssl-sys — Strawberry Perl is recommended.

After Cargo is installed, you may now install Wrangler:

cargo install wrangler

Customize OpenSSL

By default, a copy of OpenSSL is included to make things easier during installation, but this can make the binary size larger. If you want to use your system's OpenSSL installation, 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 the releases page. You do not need the wranglerjs-*.tar.gz download – Wrangler will install that for you.

  2. Unpack the tarball and place the Wrangler binary somewhere on your PATH, preferably /usr/local/bin for Linux/macOS or Program Files for Windows.

Update

To update Wrangler, run one of the following:

Update with npm

npm update -g @cloudflare/wrangler

Update with cargo

cargo install wrangler --force