Deploy a React App on a VPS with Custom Domain & SSL

Abhishek madoliya 14 Jan 2026 5 min read #React deployment
Deploy a React App on a VPS with Custom Domain & SSL

If you are only deployed React apps on Netlify or Vercel so far, you’re not alone. Almost everyone starts there.

But here’s the uncomfortable truth people don’t say out loud in interviews: companies don’t hire you just because your app “works.” They hire you because you understand how software actually lives on the internet.

Knowing how to deploy a React app on a VPS with a custom domain and SSL is no longer a niche DevOps trick. In 2026 it’s a career signal. It tells hiring managers you understand the real web, not just frameworks. Having solid knowledge of vps deployment can be useful in your tech interviews, so if you never done this before, this guide will teach you zero to production ready setup with steps


What Does Deploying a React App on a VPS Actually Mean?

A VPS (Virtual Private Server) is your own slice of a real machine on the internet. Unlike serverless platforms, nothing is abstracted away from you.You decide how files are served, which ports are open, how traffic reaches your app, and how HTTPS is handled.

This is exactly how most production systems still work under the hood, even if companies use Kubernetes or managed cloud platforms.


Who Should Learn This in 2026?

Students & Freshers

If you’re early in your career, this instantly separates you from “tutorial developers.” Anyone can build a React UI. Very few can explain how it reaches users securely.

Frontend Developers

Frontend roles are quietly shifting. Companies expect you to understand hosting, caching, and basic server setup—not because you’ll manage servers daily, but because context matters.

Full-Stack & Indie Builders

If you plan to ship real products, relying forever on managed platforms limits both your control and your learning.


Outdated vs Future-Proof Deployment Skills

Outdated Thinking

“Deploy means clicking a button.” “DevOps is someone else’s job.” “I only need to know React.”

Future-Proof Thinking

“I understand how traffic flows.” “I know how HTTPS actually works.” “I can debug production issues.”


What You’ll Need Before We Start

You don’t need fancy tools or expensive services.

A VPS (DigitalOcean, Hetzner, AWS EC2), a domain name, Ubuntu 20.04 or newer, and basic terminal comfort are enough.


Step 1: Connect to Your VPS

Once your VPS is created, you’ll receive an IP address. Connect using SSH:


ssh root@your_server_ip

If this feels uncomfortable, that’s normal. This is how engineers actually work.


Step 2: Install Required Software

Update the Server


apt update && apt upgrade -y

Install Node.js (LTS)


curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt install -y nodejs

Most production systems still prefer LTS versions. Stability beats novelty in real companies.

Install Nginx


apt install -y nginx

Nginx remains one of the most widely used web servers in the world. Learning it aligns you with reality, not hype.


Step 3: Build Your React App

On your local machine, run:


npm run build

This generates a build folder. That folder—not your source code—is what gets deployed.

Understanding this separation is critical in production environments.


Step 4: Upload the Build to the Server

Copy the build directory to your VPS:


scp -r build root@your_server_ip:/var/www/react-app

For static React apps, there’s no need to run Node in production. Nginx serves these files faster and more reliably.


Step 5: Configure Nginx

Create a new configuration file:


nano /etc/nginx/sites-available/react-app

Add the following configuration:


server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;

    root /var/www/react-app;
    index index.html;

    location / {
        try_files $uri /index.html;
    }
}

Enable the site and reload Nginx:


ln -s /etc/nginx/sites-available/react-app /etc/nginx/sites-enabled
nginx -t
systemctl reload nginx

Step 6: Point Your Domain to the VPS

At your domain registrar, create:

An A record pointing to your server IP A www record pointing to the same IP

DNS propagation can take time. This delay is normal and unavoidable.


Step 7: Secure the Site with SSL

Install Certbot:


apt install -y certbot python3-certbot-nginx

Generate the SSL certificate:


certbot --nginx -d yourdomain.com -d www.yourdomain.com

This step automates HTTPS setup and renewal. Modern browsers and users expect this by default.


Common Mistakes Developers Make

Deploying source code instead of the build folder Forgetting SPA routing rules in Nginx Ignoring server logs Treating deployment as a one-time task


Why This Skill Still Matters in an AI-Dominated Future

AI can generate code quickly. It can scaffold applications and suggest configurations.

What it can’t replace is operational understanding. Knowing how systems behave under real traffic is still a human advantage.


What Companies Actually Hire For

Companies rarely ask, “Can you deploy a React app?”

They ask:

Can you explain how DNS works? Do you understand HTTPS and certificates? Can you debug production issues calmly?

This deployment knowledge answers all of those questions.


Final Thoughts

Deploying a React app on a VPS isn’t about showing off. It’s about understanding how the web actually works.

Once you understand that, frameworks become tools—not crutches.

That’s the difference between someone who follows tutorials and someone companies trust with real systems.