Back to articles
Technology Insight

Building a Private Serverless Functions Platform for Agencies Using OpenFaaS on Low-Cost VPS

May 30, 2026

Introduction: The Agency’s Serverless Dilemma

In the modern digital agency ecosystem, agility is currency. Agencies constantly deploy microservices, webhooks, data processing pipelines, and automated workflows for a diverse portfolio of clients. Traditionally, public serverless platforms like AWS Lambda, Google Cloud Functions, or Vercel have been the default choice. They promise zero infrastructure management and seamless scalability.

However, as an agency grows, the hidden costs of these public cloud ecosystem choices begin to surface. Unexpected traffic spikes can lead to astronomical billing surprises. Vendor lock-in restricts architectural freedom, and strict execution time limits hamper complex background tasks. Furthermore, managing data privacy across multi-tenant public environments poses a compliance challenge for clients with strict security mandates.

The alternative? Building your own private Serverless Functions platform. By leveraging OpenFaaS (Functions as a Service) on a low-cost, self-managed Virtual Private Server (VPS)—often colloquially referred to in tech communities as "VPS cỏ" (budget VPS)—agencies can achieve the developer experience of AWS Lambda without the unpredictable overhead. This guide explores how to build a highly efficient, private serverless infrastructure that maximizes ROI and retains absolute data sovereignty.

Why OpenFaaS and Budget VPS are a Perfect Match for Agencies

OpenFaaS is an open-source framework designed to make it easy for developers to turn any code or binary into a serverless function running on top of Docker or Kubernetes. It provides a built-in UI, a robust CLI, and an auto-scaling mechanism out of the box.

Pairing OpenFaaS with a budget-friendly VPS provider (such as Hetzner, DigitalOcean, or local high-quality providers) yields significant strategic advantages:

  • Predictable Fixed Costs: Unlike public clouds that charge per invocation, execution time, and data transfer, a VPS has a flat, predictable monthly fee. You can run millions of functions without fearing a financial catastrophe.
  • No Cold Starts Limits: On a private VPS, you control the resource allocation. You can keep critical functions warm or fine-tune container reuse policies to eliminate the notorious "cold start" latency that plagues public clouds.
  • Multi-Language Flexibility: OpenFaaS uses Docker containers under the hood. Your development team can write functions in Node.js, Python, Go, PHP, or even legacy bash scripts. If it can be containerized, it can run as a serverless function.
  • Enhanced Data Privacy: For agencies handling sensitive client data, e-commerce transactions, or proprietary algorithms, keeping the entire lifecycle within a private VPS ensures compliance with strict data protection regulations.

Architecting the Private Serverless Platform

To implement this successfully on a single, cost-effective VPS, we utilize a lightweight, highly efficient stack. Instead of deploying a resource-heavy Kubernetes cluster (which would easily overwhelm a budget server), we utilize faasd.

Faasd is a lightweight distribution of OpenFaaS that runs directly on containerd without the memory and CPU overhead of Kubernetes. It is perfectly optimized for single-node deployments on small virtual servers.

Minimum System Requirements

To run a production-ready OpenFaaS instance via faasd, your budget VPS should ideally meet the following specifications:

  • OS: Ubuntu 22.04 LTS or Ubuntu 24.04 LTS
  • CPU: 2 vCPUs (shared or dedicated)
  • RAM: 2 GB to 4 GB (minimum 1 GB for development)
  • Disk: 20 GB SSD/NVMe

Step-by-Step Deployment Guide

Step 1: Preparing the VPS Environment

First, secure and update your VPS. Connect via SSH and execute the following commands to ensure your package repository is up to date:

sudo apt update && sudo apt upgrade -y

Next, install the foundational dependencies required for containerization, specifically containerd and git:

sudo apt install -y containerd git curl

Step 2: Installing faasd and OpenFaaS

The OpenFaaS team provides an automated, streamlined installation script specifically for faasd. Run the script to fetch the binary, configure systemd services, and set up networking interfaces:

curl -sSL [https://raw.githubusercontent.com/openfaas/faasd/master/hack/install.sh](https://raw.githubusercontent.com/openfaas/faasd/master/hack/install.sh) | bash

Once the installation completes, faasd will generate basic authentication credentials. You can locate your administrator password using the command below:

sudo cat /var/lib/faasd/secrets/basic-auth-password

Step 3: Configuring the OpenFaaS CLI

To manage and deploy functions efficiently, install the OpenFaaS CLI (faas-cli) on either your local development machine or directly on the server:

curl -sSL [https://cli.openfaas.com](https://cli.openfaas.com) | sh

Log in to your newly deployed gateway using the generated password and the standard port (8080):

echo -n "YOUR_PASSWORD" | faas-cli login --username admin --password-stdin --gateway http://YOUR_VPS_IP:8080

Developing and Deploying Your First Agency Function

Let us walk through a practical scenario: creating an automated webhook receiver that processes client lead data in Node.js.

1. Initialize the Function

Using the CLI, pull a pre-configured template and initialize your project:

faas-cli template pull
faas-cli new process-lead --lang node18

2. Write the Logic

Navigate to the generated process-lead/handler.js file and implement your business logic. For example:module.exports = async (event, context) => {
  const body = event.body;
  // Perform data validation, CRM integration, or email dispatching here
  return context
    .status(200)
    .succeed({ message: "Lead successfully integrated into CRM", received: body });
};

3. Build and Deploy

Run the continuous delivery pipeline via the CLI. This builds the Docker image, pushes it to your registry, and deploys it directly to your budget VPS:

faas-cli up -f process-lead.yml

Production Best Practices for Agencies

Running a serverless platform on a budget VPS requires careful optimization to ensure high availability and security. Consider the following architectural practices:

1. Implement a Reverse Proxy and SSL

Never expose port 8080 directly to the public internet. Place a reverse proxy like Nginx or Caddy in front of OpenFaaS. Use Let's Encrypt to provision automated, free SSL certificates, guaranteeing that data in transit remains securely encrypted.

2. Centralized Monitoring and Metrics

OpenFaaS comes integrated with Prometheus out of the box. Configure a basic dashboard to monitor memory utilization, execution times, and error rates. Since budget servers have finite resources, establishing alerts for high RAM usage is critical to prevent the Linux Out-Of-Memory (OOM) killer from terminating your runtime containers.

3. Implement CI/CD Pipelines

Integrate your function deployments with GitHub Actions or GitLab CI. When an agency developer pushes code to the repository, the pipeline should automatically run tests, build the function container, and execute faas-cli deploy to the production server. This maintains strict operational separation between developers and infrastructure.

Conclusion: Embracing High-Performance, Low-Cost Serverless

Building a private Serverless Functions platform using OpenFaaS and a budget VPS offers the ultimate middle ground for growing digital agencies. It eliminates the financial volatility of public cloud services while preserving the decoupled, rapid-deployment developer experience that modern engineering teams demand.

By managing your own lightweight, secure serverless platform, your agency can confidently handle microservices, handle heavy cron jobs, process API integrations, and deliver high-performance solutions to your clients at a fraction of the cost.

Building a Private Serverless Functions Platform for Agencies Using OpenFaaS on Low-Cost VPS | DPTCloud