It’s 2025 and yes you can run your backend & frontend servers for free even though most services like Digital Ocean ( starting from 4 dollars ) and Heroku which was once a great source of free hosting backend servers going to minimum 5 dollars. Why should you pay for servers when you’re not making any money or have barely have any customers/clients and you want to make sure everything runs smoothly for as low cost as you can.
I’ve been trying to pay as little as I can for online services for my projects. I’m really nitpicky on spending money while not making any ( it’s just my own thing ). Let’s get started.
So wanting a service that not only hosts your application but also can scale it, can handle upcoming unexpected traffic but save you money when there isn’t any. An auto scalable infrastructure that does all this on its own. My favorite one is Google App Engine for backend hosting.
It might not look like a cost effective solution if you don’t know what you’re doing. I’ve been using an app engine for free! Yes, no money spent ever. Oh wait, I accidentally spent $5 which was a good lesson that made me do a bit more research and how to utilize it for free.
Here’s how I did it:
Go to the app engine section of GCP and create an application for your region.
Have an API application for production ready, app engine offers different languages api hosting. I develop API with nodejs. See the deployment docs here https://cloud.google.com/appengine/docs/standard#:~:text=The%20App%20Engine%20standard%20environment,with%20large%20amounts%20of%20data.
Next up would be make sure you are using F1 instances only which are for free and believe me 384MB of ram is more than enough. I run 2 instances of NodeJS on the same server, each one taking 80-90MB of ram within the same instance and for servers it’s mostly enough.
And deploy your app. I usually add 2 instance to run in my configuration if there’s higher traffic load otherwise 1 is more than enough
That’s it! Now you’re running your backend for free. See here Google offers 28 hours per day of F1 instance for app engine. https://cloud.google.com/free/docs/free-cloud-features#app-engine
One good thing about app engine here would be in a standard environment, it removes an instance if there are no API requests and spins up an instance when there’s an API call. Running your server when it should, not all the time. Why is it a good thing? Let’s say you have a heavy workload server, an F4 instance with 2GB of ram and high performance, now if that’s running 24 x 7 and it costs $165 per month. With standard environment instances don’t run if they don’t need to, I.E no API call = no instance running = you save money.
But this is more about startups running for free for as long as possible. There you go, now you have a free backend server which is fast enough initially and auto scalable. When it gets too much, you can always change your instance F1 to a higher one, you pay when you get paid.
That’s not the end of it, pfft. I still have to tell you you can also run your database & frontend for free. These both are more simple. I’ve been mainly working with mongodb for most of my projects ( for me NoSQL is a win ) so I go for mongodb's own hosting https://www.mongodb.com/pricing . Free 512 MB storage! Of course it doesn’t seem so at first but your single document size is as low as 0.1-1kB and maximum 16MB ( if you’re storing large images and documents etc ), but mainly if you just store simple JSON objects, it’ll be in kB’s, so you can store thousands of records of data. For large things like images & documents, just utilize cloud storage like a GCP bucket. BTW GCP bucket doesn’t cost much at all
For PostreSQL ( of course I have to share something with SQL lovers ) , utilize https://neon.tech/pricing as a starting point. The goal here to run your product for free on cloud. Unless you have tons of money to waste, you can go for Digital Ocean or complete servers on AWS & GCP.
Last but not least for frontend hosting, I utilize https://vercel.com/. It’s free for personal projects or projects imo that are starting out. You want to get there as fast as you can and for as low cost as you can. I’ve pretty much hosted NextJS, Vite, VueJS, ReactJS applications on Vercel and I love its CI/CD automation, it’s just simple and beautiful in its own way.
There you go folks, how to run your product on servers for free or for as low as possible initially.
To sum it up:
Utilize GCP App engine with F1 instance to run API for free
For NoSQL like Mongodb https://www.mongodb.com/pricing works best, for SQL like PostreSQL, use https://neon.tech/pricing
For frontend, use personal/hobby plan of Vercel. It’s free to host your frontend projects.
That’s pretty much all that’s needed for hosting a startup product. Thanks for reading through it. See you next time! :)