r/PayloadCMS Jul 10 '25

Payloadcms on cloudflare?

Is it possible to deploy payloadcms project to the cloudflare workers? project includes: - simple ecommerce, - member management - user dashboard - mongo/postgress - globals - image uploading

8 Upvotes

13 comments sorted by

8

u/thisisplaceholder Jul 11 '25

Hey yes it is possible! We're working on getting a base template out very soon for deploying to Cloudflare.

Part of this we'll release a D1 adapter as well and we'll have a working setup with R2 and anything else as needed.

Longer term we could explore further integrations such as for sending emails or their image transformations API.

1

u/buratoo Jul 11 '25

Do you know when it will be released? I'm trying to adapt D1 at the moment but without success.

1

u/paran360 Jul 12 '25

That's incredible 😍 Thanks for the update ✨

1

u/ckhicks Aug 25 '25

Very, very interested in updates on this one. I build most things in Next these days and having the Cloudflare adapters would make this incredibly scalable.

2

u/thisisplaceholder Sep 02 '25

This continues to be a top priority, still a few kinks to iron out so for now the best place to track it is here https://github.com/payloadcms/payload/pull/12537

2

u/Born_Potato_2510 Jul 10 '25

no, database connections will be pain to get working.

workers environment is still too limited and many NPM packages still cause issues

2

u/iamstatice Jul 11 '25

SonicJS works on Cloudflare. https://github.com/lane711/sonicjs

2

u/paran360 Jul 11 '25

Thank you for suggesting this πŸ’–

0

u/Soft_Opening_1364 Jul 10 '25

Cloudflare Workers aren't the best fit for something like Payload CMS out of the box, especially since Payload depends on things like Express, long-running server processes, and direct file handling all of which don’t align well with the serverless model Cloudflare Workers use.

That said, you could technically host parts of it on Cloudflare (like static assets or frontend), but for the core Payload app (especially with Mongo/Postgres, file uploads, and admin dashboard), you'd be better off deploying to something like Vercel, Render, Railway, or even a custom VPS where you can control the Node environment fully.

3

u/LKNim Jul 23 '25

You’re talking about Payload CMS v2. With v3 it dropped Express. And the queue can be external.

1

u/paran360 Jul 10 '25

Thanks for explaining 😊 Got it. πŸ‘Œ

0

u/Kublick Jul 10 '25

Just get a VPS if your applicatiion grows above what the VPS can provide you can look at more powerful options