Help in using Flareclt package on Windows 10

Hi, hopefully someone can help here, as the API documentation is somewhat unclear for creating domains using the Windows flarectl package.

I can run the “” from the command line OK, but what’s stumping me is how to export my email & API key i.e.

" You can also add domains using flarectl, Cloudflare’s official CLI. You can download a pre-built package for your operating system (Windows, macOS/Darwin, Linux) and create domains using it.
You’ll need to set your API credentials first:
export [email protected]
export CF_API_KEY=abc123def456ghi789"

There’s no option in the flarectl to export my email & API. So how do I do that from the cmd line?

Those look like Windows command line environment variables. I don’t use Windows, but if it’s like Unix, you have command line access, which is where you’re using flarectl

From the command line, type those commands, but use your Cloudflare email address and the Global API key that’s listed in your Account Profile. Now that variable is set for as long as you keep that command line window open.

I don’t know how to permanently set that variable in Windows, but in Unix, there’s typically a .profile or .rc type of file where you can set environment variables. Otherwise, you’ll have to type in those two commands every time you want to use flarectl.

Thanks for that, I have tried that but the error msg given is"‘export’ is not recognized as an internal or external command, operable program or batch file."

Which is to be expected considering the command appears to be for *nix only. I just wrongly assumed that the flarectl app would take care of that under Windows.

Surely whoever put together this documentation didn’t expect a user to enter the export commands via a linux/mac OS terminal, then drop back to using the Windows flarectl app for adding the domains??

I solved the issue by running the commands with bash via the WSL (Windows Subsystem for Linux) in Windows 10. But I’d would still like an answer for my original question, if only for future reference for others stuck with the same issue, and no access to WSL or a Linux/mac terminal prompt.

1 Like

From a CMD prompt, type these commands and press enter after each (enter your real info after =):
SET CF_API_EMAIL=your-account-email

The above sets Windows environment variables for that session only. If you want to set them permanently, you can do it from control panel.


This topic was automatically closed after 31 days. New replies are no longer allowed.