All posts
Web design & development

Where to Host Payload CMS: Vercel, Railway, Fly or Your Own Server

Payload CMS hosting compared: Vercel, Railway, Fly, Cloudflare Workers or your own server, judged on database, media storage, serverless limits and upkeep.

By Mehdi Hassan9 min read

The short answer

Payload CMS hosting works anywhere Next.js runs, so the real choice is about the database, media storage and who maintains it. Host on Vercel with managed Postgres and Blob storage for the least ops work, a container host like Railway or Fly for a long-running server, or Cloudflare Workers for low cost with more setup.

Key takeaways

  • Payload runs inside Next.js, so any Next.js host works; the database and media storage decide the rest.
  • Never store uploads on a serverless or ephemeral filesystem; use a storage adapter such as S3, R2 or Vercel Blob.
  • On Vercel, Payload's docs cap server uploads at 4.5MB; turn on client uploads to go past it.
  • Long-running hosts like Railway, Fly or a VPS suit background jobs; serverless hosts need a cron to run them.
  • Pick managed Postgres with backups and run migrations on deploy, not schema push.

Part of Website Hosting for Startups: What You Need and What You Don't

Payload 3 installs inside a Next.js app, so hosting Payload means hosting a Next.js app that also needs a database, file storage and a secret key. That makes the decision simpler than it looks. This guide compares the main options on those needs; for how we set Payload up for editors, see setting up Payload CMS for a marketing site, and for hosting in general, our hub on website hosting for startups.

Where should you host Payload CMS?

Host Payload CMS where your Next.js site already runs, then choose a managed database and an object store next to it. For most marketing sites that means Vercel plus managed Postgres and Blob storage, a container host such as Railway or Fly running a Node server, or Cloudflare Workers with D1 and R2.

Payload's own deployment docs say it can be deployed anywhere Next.js can, and list Vercel, Netlify, DigitalOcean and AWS among the targets. So the question isn't whether a host supports Payload. It's which host makes the database, uploads, background jobs and upgrades least painful for the people who will maintain the site.

Option

Runtime

Best for

Watch out for

Vercel

Serverless functions

Least hosting work for Next.js teams

Upload size limit, jobs need a cron, seat pricing

Railway or Fly

Long-running container

Teams that want a normal Node server

You manage the image, scaling and health checks

Cloudflare Workers

Edge runtime with an adapter

Low cost and global caching

Platform limits, patches and more setup

Your own VPS

Node process you run

Full control or strict data rules

Patching, backups and uptime are all yours

What does Payload CMS hosting actually need?

Payload CMS hosting needs four things beyond a place to run Next.js: a database, persistent file storage for uploads, a long and secret PAYLOAD_SECRET value, and a way to run background jobs if you use them. Miss any one and the site works in development but breaks in production.

  • A database. Payload's official adapters cover Postgres, MongoDB and SQLite. For a marketing site, managed Postgres is the common choice.
  • Persistent media storage. Payload's deployment docs warn that uploads on an ephemeral filesystem can disappear when the server restarts. Use a storage adapter: Payload documents official ones for S3, Vercel Blob, Azure, Google Cloud Storage, Uploadthing and R2.
  • Secrets in environment variables. PAYLOAD_SECRET and DATABASE_URL belong in the host's settings, never in the repository.
  • A job runner, if you queue work. Scheduled publishing and other queued tasks need something to trigger them.

The runtime model matters most. A serverless host spins functions up and down per request, while a container host keeps one Node process alive. Payload works on both, but jobs, uploads and database connections behave differently, as the next sections show.

Can you deploy Payload CMS on Vercel?

Yes. You can deploy Payload CMS on Vercel, and it's the lowest-effort route for a Next.js team, because Payload ships Vercel-specific adapters: a Postgres adapter optimized for Vercel and a Vercel Blob storage adapter. Payload also maintains one-click Vercel templates, so a working admin is a short setup away.

Three details catch teams out. First, Payload's storage adapter docs note that server uploads on Vercel are limited to 4.5MB, and recommend turning on client uploads, which send files straight from the browser to storage, to get past it. Second, Payload's jobs docs say the autoRun option needs a long-running server and won't work on serverless platforms; instead you call Payload's jobs endpoint from Vercel Cron and protect it with a CRON_SECRET. Third, Vercel's paid plans price per seat, which we cover in Vercel vs Netlify vs Cloudflare.

We describe Vercel's behavior from Payload's docs. Vercel's limits and plans change, so check its current documentation and pricing page before you commit. Our Vercel integration page covers how we set Next.js projects up there.

When do Railway, Fly or your own server make sense?

A long-running host such as Railway, Fly or a VPS makes sense when you want Payload to behave like a normal Node server: one process that stays up, runs background jobs on a schedule and holds steady database connections. It's a good fit for sites with scheduled publishing, imports or webhooks that run longer than a serverless request.

Payload's docs include a Docker setup that builds Next.js in standalone output mode and runs it as a Node server, which is the shape these platforms expect. For jobs, the docs recommend Payload's bin script with the --cron flag on a dedicated server, running as a separate process from Next.js. Railway and Fly both run containers and offer database options alongside them; check their current docs for what's managed and what isn't.

