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
If you don’t already have npm on your machine, install it using npm’s instructions — we recommend using a Node version manager like
nvm
.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.Install Wrangler by running:
$ npm i @cloudflare/wrangler -g
Using cargo
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.
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
Download the binary tarball for your platform from our releases page. You don’t need to download wranglerjs, wrangler will install that for you.
Unpack the tarball and place the binary
wrangler
somewhere on yourPATH
, preferably/usr/local/bin
for Linux/macOS orProgram 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