DEV Community

Cover image for How to host your side-projects for free in 2023: from Auth to Database
Zevi Reinitz for Livecycle

Posted on • Edited on • Originally published at livecycle.io

How to host your side-projects for free in 2023: from Auth to Database

TL;DR

In this article, we'll look at how you can host your side project for free in 2023. We'll cover authentication, databases, website hosting, backend hosting, cron jobs, and key-value stores.

Why we create content like this

Our team at Livecycle just launched an open source tool called "Preevy". We believe strongly in open source and we also apply that approach to our content. We try to share content that is relevant, useful and accessible to all developers.
I would be thrilled if you could give Preevy a star! 🚀
https://github.com/livecycle/preevy
Thank you!

And now, if you're ready, let's dive in.

Lets go

Introduction

Hosting side projects without a monthly cost is a great way to bring your ideas to life without breaking the bank. In this article, we'll explore different categories of services that can help you host your side projects for free in 2023. We'll cover authentication, databases, website hosting, backend hosting, cron jobs, and key-value stores. Thanks to these services, you can share your projects with the world without spending a cent. So let's dive in!

Authentication with Clerk

Clerk

You want users to sign up to your project. But you don’t want to deal with password encryption, user sessions, and password resets yourself? Luckily you don’t have to. Clerk.com is a service that does all the heavy lifting for you. You get a suite of customizable React Components for handling authentication and showing the user’s profile that you can integrate into your application. And if you need to check if the user is logged in from your code, you can do that both on the frontend and backend via the provided functions.

The features don’t stop there. All the typical user management tasks that usually take you forever to implement, Clerk has covered by default. Password reset, uploading a user profile picture or changing the email address are all part of Clerk.

In terms of user authentication, all options are also already built into Clerk. Be it magic link login, email/password or social login through services like Google. You can enable them and switch seamlessly through the Clerk dashboard. On there, you can also see a list of all your users and perform manual admin tasks.

Their free plan offers unlimited sign-ins and 5,000 monthly active users. Along with all the features I mentioned. Should you need more than that, the next higher tier costs $25 per month and comes with unlimited monthly active users.

Databases with PlanetScale

Planetscale

If you’ve ever worked on a full-stack side project you’ve noticed that you won’t get far without a database. Many local dev environments come with a database component that you can use during development. But when the time comes to share your project with the world, you need a database hosted somewhere on the internet. Unfortunately, website hosting providers like Netlify don’t have an integrated database. And due to its serverless nature, you can’t store data on disk.

Enter PlanetScale.com. They are a hosted MySQL database provider. The product has a ton of advanced features that help you manage a database at scale. Using them for your side projects is very easy. You log in, create a new database, copy the connection string over to your web application and get going.

Their free tier comes with 5 GB of storage, 1 billion row reads per month and 10 million row writes per month. Even if you go viral on hacker news, chances are you won’t exceed these limits. However, you can only have one free database per account. If you need more than that, the paid tier starts at 29$ per month.

Hosting your web apps with Vercel

Vercel

No matter which stack you are using to build your web application, chances are Vercel.com can set them up for you in one click. These services couldn’t be any simpler. You push your code into a GitHub repository, select the repository in the Vercel dashboard, and pick a free domain ending in vercel.app, click deploy and voila, your site is ready on the internet!

Then, whenever you push new commits to GitHub, Vercel will automatically deploy them for you. Custom domain integration is also available for free. And it’s worth mentioning, Vercel isn’t just for front-end applications. Thanks to their serverless and edge functions, you can also host your backend there.

Vercel comes with a very generous free tier. You can host as many personal projects as you like for free. With a bandwidth limit of 100 GB per month. Commercial projects cannot be hosted on the free plan. For that, you’ll need to sign up for the $20 per month plan which comes with 1 TB of bandwidth.

Netlify.com is another great option to host your web apps. They’re very similar to Vercel with their free tier being virtually identical. So if you don’t enjoy Vercel, make sure to check Netlify out.

Hosting your Docker images on Fly.io

Flyio

