Appearance
How to self-host on Cloudflare
This guide will walk you through the steps required to self-host your WeWeb application on Cloudflare.
INTERFACE HOSTING
This guide covers hosting the interface of your WeWeb app on Cloudflare Pages.
If your project also depends on backend services, database hosting, file storage, or authentication hosting, you need to host those parts separately as well.
Prerequisites
- A Cloudflare account (free)
- An Essential or higher WeWeb workspace plan subscription
Let's start with Cloudflare first:
- On Cloudflare's dashboard, click on the Workers & Pages section.

- Make sure you are on the Overview tab. If you already have another Worker in this section, click on the Create button and then go to the Pages tab.
- Go to the second section on the page and click on "Upload assets".

- Give your project a name and then click on Create project.

WeWeb
- In the WeWeb editor, generate a code export of your app. Click
Publishat the top right, chooseExport, then clickGenerate code export.
TIP
Your project must have been published at least once before you can export the project files.
Next, go to your WeWeb dashboard and click on your project's card. The project opens on its
Deploymentstab, where your export appears with theExportedstatus.Click on the three dots at the end of the exported version's row and select
Download built Interface files. This will download a zip directory of the project files to your device. This zip archive includes the compiled project (a Vue.js application) with all the files necessary for hosting it on Cloudflare.

Cloudflare
- Upload the zip archive you just downloaded from WeWeb into the Upload your project assets section. Make sure you select Upload zip before you upload.

- Click the "Deploy site" button after all files are successfully uploaded.

Upon deploying, Cloudflare will provide you with some additional information and options:
- Cloudflare site URL
- Option to add a custom domain
You can ignore the other options for now.

10, If you click on "Continue to project", you will be redirected to the Deployments tab of your applications's Worker:

Your application is now live and fully self-hosted on Cloudflare!

Making changes to the self-hosted application
- Make changes in your app in WeWeb.
- Publish the application again.
- Export the code following the steps described earlier.
- Download new zip file for latest version.
- In the Overview of Workers & Pages, go to the Deployments tab and click on Create a new deployment.

- Select your deployment environment
- Upload the new zip archive.
- Click on Save and deploy.

After a successful deployment, your changes will be reflected in the self-hosted application.

TIP
Always test your updated application thoroughly after deployment to ensure all changes are correctly reflected and functioning as expected.
By following these steps, you can easily export your WeWeb project and self-host it on Cloudflare, as well as keep it updated with any changes you make in WeWeb.

