Netlify's loop is: push to Git, build in a container, publish the output, give every branch its own preview address. On one VPS, a small webhook service that runs builds in Docker and lets Caddy serve a folder per deploy does that for your own sites in a weekend, and Coolify or Dokku already do it for free. What you can't copy is the edge: a CDN with copies of your files in many regions, functions and forms without a server to babysit, and a platform that stays up while you sleep. For a handful of personal sites it is a real option, but you take on TLS, DNS, patching and the server itself.
Before you buildNetlify Free is a hard cap of 300 credits a month. If your sites have little traffic and you deploy rarely, it may be enough; check your credit use before paying or self-hosting.
Build me a personal Git-push site host to replace Netlify for my own static sites. Requirements: - Node.js 22 + TypeScript on one Linux VPS that has Docker and Caddy installed. A Fastify service listens on 127.0.0.1:4800 (`npm start`); it writes Caddy config through Caddy's admin API on localhost:2019 and Caddy serves the sites and handles HTTPS. - Storage: better-sqlite3 in ./data/host.db for sites (name, repo URL, production branch, build command, publish directory, env vars encrypted with a key from .env), builds (commit, status, log, timestamps) and deploys. Build output lives in ./data/sites/<site>/<deploy-id>/ with a `current` symlink per site; keep the last 10 deploys. - Webhook: POST /hooks/github verifies X-Hub-Signature-256 against the secret in .env. A push to the production branch builds production; a push to any other branch builds a preview; a closed pull request deletes its preview. - Build: `git clone --depth 1` into a temp folder, then run the build command in a `node:22` Docker container with a 10-minute timeout and a 1 GB memory limit; copy the publish directory into a new deploy folder. Stream the log to the UI. - Serving: production at <site>.<BASE_DOMAIN>, previews at <branch>--<site>.<BASE_DOMAIN>, optional custom domains per site. Use Caddy on-demand TLS with an `ask` endpoint that approves only hostnames in the database. Switching `current` is the deploy; rollback points it at an older deploy folder. - Redirects and headers: read `_redirects` and `_headers` files in Netlify's format from the publish directory and turn them into Caddy rules, so existing sites keep working. - Admin: a server-rendered page on 127.0.0.1:4801 (one password in .env, signed cookie) to add a site, see builds and logs, trigger a build, roll back and edit env vars. Reach it over an SSH tunnel. - Check: after each deploy request the site's URL and mark the build failed unless it returns 200. - Single user. No accounts, no telemetry. Outbound calls: git clone and your package registry. - Out of scope: serverless functions, forms, a CDN, image optimization, team members. - README: the DNS records, installing Docker and Caddy, opening only ports 80 and 443, and a warning that running other people's builds on this machine is unsafe.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Netlify.
Extend the site host in this folder. Requirements: - After a preview deploy succeeds, post or update one comment on the pull request with the preview URL and commit, through the GitHub REST API with a fine-grained token from .env. - Edit the same comment on later pushes instead of adding new ones. - Mark the commit with a status (pending, success, failure) that links to the build log. - Update the README with the token's minimum permissions.
Add protection for preview sites to the site host in this folder. Requirements: - A per-site setting for preview protection: off, basic auth with a password from the admin page, or a link containing a secret token that sets a cookie. - Apply it through Caddy rules; production stays public. - Add `X-Robots-Tag: noindex` to every preview response. - Update the README.
Add a form endpoint to the site host in this folder. Requirements: - POST /forms/<site> accepts url-encoded or JSON bodies, stores submissions in SQLite and sends them to FORM_TO_EMAIL through SMTP settings in .env. - A honeypot field and a per-IP rate limit of 5 submissions per minute. - An admin page listing submissions with a CSV download. - Update the README with a sample HTML form.
The free plan's 300 credits are a hard cap that pauses every site, so anything with real traffic needs Personal or Pro just to stay online. Past that, people pay for previews on every pull request, build capacity and not having to operate hosting at all.
Estimate · A small VPS is the whole running cost, and DNS can stay on a free provider. The build is token usage on your agent plan. You also take on updates and security for the server.
Checked 2026-10-19 against Netlify's docs: 1, 2, 3, 4, 5, 6, 7
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Free | $0 | — | 300 credits a month (hard limit, no auto recharge), functions, AI models, Netlify Database, blob storage, firewall rules and the global CDN. One team owner. |
| Personal | $9 | — | 1,000 credits a month, smart secret detection, 1-day observability, priority email support, optional auto recharge. One team owner. |
| Pro | $20 | — | Starts at 3,000 credits a month with unlimited members; adds private organization repos, shared environment variables, 3 concurrent builds and 30-day analytics. |
| Enterprise | custom | — | 99.99% SLA, enterprise network tier, high-performance builds, SSO and SCIM, log drains, dedicated 24/7 support. |
Free gives 300 credits a month as a hard limit; when they run out, every project on the team is paused.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: A global CDN: your sites are served from one machine, Serverless functions, edge functions and scheduled functions.
About $9 a month on the Personal plan, $108 a year (checked 2026-10-19).
A global CDN: your sites are served from one machine; Serverless functions, edge functions and scheduled functions; Forms with spam filtering and CSV export of submissions; Netlify Database and blob storage next to the site; Someone else keeping the platform up and the certificates renewed. If any of those matter to you, keep paying.
Yes: Coolify (open source), Dokku (open source), Piku (open source).