Skip to contentChat

Shipping Next.js on an Indian VPS with PM2 and Nginx: Deploy Discipline Without Platform Lock-In

How we run Next.js on Indian VPS hosts with PM2 and Nginx: build, zero-downtime habits, SSL, caching headers and rollback — without Vercel lock-in.

Vercel is excellent. It is not mandatory. Many Indian clients want data residency vibes, predictable INR hosting bills, and SSH access. Next.js runs well on a VPS when build, process management and Nginx are boringly correct.

ShubhKarma Tech deploys client Next.js apps on VPS infrastructure from our Dehradun practice (Hirabhavan, Nanak Vihar, Patel Nagar, Dehradun 248001), including our own marketing site patterns with PM2 and Nginx.

Build on the server or in CI

Prefer CI artefacts when builds are heavy. If you build on the box, ensure Node version parity and enough RAM. Never delete .next while PM2 is serving it.

PM2 process habits

Name processes clearly. Restart after successful build. Keep logs. Use fork or cluster deliberately — do not cargo-cult cluster on a 1GB machine.

Nginx responsibilities

TLS, gzip/brotli where appropriate, static asset caching, reverse proxy to the Node port, security headers. Keep www→apex redirects consistent.

Rollback

Keep previous release directories. A bad deploy should be a symlink or folder switch away from panic.

WhatsApp +91 94111 72867 for a VPS deploy playbook tailored to your app.

When we scope this work at ShubhKarma Tech, we write the acceptance criteria into the proposal. The client should know which templates, which environments, and which hand-off documents are included — not discover the gaps after launch.

Our Dehradun studio at Hirabhavan, Nanak Vihar, Patel Nagar, Dehradun 248001 runs discovery on a call or WhatsApp (+91 94111 72867). We do not invent vanity metrics, DA packages, or “page one in 30 days” promises. The work either ships against a checklist or it is not done.

Indian 4G reality matters more than a US lab screenshot. Test on a mid-range Android phone on mobile data. If the H1 and primary CTA arrive after a popup, a chat widget, and a hero video, the architecture is wrong before SEO copy starts.

Internal linking is part of the job: service pages, case studies, city pages and blogs should point at each other with honest anchors. External Wikipedia and documentation links help readers and clarify entities — they are not a substitute for unique on-page content.

Documentation for the client team is non-negotiable: how to edit, how to deploy, where Search Console lives, and which URLs must stay stable. A pretty site that only the agency can update is a liability.

We prefer fewer plugins, fewer third-party scripts, and fewer animations that block interaction. Motion is welcome when it is budgeted. Scripts that fire on every page for a feature used once a month are not.

Security basics belong in the same sprint as marketing launches: HTTPS, auth hardening, rate limits on OTP and forms, backups, and a rollback path. Growth without those controls just scales risk.

After launch, watch Search Console and real user behaviour for two to four weeks before rewriting strategy. Fix crawl errors, thin duplicates and broken internal links first. Then iterate content.

When we scope this work at ShubhKarma Tech, we write the acceptance criteria into the proposal. The client should know which templates, which environments, and which hand-off documents are included — not discover the gaps after launch.

Our Dehradun studio at Hirabhavan, Nanak Vihar, Patel Nagar, Dehradun 248001 runs discovery on a call or WhatsApp (+91 94111 72867). We do not invent vanity metrics, DA packages, or “page one in 30 days” promises. The work either ships against a checklist or it is not done.

Indian 4G reality matters more than a US lab screenshot. Test on a mid-range Android phone on mobile data. If the H1 and primary CTA arrive after a popup, a chat widget, and a hero video, the architecture is wrong before SEO copy starts.

Internal linking is part of the job: service pages, case studies, city pages and blogs should point at each other with honest anchors. External Wikipedia and documentation links help readers and clarify entities — they are not a substitute for unique on-page content.

Documentation for the client team is non-negotiable: how to edit, how to deploy, where Search Console lives, and which URLs must stay stable. A pretty site that only the agency can update is a liability.

We prefer fewer plugins, fewer third-party scripts, and fewer animations that block interaction. Motion is welcome when it is budgeted. Scripts that fire on every page for a feature used once a month are not.

Security basics belong in the same sprint as marketing launches: HTTPS, auth hardening, rate limits on OTP and forms, backups, and a rollback path. Growth without those controls just scales risk.

After launch, watch Search Console and real user behaviour for two to four weeks before rewriting strategy. Fix crawl errors, thin duplicates and broken internal links first. Then iterate content.

When we scope this work at ShubhKarma Tech, we write the acceptance criteria into the proposal. The client should know which templates, which environments, and which hand-off documents are included — not discover the gaps after launch.

Our Dehradun studio at Hirabhavan, Nanak Vihar, Patel Nagar, Dehradun 248001 runs discovery on a call or WhatsApp (+91 94111 72867). We do not invent vanity metrics, DA packages, or “page one in 30 days” promises. The work either ships against a checklist or it is not done.

Indian 4G reality matters more than a US lab screenshot. Test on a mid-range Android phone on mobile data. If the H1 and primary CTA arrive after a popup, a chat widget, and a hero video, the architecture is wrong before SEO copy starts.

Internal linking is part of the job: service pages, case studies, city pages and blogs should point at each other with honest anchors. External Wikipedia and documentation links help readers and clarify entities — they are not a substitute for unique on-page content.

Documentation for the client team is non-negotiable: how to edit, how to deploy, where Search Console lives, and which URLs must stay stable. A pretty site that only the agency can update is a liability.