Do you love to work with Docker locally and wish you could just push and run these containers all over the world in the cloud with just one click? Fly.io has got you covered. Simply put, anything that runs as a deployable Docker image can be pushed to Fly.io. And their CLI helps you deploy and run your app on their cloud.

What’s special is that Fly makes it easy to deploy your app all over the world. For example, you can run the app in Amsterdam, Hong Kong and San Francisco. And your users will always be connected to the region that’s closest to them. It’s worth mentioning that Fly also runs databases. So if you choose them for your app, it can also make sense to host the DB on Fly as well.

In terms of pricing, you get the following for free:

  • 3 shared CPUs
  • 3 GB persistent storage
  • 160 GB outbound bandwidth

Anything above that is pay-as-you-go. Which is a great model for side projects, since you only pay what you use. That way you avoid getting locked into a $30 monthly plan for a simple site with little traffic.

Cron jobs and Redis on Upstash

Upstash

Upstash.com is a service that focuses on hosting existing technologies. We’ll look at their Redis and custom CronJob-like scheduler called QStash.

CronJobs are useful for a wide variety of tasks. Such as sending emails once a day or regularly cleaning the database. With dedicated servers you could just set up a local CronJob on the server that regularly called a script. However, that’s not not the case in the serverless environment. So you need a separate service that can call an API endpoint on your server at a regular interval.

Redis can be viewed as a supplement to your conventional database. It’s an in-memory database that stores key-value pairs. You can use it to cache frequently accessed data in order to reduce response times.

QStash offers 500 free requests per day. After that, you pay $1 per 100,000 messages. Their Redis offering comes with 10,000 free requests per day. After that, you pay $0.2 per additional 100,000 requests.

Wrapping Up

With these services you can host any web side project, no matter how complicated for free. Even better, you can buy a domain for a few dollars so that your project looks even more professional on the internet.

These services scale with you from a beginner’s side project up to a proper business with employees. That’s the beauty about them and sets them apart from other services. Granted, at that scale they will no longer be free. But all are excellent value for money and you’ll still be working with the same tools.

We have only spoken about serverless technologies in this article. That’s no coincidence. Serverless can scale down to zero if you’re not using it. This allows cloud providers to keep cost very low, which makes a free tier feasible. You won’t see cloud providers such as AWS offer free resources that aren’t serverless.

Top comments (26)

Collapse
 
denisgolius profile image
Denys Holius
Collapse
 
assafkr profile image
AssafKr

Great list! Does anyone know of more useful free-to-use services worth of knowing?

Collapse
 
geakstr profile image
Dmitry Kharitonov

Yes, supabase.com - all in one solution

Collapse
 
baudouinvh profile image
Baudouin Van Humbeeck

free-for.dev

Collapse
 
thevineet profile image
Vineet Pandey

Yeahh to deploy Kubernetes app, Okteto has a very generous free tier

Collapse
 
jorensm profile image
JorensM • Edited

Appwrite.io is a good one too that I'm using for my current project. It has auth, database, storage and cloud functions

Collapse
 
yshayy profile image
Yshayy

Worked with Upstash in the last few years and had great experience - It's very simple and cost-effective. (also for Kafka workloads)
Neon (neon.tech) might also worth mentioning as it also has a free tier for serverless Postgres.

Collapse
 
brnms profile image
Bruno Santos

Nice article, going to test some of those resources on the upcoming weeks

Collapse
 
jane49cloud profile image
Jane49-cloud

This is a great one...Thank you

Collapse
 
manumaan profile image
Manu Muraleedharan

Great list!

Collapse
 
matikiri profile image
Matikiri

Thanks

Collapse
 
timlmit profile image
TIM

Thank you!

Collapse
 
hackreveal profile image
Prakash Tiwari

Nice article

Collapse
 
dasheck0 profile image
Stefan Neidig

Worth mentioning:

  • AWS Lambda with function urls (I hosted a complex nanoservice backend this way without spending a dime)
  • MongoDB Atlas (has a Free Tier)
  • AppWrite Cloud. Currently free (not sure if they are out of Beta yet). Might be paid in the future