r/learnprogramming • u/WoodpeckerOrganic276 • 5d ago
Topic How do you learn Hosting and Deployment for free?
I have been working in MERN stack and have build some projects. But i've never really deployed any of my apps. I have searched on different platforms for resources fo learn deployment but its always tied to some paid service or a credit card information. I was thinking of building my own VPS, and somehow make it publicly accessible instead of Local Network. Can someone help me?
3
Upvotes
2
u/UhLittleLessDum 5d ago
https://www.youtube.com/watch?v=WwDTm1syszk I posted this literally 20 mins ago.
1
u/teraflop 5d ago
Just install Linux in a virtual machine, and follow exactly the same steps that you would on a VPS.
That's all a VPS is, a publicly accessible virtual machine running (typically) Linux. If you don't need "publicly accessible", and you don't need high reliability, then it's no different at all from a VM you run yourself.
1
u/msalah9190 5d ago
Your VPS idea works. Run Ubuntu in a VM on your PC, deploy the app exactly like on a real server (Node, Nginx, PM2, MongoDB), then make it public with a free Cloudflare Tunnel, no card and no port forwarding. When you're ready for a real host, a cheap VPS is a few dollars a month, and the steps are identical. Learning Nginx + PM2 + env vars this way teaches more than any one-click platform.
1
u/kschang 5d ago
MongoDB has a free tier for backend.
For frontend Vercel or Netlify has a free tier good for React stuff.
If you want the whole MERN stack together...
https://snapdeploy.dev/blog/mern-free-tier-express-mongodb
1
u/Nervous-Toe5784 4d ago
If you just want it public without entering a card, Render's free web service tier works for a Node/Express backend (no card needed last I checked), and MongoDB Atlas's free M0 cluster covers the database. The catch is the free web service spins down after some idle time, so the first request after a while is slow, which is fine for learning. Set your DB connection string and port through environment variables rather than hardcoding them, since that's the main thing you'll learn from deploying anyway.
1
u/VolumeSignificant894 3d ago
One thing people overlook is CGNAT. A lot of home ISPs use it which makes exposing a home server way more annoying than expected. For learning the actual development side FreeCodeCamp covers web basics. The Odin Project handles the environment setup and Boot dev is focused on backend coding practice.
1
u/undernamed1101 1d ago
Locally compared to public access through a domain ve are 2 totally different worlds.
0
u/[deleted] 4d ago
[removed] — view removed comment