Home Install and configure Cloudflare Wrangler 2.x
Post
Cancel

Install and configure Cloudflare Wrangler 2.x

This post will show you how to install and configure Cloudflare Wrangler on Windows and Linux.

Wrangler Github

The latest release of Cloudflare Wrangler can be found at: Wrangler Github.

Windows

Wrangler is installed using npm. For Microsoft Windows, you will need to download and install Node.js.

  1. Download and install Node.js from https://nodejs.org/en/download/current/. Ensure Add to PATH is selected under Custom Setup. image

  2. You should now have npm available as a command in terminal. image

  3. Install wrangler using npm install -g wrangler. You may see the error message npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY as shown below. If not, move on to step 7. image

  4. If you encountered the error below, run the following command. npm config set strict-ssl false image

  5. Run the wrangler installation command again npm install -g wrangler. This time it should complete successfully. image

  6. Enable strict-ssl again using npm config set strict-ssl true.

  7. Check the installed wrangler version using wrangler --version. image

  8. Review the available commands in wrangler by running wrangler. image

  9. Authorise wrangler with your Cloudflare account using wrangler login. image image image

  10. Check that wrangler in with the expected account and permissions wrangler whoami. image

Linux

Note: Steps 7-10 are identical to the Microsoft Windows configuration.

  1. Install NPM. Follow your distribution specific instructions. I would suggest using NVM.

  2. Install Wrangler npm install -g wrangler

  3. Check the installed wrangler version using wrangler --version.

  4. Review the available commands in wrangler by running wrangler. image

  5. Authorise wrangler with your Cloudflare account using wrangler login.

  6. Check that wrangler in with the expected account and permissions wrangler whoami.

This post is licensed under CC BY 4.0 by the author.