Back to articles
How I Deployed My Node.js App on a VPS With a Custom Domain & Free SSL

How I Deployed My Node.js App on a VPS With a Custom Domain & Free SSL

via Dev.to BeginnersMadhav Pandey

I deployed my personal project PBlog to a real VPS, connected it to my custom domain pblog.online , and secured it with free HTTPS. This post documents the exact steps I followed, from a blank server to a fully production-ready app. If you're new to VPS deployments, this guide will walk you through everything I learned along the way. ### 1. Creating VPS I used Kamatera to create an Ubuntu server. Once the server was ready, I connected via SSH: ssh root@YOUR_SERVER_IP 2. Installing Node.js and Git sudo apt update sudo apt install nodejs git -y 3. Cloning and running the app on a VPS I cloned my project from GitHub and ran it on that server git clone https://github.com/pmadhav82/P_blog.git cd P_blog npm install 4. Running the app with pm2 To keep the app running 24/7, I installed pm2: sudo npm install -g pm2 started the app: pm2 start app.js Now the app is running on port 8000 and can be accessed by visiting publicIP:8000 5. Installing and Configuring Nginx I installed Nginx: sudo apt in

Continue reading on Dev.to Beginners

Opens in a new tab

Read Full Article
6 views

Related Articles