NEW Evolve Panel is now live
← DocumentationWEBSITE SERVICES

Run the website with PM2 on port 3003

Install dependencies, create the local environment file, build Next.js and keep it running behind Nginx.

Project path

This guide uses /var/www/evolve-customs-hosting. Change the path when your extracted folder is different.

1. Install and configure

Terminal
cd /var/www/evolve-customs-hosting
npm ci
cp -n .env.example .env.local
nano .env.local

2. Generate the admin session secret

Terminal
openssl rand -hex 48

Paste the generated value after ADMIN_SESSION_SECRET= in .env.local.

3. Build and start PM2

Terminal
npm run build
pm2 start ecosystem.config.cjs
pm2 save

The included PM2 configuration starts Next.js on 127.0.0.1:3003.

4. Verify port 3003

Terminal
pm2 status
pm2 logs evolve-customs-hosting --lines 50
sudo ss -lptn | grep :3003
curl -I http://127.0.0.1:3003

5. Nginx reverse proxy

Nginx
location / {
    proxy_pass http://127.0.0.1:3003;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

6. Test and reload Nginx

Terminal
sudo nginx -t
sudo systemctl reload nginx

Updating the website

Terminal
cd /var/www/evolve-customs-hosting
npm ci
npm run build
pm2 restart evolve-customs-hosting
Manage content

Open the website admin panel

Open admin