Skip to content

deploy redwood web side with cloudflare pages

  • Redwood
  • Coudflare
  • GitHub
  • Jamstack


Cloudflare Pages is a Jamstack platform for frontend developers to collaborate and deploy websites. It’s a lot like {{ insert_favorite_Jamstack_host }}. Simply connect to a GitHub repo, supply the necessary build commands and publish directories, and deploy your site to the world with just git push.

At this time it is not yet possible to deploy the Redwood api with Cloudflare Workers. However, we can simply delete the api directory and deploy just the web side.

Create Redwood App

The code for this article can be found on my GitHub.

yarn create redwood-app redwood-cloudflare-pages
cd redwood-cloudflare-pages

Delete API Directory

rm -rf api

Generate Home Page

yarn rw g page home /

Include the following in HomePage.js.

const HomePage = () => {
  return (
      <h1>Redwood+Cloudflare Pages 🚀</h1>

export default HomePage

Start Development Server

yarn rw dev


Create GitHub Repo

Create a blank repository on GitHub with the same name as your Redwood project.

Initialize Repository

Initialize a git repo in your newly created Redwood project.

git init
git add .
git commit -m "Nailed it"
git branch -M main

Add Remote to Project

Make sure to use your own repo when setting the remote.

git remote add origin

Push to Main

git push -u origin main

Connect GitHub Repo to Cloudflare Pages

Sign up for Cloudflare Pages.


Click “Create a project.”


Select your Redwood project and click the “Begin setup” button at the bottom.


Your project name and production branch will be set automatically.


The build settings are blank. Enter:

  • yarn rw build web for the build command
  • web/dist for the build output directory


Click “Save and deploy.”


Go take a nice long walk around the block, grab some coffee, take out your dry cleaning, file your taxes, complete that 10,000 piece puzzle you’ve been putting off, and then come back and your website build should be done.


Once the build finishes you will see the build and deployment settings at the bottom and a link to your site at the top.


Click the link to and you should see the following page.