Pros

  • Background jobs and cron run without workarounds
  • No serverless upload or timeout limits to design around
  • Predictable runtime that matches local development
  • Easy to move between providers with the same Docker image

Cons

  • You own the image, health checks and scaling rules
  • A single instance is a single point of failure unless you add more
  • Static pages still need a CDN in front for global speed
  • On a VPS, OS patches and backups are entirely your job

Your own server is the most control and the most work. Choose it when data has to stay in your company's cloud account, and make sure the accounts are in the company's name, as our website ownership checklist explains.

Where should Payload's Postgres database live?

Payload's Postgres database should live in a managed Postgres service in the same region as your app, with automatic backups and point-in-time restore turned on. Distance matters: every admin action and every uncached page query makes a round trip to the database, so a database on another continent slows the admin noticeably.

On serverless hosts, use a provider that handles connection pooling, since many short-lived functions can each open a connection. On a long-running server, a normal connection pool works. Either way, Payload's Postgres docs say schema push is for development only and shouldn't be mixed with migrations, so run migrations as part of each deploy.

  1. Pick the region first

    Put the database next to the app's primary region, not next to your office.

  2. Turn on backups

    Use the provider's automatic backups and test a restore once before launch.

  3. Run migrations on deploy

    Generate migrations when the schema changes and run them before the new version serves traffic.

  4. Back up media separately

    Database backups don't include files in object storage, so copy the bucket on its own schedule.

Is Cloudflare Workers a good host for Payload?

Cloudflare Workers is a good host for Payload if you want low running costs and edge caching and have a developer comfortable with platform quirks. It's what we run designify.design on, with a D1 database and R2 for media, but it isn't a one-click deploy.

Payload documents an R2 storage adapter, currently marked beta and aimed at Workers. In our experience the paid Workers plan is needed for the admin, image resizing has to replace sharp, and some packages need patches. The full walkthrough is in hosting Next.js on Cloudflare Workers. If nobody on the team wants to own those details, Vercel or a container host is the calmer choice.

Hypothetical example: picking a host for a 10-page SaaS site

For example, suppose a SaaS startup has a 10-page Next.js site with Payload, two marketers editing and a blog with scheduled posts. The product team already deploys to Vercel.

We'd keep the site on Vercel so there's one platform to manage, add managed Postgres in the same region, switch uploads to Vercel Blob with client uploads on, and trigger scheduled publishing with Vercel Cron.

Now suppose the same company has a strict rule that customer-facing data stays in its own AWS account. Then we'd run the same Next.js and Payload app as a Docker container in that account, with managed Postgres, S3 for media and the jobs runner as a separate process. This is a planning sketch, not a real client.

How do you choose a Payload host for your team?

Choose by who maintains the site, not by benchmark charts. The right host is the one your team can deploy, debug and pay for without thinking about it every week.

Your situation

Host to pick

Why

Already on Vercel, few seats

Vercel

Least new tooling; Payload has Vercel adapters

Scheduled jobs, imports or long tasks

Railway, Fly or a container host

A long-running process runs jobs natively

Cost-sensitive, capable developer

Cloudflare Workers

Low running cost and edge caching

Data must stay in your cloud account

Your own AWS, GCP or Azure

Full control over region and access

Whatever you pick, keep hosting costs in context: the database, media storage and seats often cost more than compute, as our guide to website hosting cost shows. Add preview deployments so editors and reviewers can check changes before they go live. Our Payload integration page and headless CMS development service describe how we build these setups.

Frequently asked questions

Does Payload CMS have its own managed hosting?
Payload has offered its own cloud hosting in the past, but what it offers has changed over time, so check Payload's website for what's currently available before planning around it. Most teams today host Payload themselves on a Next.js-friendly platform such as Vercel, a container host or Cloudflare Workers, with a managed database and object storage alongside.
Can Payload CMS use MongoDB instead of Postgres?
Yes. Payload has an official MongoDB adapter, and its deployment docs also mention MongoDB-compatible services such as AWS DocumentDB and Azure Cosmos DB, with some compatibility limits. For a marketing site we usually pick Postgres because managed options are common and SQL is familiar, but MongoDB is a sound choice if your team already runs it.
Do I need a separate server for the Payload admin panel?
No. In Payload 3 the admin panel and APIs run as routes inside your Next.js app, so they deploy with the site. You don't need a second server for the CMS. You do need a database and file storage, and the host must run server code, so a purely static export won't run the admin.
Is serverless hosting slower for the Payload admin?
It can feel slower when a function starts cold or the database is far away, because each admin action runs server code and queries the database. Keeping the database in the same region as the functions helps most. A long-running server avoids cold starts entirely, which some editorial teams prefer for a busy admin.
How should I back up a self-hosted Payload site?
Back up two things separately: the database and the media bucket. Use your database provider's automatic backups and point-in-time restore, and copy the object storage bucket on a schedule to a second location. Keep the code in Git, and test a full restore at least once so you know the steps work before you need them.

· CEO & Design Director

Copywriter, designer and developer, and founder of Designify Studio. Over five years, 60+ projects across 14+ industries, for startups that have raised $300M+.

Want this done for you? Website, $8,000.

A multi-page marketing site, written and designed by us, developed in Next.js and animated. $8,000, one-time, up to 6 pages. Book a free 30-minute call to see if it fits.

Schedule Call