We prefer fewer plugins, fewer third-party scripts, and fewer animations that block interaction. Motion is welcome when it is budgeted. Scripts that fire on every page for a feature used once a month are not.

Security basics belong in the same sprint as marketing launches: HTTPS, auth hardening, rate limits on OTP and forms, backups, and a rollback path. Growth without those controls just scales risk.

After launch, watch Search Console and real user behaviour for two to four weeks before rewriting strategy. Fix crawl errors, thin duplicates and broken internal links first. Then iterate content.

When we scope this work at ShubhKarma Tech, we write the acceptance criteria into the proposal. The client should know which templates, which environments, and which hand-off documents are included — not discover the gaps after launch.

Our Dehradun studio at Hirabhavan, Nanak Vihar, Patel Nagar, Dehradun 248001 runs discovery on a call or WhatsApp (+91 94111 72867). We do not invent vanity metrics, DA packages, or “page one in 30 days” promises. The work either ships against a checklist or it is not done.

Indian 4G reality matters more than a US lab screenshot. Test on a mid-range Android phone on mobile data. If the H1 and primary CTA arrive after a popup, a chat widget, and a hero video, the architecture is wrong before SEO copy starts.

Internal linking is part of the job: service pages, case studies, city pages and blogs should point at each other with honest anchors. External Wikipedia and documentation links help readers and clarify entities — they are not a substitute for unique on-page content.

Documentation for the client team is non-negotiable: how to edit, how to deploy, where Search Console lives, and which URLs must stay stable. A pretty site that only the agency can update is a liability.

We prefer fewer plugins, fewer third-party scripts, and fewer animations that block interaction. Motion is welcome when it is budgeted. Scripts that fire on every page for a feature used once a month are not.

Security basics belong in the same sprint as marketing launches: HTTPS, auth hardening, rate limits on OTP and forms, backups, and a rollback path. Growth without those controls just scales risk.

After launch, watch Search Console and real user behaviour for two to four weeks before rewriting strategy. Fix crawl errors, thin duplicates and broken internal links first. Then iterate content.

When we scope this work at ShubhKarma Tech, we write the acceptance criteria into the proposal. The client should know which templates, which environments, and which hand-off documents are included — not discover the gaps after launch.

Our Dehradun studio at Hirabhavan, Nanak Vihar, Patel Nagar, Dehradun 248001 runs discovery on a call or WhatsApp (+91 94111 72867). We do not invent vanity metrics, DA packages, or “page one in 30 days” promises. The work either ships against a checklist or it is not done.

Indian 4G reality matters more than a US lab screenshot. Test on a mid-range Android phone on mobile data. If the H1 and primary CTA arrive after a popup, a chat widget, and a hero video, the architecture is wrong before SEO copy starts.

Internal linking is part of the job: service pages, case studies, city pages and blogs should point at each other with honest anchors. External Wikipedia and documentation links help readers and clarify entities — they are not a substitute for unique on-page content.

Documentation for the client team is non-negotiable: how to edit, how to deploy, where Search Console lives, and which URLs must stay stable. A pretty site that only the agency can update is a liability.

We prefer fewer plugins, fewer third-party scripts, and fewer animations that block interaction. Motion is welcome when it is budgeted. Scripts that fire on every page for a feature used once a month are not.

Security basics belong in the same sprint as marketing launches: HTTPS, auth hardening, rate limits on OTP and forms, backups, and a rollback path. Growth without those controls just scales risk.

After launch, watch Search Console and real user behaviour for two to four weeks before rewriting strategy. Fix crawl errors, thin duplicates and broken internal links first. Then iterate content.

When we scope this work at ShubhKarma Tech, acceptance criteria go in the proposal: templates, environments, and hand-off documents — not gaps after launch.

Our Dehradun studio at Hirabhavan, Nanak Vihar, Patel Nagar, Dehradun 248001 runs discovery on a call or WhatsApp (+91 94111 72867). We do not invent vanity metrics or DA packages.

Indian 4G reality matters more than a US lab screenshot. Test on a mid-range Android phone on mobile data before you call the page done.

Internal linking is part of the job: service pages, case studies, city pages and blogs should point at each other with honest anchors.

External Wikipedia and official documentation links help readers clarify entities. They do not replace unique on-page content about your offer.

Documentation for the client team is non-negotiable: how to edit, how to deploy, where Search Console lives, and which URLs must stay stable.

We prefer fewer plugins, fewer third-party scripts, and fewer animations that block interaction. Motion is welcome when it is budgeted.

Security basics belong in the same sprint as marketing launches: HTTPS, auth hardening, rate limits on OTP and forms, backups, and a rollback path.

After launch, watch Search Console and real user behaviour for two to four weeks before rewriting strategy. Fix crawl errors and broken internal links first.

City SEO pages only help when the copy has local hooks and the business can actually serve that city — doorway clones waste crawl budget.

Case studies such as DostAE and The Odd Factory exist to show delivery, not to invent metrics. Link them where the craft matches.

If a third-party script cannot justify its weight on first interaction, load it later or remove it. Marketing tags are not free on INP.

Frequently asked questions

Is VPS slower than a global edge network?

Edge can win for static assets worldwide. For India-first audiences, a well-tuned Indian VPS plus CDN is often enough.

Can I mix CDN with VPS origin?

Yes — Cloudflare in front of origin is a common pattern.

Wiki & reference links

Related links

Back to Blog