Payload CMS installation
Payload CMS installation guide
Payload CMS requires Node.js to run. To install and operate Payload CMS, you need a server environment—either a VPS, dedicated server, or shared hosting—that supports Node.js
server specifications.
- Operating System : Ubuntu 20.04+ (recommended: Ubuntu 22.04 LTS)
- Server Type : VPS or Dedicated Server
- RAM : Minimum 2 GB (recommended: 4 GB or more)
- Storage : Minimum 10 GB free disk space
- Processor : 1 vCPU cores
- Network : 4 TB bandwidth
Software requirements
- Node.js v18+
- pnpm Latest
- Docker v24+
- Docker Compose v2+
- Nginx Latest
- Postgres database
Setting up vps
-
Update Your Server
sudo apt update && sudo apt upgrade -y -
Install Node.js & npm
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install -y nodejs node -v npm -v -
Install Docker & Docker Compose
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin docker --version docker compose version -
Start Docker
sudo systemctl enable docker sudo systemctl start docker -
Setup Nginx as Reverse Proxy
sudo apt install nginx -y sudo nano /etc/nginx/sites-available/cosmus.conf -
Add the following configuration
server { server_name yourdomain.com; location /_next/static/ { add_header Cache-Control "public, max-age=31536000, immutable"; proxy_pass http://nextjs_app; } location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } -
Now run nginx server
sudo ln -s /etc/nginx/sites-available/cosmus.conf /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl restart nginx