DEV Community

Peon Sh
Peon Sh

Posted on Originally published at peon.sh

Netlify Alternatives for Static Sites: Own Your Bandwidth

An $8 VPS easily supports 30+ client static websites, with each one being an nginx container that uses only a couple of megabytes of RAM. With Peon charging $2 per project, 20 client projects will set you back just $48 a month total, including as many people as you like in the team and access to projects for each client. That would probably cost you hundreds on Netlify with team seats and a few Pro features.
Have Netlify bandwidth overages caught you off guard? Static sites are the simplest workload to self-host. Here is how to host them yourself on a VPS using free SSL.

Have Netlify bandwidth overages caught you off guard? Static sites are the simplest workload to self-host. Here is how to host them yourself on a VPS using free SSL.

When Netlify stops being free

Netlify’s free offering is a wonderful introduction, providing 100 GB of bandwidth, 300 minutes of builds, deploy previews, and more for zero dollars. The problem is what lies just beyond that tier in the form of a cliff. One post that does well on Hacker News, one portfolio full of images getting passed around, and suddenly you’ve blown through 100 GB of bandwidth and into overage charges or even a $19/month/per-member Pro subscription fee.

The per-seat pricing structure hurts agencies much more than the bandwidth cap since an agency with five employees will now have to pay $95 a month for hosting static

Static sites are the easiest thing you will ever self-host
A static website is just a set of files on a web server. There is no runtime to break, no database to back up, no memory to leak. A $4 VPS with nginx handles thousands of requests per second and many terabytes of traffic per month without breaking a sweat. Self-hosting is most beneficial where the cost savings and risk exposure are the highest.

The problem used to be the pipeline: building on push, SSL certificates, and deploying multiple sites from one machine. A tool like Peon is designed to solve those exact problems. Just point a Git repository at a server, and it will automatically run the build command (Astro, Hugo, Eleventy, Vite, Next.js export, or raw HTML), and deploy the resulting folder under HTTPS.

The CDN problem, answered honestly
Netlify uses a global CDN, whereas your VPS is just one place. Does that make a difference? No, and where it does, the solution is free: add Cloudflare, the free version, in front of your VPS. Cloudflare caches your static files at more than 300 places around the globe, handles DDoS traffic, and provides analytics. Your origin server serves all cache misses.

With your cache-control headers in order (hashed files are immutable for a year, HTML has short TTL), the performance gap between "Netlify" and "VPS + Cloudflare" in practice is within measurement error for almost all sites, and the bandwidth cost is zero on both fronts.

Replace these additional tools
Deploy previews: branch-based environments are used for the review process, where each branch has its separate subdomain
Forms: small API server running on the same machine (Formbricks is an example of a self-hosting form service with no submission restrictions)
Serverless functions: run as a small always-on server, which does not have limitations of Netlify functions (such as rate limiting or cold starts)
Redirects and headers: standard proxy settings, configured once per domain
Rollbacks: old builds are saved, making rollbacks almost instantaneous

The agency math

Top comments (0)