Coolify·

Setting Up Serverless Functions with Coolify

Learn how to set up serverless functions with Coolify, a powerful tool that simplifies the process and lets you focus on building your app.

Serverless functions are a powerful tool for developers who want to deploy lightweight backend services without managing server infrastructure.

But setting up serverless functions can be a daunting task, especially if you're new to the concept.

What is Coolify?

Coolify is a self-hosted platform that helps developers deploy full-stack applications effortlessly.

Think of it as an open sourced version of vercel that handles Dockerized apps, static sites, and various one-click applications.

While it doesn't directly support serverless functions, there are creative ways to leverage its capabilities.

How to Set Up Serverless Functions with Coolify

Here’s how you can bring serverless functionality to Coolify and make it work for your needs using the following methods:

Supabase (One click deploy)

Supabase brings serverless functionality to your Coolify setup through its powerful functions and real-time capabilities.

I've found its PostgreSQL integration particularly useful for data-heavy applications.

Appwrite (One click deploy)

What sets Appwrite apart is its extensive runtime support.

Whether you're comfortable with Node.js, Python, or any other major language, you'll find a runtime that fits your needs.

I've successfully deployed several microservices using their Cloud Functions feature.

Custom Docker image

Sometimes you need more control.

That's where custom Docker images come in.

I recently deployed an Express.js API with specific dependencies that weren't available in standard runtimes.

While setting up a custom Docker image requires a bit more configuration, I was pleasantly surprised by how easy the process was.

With just a few tweaks, I was able to deploy my Express.js app with full control over the environment.

Is Coolify Really Ideal for Serverless?

Let’s be honest: while Coolify is an excellent platform for full-stack apps, it’s not a true serverless platform. With its minimum requirements of 2 CPU cores and 2GB of RAM, it doesn't offer the "scale to zero" capabilities that define serverless architectures.

From a cost-efficiency and resource utilization perspective, this can be a challenge if you're aiming for true serverless functionality.

In my own experience, I’ve seen this limitation become especially apparent in projects where resource optimization is a key concern.

When to Consider Other Serverless Platforms

If serverless functionality is your primary goal, platforms like Google Cloud Run or AWS Lambda might be a better fit. These platforms offer:

  • True zero-scaling capabilities that adjust to traffic needs
  • Pay-per-use pricing models, making them cost-effective for unpredictable workloads
  • Seamless integration with cloud-native services
  • Automatic scaling, so you don’t have to worry about overprovisioning resources

For projects that require tight control over costs and scaling based on demand, I’ve found these platforms to be especially effective.

Conclusion: Choose What Works Best for Your Project

Coolify is fantastic for simplifying the deployment process of full-stack applications and Dockerized services.

However, if your primary need is serverless functions that scale to zero with minimal cost, you may want to look into Google Cloud Run or AWS Lambda.

Both offer more traditional serverless functionality and better align with serverless architecture’s true capabilities.

Your decision depends entirely on your project requirements.

Coolify excels at streamlining workflows, but when it comes to serverless functionality, you might want to explore other platforms designed with that in mind.


Copyright © 2025. All rights reserved.