[{"data":1,"prerenderedAt":168},["ShallowReactive",2],{"seo-verification":3,"blog-deploying-a-payload-cms-application-on-a-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"slugs":9,"title":12,"excerpt":13,"readTime":14,"views":15,"isPinned":16,"publishedAt":17,"category":18,"categories":24,"featuredImage":26,"bgImage":27,"posterImage":28,"relatedSolution":26,"intro":29,"sections":30,"ctaTitle":116,"ctaBody":117,"ctaButton":118,"ctaUrl":119,"relatedPosts":120},55,"deploying-a-payload-cms-application-on-a-vps",{"fr":10,"en":8,"ar":11},"deployer-payload-cms-vps","نشر-تطبيق-payload-cms-على-خادم-vps","Deploying a Payload CMS application on a VPS","Deploy Payload CMS on a Cloud VPS: Next.js app, MongoDB or PostgreSQL, Docker, reverse proxy and SSL. Payload vs Strapi comparison included.",5,1,false,"2026-04-26T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},4,"Development","developpement","bg-warning\u002F10 text-warning","dev",[25],{"id":19,"name":20,"slug":21,"color":22,"icon":23},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fdeployer-payload-cms-vps-poster.svg","Payload CMS is a TypeScript-first headless CMS that integrates natively into Next.js. Self-hosting it on a VPS gives you a unified code-first stack, where the CMS and the front end share the same runtime. Here is how to deploy it in production, with its database and a comparison against Strapi.",[31,35,45,48,70,73,113],{"type":32,"title":33,"body":34},"h2","Why self-host Payload CMS on a VPS","Payload CMS takes a radically code-first approach: your content schema is defined in TypeScript in configuration files, versioned with Git, and since its version 3 Payload installs directly into a Next.js application via the App Router. This means a VPS lets you host the CMS and the front-end site in a single Node process, sharing the build and the runtime. You get end-to-end typing, schema migrations managed in code, and no dependency on a graphical interface to model your content. Self-hosting is the natural option here: Payload is designed to be deployed like any Next.js app, and a VPS gives you control of the database (MongoDB or PostgreSQL), the uploads and the environment variables, without an intermediary platform.",{"type":36,"title":37,"items":38},"ul","Concrete benefits",[39,40,41,42,43,44],"Content schema defined in TypeScript and versioned with Git: full code review and history","CMS and Next.js front end in a single runtime: one build, one process to deploy","End-to-end typing between the Payload config, the API and the front end, without manual generation","Choice of database: MongoDB or PostgreSQL via the official adapters","Schema migrations driven by code (`payload migrate`), reproducible across environments","Local API: direct data access without an HTTP call from Next.js server code",{"type":32,"title":46,"body":47},"Hardware and software prerequisites","Since Payload relies on Next.js, the build is demanding: plan for a VPS with 2 vCPU and 4 GB of RAM to build and run the application comfortably, especially if the Next.js front end is substantial. Install Node.js 20 LTS, Docker and Docker Compose. On the database side, provision MongoDB 7 or PostgreSQL 16 depending on the chosen adapter (`@payloadcms\u002Fdb-mongodb` or `@payloadcms\u002Fdb-postgres`). Point your domain at the VPS IP. Count 15 GB of disk for the `node_modules`, the `.next` build, the uploads and the database backups.",{"type":49,"title":50,"steps":51},"steps","Step-by-step deployment",[52,55,58,61,64,67],{"title":53,"body":54},"Choose and configure the database adapter","In `payload.config.ts`, declare the adapter: `mongooseAdapter` for MongoDB or `postgresAdapter` for PostgreSQL, reading the connection URL from `DATABASE_URI`. This choice is structural: PostgreSQL requires migrations, MongoDB is more flexible on the schema.",{"title":56,"body":57},"Set the secret and build the Next.js app","Set `PAYLOAD_SECRET` (the token encryption key) in the environment. Run `npm run build`: since Payload 3 lives inside Next.js, this command compiles both the Payload admin and your front end. Watch the RAM during the build.",{"title":59,"body":60},"Containerize with Docker Compose","Create a `node:20-alpine` Dockerfile that builds the app and runs `npm start`, then a `docker-compose.yml` linking the `app` service to a `mongo` or `postgres` service. Mount a volume for the uploads and pass `DATABASE_URI` and `PAYLOAD_SECRET` as variables. Run `docker compose up -d`.",{"title":62,"body":63},"Run the migrations (PostgreSQL)","If you use the PostgreSQL adapter, apply the schema with `npm run payload migrate` after the containers start. With MongoDB, the schema is applied automatically, no manual migration is needed.",{"title":65,"body":66},"Configure Nginx as a reverse proxy","Point a vhost to `http:\u002F\u002F127.0.0.1:3000` (Next.js default port). Increase `client_max_body_size` for media uploads and add the `X-Forwarded-Proto` headers so that Payload generates correct HTTPS URLs.",{"title":68,"body":69},"Secure with SSL and set the server URL","Run `certbot --nginx -d mydomain.com`, then set `serverURL: 'https:\u002F\u002Fmydomain.com'` in `payload.config.ts`. This URL conditions the media links, the reset emails and the correct operation of the admin panel behind the proxy.",{"type":32,"title":71,"body":72},"When `sharp` refuses to load","This is the first obstacle of a VPS deployment, and it takes three distinct forms worth telling apart. The most confusing is `Unsupported CPU: prebuilt binaries for linux-x64 require v2 microarchitecture`: it comes from neither your code nor your dependencies, but from the **machine's processor**. Prebuilt binaries target an instruction set the oldest CPUs do not expose — so it is a VPS selection criterion, not a bug to fix. The second, `Could not load the \"sharp\" module using the linux-x64 runtime`, almost always signals a `node_modules` built on another platform, typically a development macOS copied onto a Linux server: reinstall on the target machine rather than shipping the folder. The third is specific to multi-stage Docker: `sharp` installed in the build stage only, missing from the runtime stage — the container starts, then fails on the first image operation. Install it explicitly in the final stage. On ARM architecture the same care applies: the library must resolve for that platform.",{"type":74,"title":75,"headers":76,"rows":80},"comparison","Payload CMS vs Strapi: which headless CMS to self-host?",[77,78,79],"Criterion","Payload CMS","Strapi",[81,85,89,93,97,101,105,109],[82,83,84],"Configuration approach","Code-first in TypeScript, versioned with Git","GUI-first via the Content-Type Builder",[86,87,88],"Front-end integration","Native in Next.js (a single runtime)","Decoupled, front end and CMS separate",[90,91,92],"Supported databases","MongoDB and PostgreSQL","PostgreSQL, MySQL, SQLite",[94,95,96],"Typing","Native end-to-end TypeScript","Generated types, looser integration",[98,99,100],"Server data access","Local API without an HTTP call","REST\u002FGraphQL API via HTTP",[102,103,104],"Content modeling","In the code, by developers","In the interface, accessible to non-developers",[106,107,108],"RAM needed for the build","High (Next.js build)","High (React admin build)",[110,111,112],"Ideal for","Dev teams, typed Next.js projects","Mixed teams, visual modeling",{"type":114,"body":115},"tip","Leverage Payload's Local API in your Next.js server components: instead of calling your own API via `fetch`, import `getPayload` and query the database directly (`payload.find({ collection: 'posts' })`). You remove an HTTP round-trip and gain in latency as well as in security. For media, plug in the `@payloadcms\u002Fstorage-s3` plugin to store uploads off the VPS, and automate a daily dump of your database via a cron to guarantee off-server backups.","Deploy Payload CMS on a unified stack","The ServOrbit Cloud VPS offers the power needed for Payload's Next.js build and a Docker environment ready for MongoDB or PostgreSQL, to host your code-first CMS and your front end on the same machine.","Discover the Cloud VPS","\u002Fvps-cloud",[121,136,153],{"id":14,"slug":122,"slugs":123,"title":126,"excerpt":127,"readTime":19,"views":128,"isPinned":16,"publishedAt":129,"category":130,"categories":131,"featuredImage":26,"bgImage":27,"posterImage":133,"relatedSolution":134},"deploying-laravel-on-a-vps-a-production-guide",{"fr":124,"en":122,"ar":125},"deployer-laravel-vps","نشر-laravel-على-خادم-vps-دليل-الإنتاج","Deploying Laravel on a VPS: a production guide","Take Laravel to production on a VPS: PHP, workers, cache, database, reverse proxy and HTTPS configured cleanly.",0,"2026-02-09T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[132],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fdeployer-laravel-vps-poster.svg",{"categorySlug":23,"appSlug":135},"laravel-stack",{"id":137,"slug":138,"slugs":139,"title":142,"excerpt":143,"readTime":144,"views":128,"isPinned":16,"publishedAt":145,"category":146,"categories":147,"featuredImage":26,"bgImage":27,"posterImage":149,"relatedSolution":150},43,"deploy-a-nodejs-application-on-a-vps",{"fr":140,"en":138,"ar":141},"deployer-nodejs-vps","نشر-تطبيق-nodejs-على-vps","Deploy a Node.js Application on a VPS","Deploy a Node.js application to production on a VPS: PM2, Nginx reverse proxy, Let's Encrypt SSL, and automatic startup at boot.",3,"2026-05-08T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[148],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fdeployer-nodejs-vps-poster.svg",{"categorySlug":151,"appSlug":152},"development","nodejs-stack",{"id":154,"slug":155,"slugs":156,"title":159,"excerpt":160,"readTime":144,"views":128,"isPinned":16,"publishedAt":161,"category":162,"categories":163,"featuredImage":26,"bgImage":27,"posterImage":165,"relatedSolution":166},44,"deploy-a-django-application-on-a-vps",{"fr":157,"en":155,"ar":158},"deployer-django-vps","نشر-تطبيق-django-على-vps","Deploy a Django Application on a VPS","Deploy Django on a VPS: Gunicorn, Nginx, PostgreSQL, Docker, and SSL. A complete guide for Python developers who want to self-host.","2026-05-07T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[164],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fdeployer-django-vps-poster.svg",{"categorySlug":151,"appSlug":167},"django",1787580996451]