Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk3 min

How to Set Up Cloudflare Workers: A First-Deployment Guide

Choose a dashboard or CLI workflow to create a first Cloudflare Worker, preview it locally with Wrangler, and deploy it to workers.dev or a custom domain.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can set up a Cloudflare Worker either in the Workers & Pages dashboard or with Cloudflare’s command-line tools. The dashboard is a browser-based route; the CLI creates a local project you can edit, run with Wrangler, and deploy. For the CLI path, you need a Cloudflare account and Node.js.

Choose the dashboard or CLI workflow

Route How it works Best fit
Dashboard Create an app from a template, connect a Git provider, or start from a public repository in Workers & Pages. A successful deployment can be previewed on its workers.dev subdomain. You want a browser-based setup and deployment flow.
CLI Use C3 to scaffold a project on your computer, edit its source, run it locally with Wrangler, and deploy from the terminal. You want to work in a local editor or use a repeatable project workflow.

Cloudflare documents both routes; neither is the right choice for every project. Follow the dashboard steps if you prefer a hosted flow, or use the CLI steps below for a local project. Cloudflare’s dashboard guide

As an Amazon Associate I earn from qualifying purchases.

What you need for the CLI setup

  • A Cloudflare account.
  • Node.js. Use a supported, maintained release and check the current Wrangler requirements before installing.
  • A supported operating system for Wrangler: macOS 13.5 or later, Windows 11, or a Linux distribution that supports glib 2.35.

A Node version manager can make it easier to manage Node.js versions. Cloudflare recommends installing Wrangler locally in each project; its documented npm command is npm i -D wrangler@latest. Check Wrangler installation and operating-system requirements.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create a Worker project with C3

  1. Open a terminal and run npm create cloudflare@latest -- my-first-worker.
  2. Answer the setup prompts. C3, Cloudflare’s create-cloudflare tool, asks you to choose a project template and configuration.
  3. For a minimal first project, follow the Hello World Worker-only example. Cloudflare’s beginner path uses JavaScript and lets you defer deployment so you can edit the project first.
  4. Open the generated project in your editor. It includes a Wrangler configuration file, a source entry point, and package metadata. Exact filenames and generated contents can vary with the selected template and tooling version.

Cloudflare’s CLI quickstart and First Worker learning path show the setup flow and beginner example.

Run the Worker locally

  1. In a terminal, change to the project directory created by C3.
  2. Start the local development server with npx wrangler dev.
  3. Edit the generated source entry point, then use the local development session to check your changes.

Wrangler provides the local development command; its documented commands are listed in Cloudflare’s Workers Wrangler command reference. Cloudflare’s Wrangler documentation notes that Workers execute in workerd, the open-source Cloudflare Workers runtime. Wrangler installation documentation

Deploy the Worker

  1. From the project directory, run npx wrangler deploy.
  2. If you have not configured a workers.dev subdomain or domain, Wrangler prompts you during publishing.
  3. After deployment, open the Worker at its workers.dev URL or configure a custom domain as the destination.

The CLI guide documents both deployment destinations. For a dashboard deployment, use the route described in Cloudflare’s dashboard guide.

Add bindings only when your app needs them

Bindings let a Worker interact with other resources on Cloudflare’s Developer Platform. Choose bindings according to what the application needs; a basic Hello World Worker does not require you to add services just to complete the first deployment. Cloudflare explains bindings in its CLI guide and dashboard guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Where to check limits and pricing

The setup guides point to separate Workers limits and pricing documentation but do not establish current amounts. Check Cloudflare’s current official limits and pricing pages before choosing a plan or estimating usage; the setup instructions alone are not enough to determine either.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.