I made my free-tier setup public, and most of the work was removing me from it
Four private repos that run my Oracle, Google and Cloudflare free tiers became four public ones with one commit each. The code barely changed. Finding everything that was mine took a week.
When I started the free-tier build I wrote one sentence in my notes about the end of it: turn the whole thing into repositories that anyone can clone and deploy on their own accounts. Nothing in the code stood in the way. The repositories were already written for exactly the setup I wanted to share: an Always Free Kubernetes cluster on Oracle, a tiny Google VM, Cloudflare in front, all of it in OpenTofu and Flux.
What stood in the way was me. Four repos, about 160 commits between them, and my name, my domain, my account identifiers and my device names were in places I had stopped seeing.
What the four repos are
| Repo | What you get |
oracle-always-free | the Oracle tenancy: network, a small Arm Kubernetes cluster, buckets, a Vault, the keyless GitHub login, spending caps |
gcp-always-free | one tiny Google VM, its budget and a billing kill switch |
cloudflare-free | the tunnel, the Access logins, a storage bucket for backups, a failover Worker |
k8s-free-gitops | the Flux repository that runs on the cluster: ingress, secrets, policies, monitoring, the optional layers |
They are meant to be used in that order, and each one stands on its own if you only want a piece. They live at github.com/Nissaar/oracle-always-free, gcp-always-free, cloudflare-free and k8s-free-gitops.
Why I did not just make the old repos public
The obvious move is a settings change: flip the four private repositories to public. I did not, for one reason. Git keeps everything. If a tenancy identifier, an e-mail address or the name of a bucket was committed once, deleting it later only hides it from the current files. It stays in the history, and a fork or a cache keeps it forever.
So the public repositories start with no history. Each one is a single commit, made from the current state of the private repo after everything personal has been replaced. My private repositories stay exactly as they are and remain the place where I work. The public ones are a build product.
How the copies are made
A script rebuilds each public repo from the private one. It takes the files at the latest commit, and applies three things in a fixed order:
- a mapping file that holds my real values (domain, account names, device names) and turns each of them into a neutral placeholder;
- a set of files that exist only in the public copy: README, licence, security policy, configuration reference, issue templates;
- a handful of patches for things that had to change in upstream files, mostly workflows and scripts.
The mapping file is the only place my real values live, and it is not in any repository. If a change goes only into a public copy, the next rebuild would overwrite it, so every fix from the audit is kept as a patch or an overlay file, and the script only calls a copy "in step" when rebuilding reproduces it exactly.
Three scans run on every build. gitleaks looks for secrets in the new copy and in the full history of the private repos: 0 findings in all four, which also means nothing needed rotating. An identifier scan checks every file name and line of each copy for each real value in the mapping: 0 leftovers. And I searched the history of the copies for my name, my employer, my handles and my device names by hand, because a scanner can only find what it was told to look for.
What the audit found
I asked for a hostile read, as if I were a stranger looking for a way to hurt either the person who clones this or me. These are the things it turned up, in the order I remember being annoyed:
- A leak. Both backend files of the Google repo named my own state bucket. Not a secret, but exactly the kind of thing the mapping file exists to catch. It was not in the mapping. It is now.
- A broken first run. The Oracle bootstrap script decides whether to migrate its state by looking for a
backend.tffile. The copy shipped one, so a new user's first run would skip the migration and carry on in a half-configured state. The file is no longer shipped. - Defaults that were mine. A default repository name, a default region, a default image pin, a default zone. Each became a required variable with validation, or a documented default that makes sense for anyone.
- Workflow hardening. Credentials are no longer kept on checkouts that never push. Every job has a timeout. There is no
pull_request_targetand noworkflow_runanywhere. The plan jobs, which are the ones that can touch a cloud account, only run when the pull request comes from the same repository and the repository is configured. - A scanner finding on the first push. When I pushed the Google repo this week, the first run of its CI failed with a CRITICAL from Trivy: the VM "uses the default service account". In my private repo the service account is set by a variable. In a fresh clone that variable is empty, so the scanner saw the empty value. The workflow now uses a clearly fake placeholder while the variable is unset, and the plan job stays skipped until both the project and the service account are configured. A stranger's first green run should not depend on settings they have not made yet.
Some things I left as they were and wrote down why. The Bastion allow-list defaults to everywhere, because the CI runners have no fixed address. The cluster's secret store is usable from any namespace, which the docs flag with the line to tighten it. Images are :latest and the Flux charts use version ranges. That last one is my standing choice in my own setup, and a reviewer will rightly call it out. Every one of these is in the security notes of the READMEs, not hidden.
Variables, so you edit values and not code
I did not want anyone to have to read a .tf file to find out what to change. Across the three OpenTofu repos there are 71 variables, and each copy has a docs/CONFIGURATION.md that lists every variable with its meaning, its default, where it is set and whether it is required. Most are validated. A required value that is left as a placeholder is caught before anything runs.
Each repo also has a scripts/preflight.sh. It only reads: it checks that the tools are installed at the right versions, that you are logged in, that every required variable is set, that no <your-...> placeholder is left in your configuration, and that no secret file is tracked. Run in an empty folder it fails with a clear list of what to fix. The cluster repo goes one step further with a single cluster.env and a configure.sh, which sets the repository URL, the domain, the encryption key and seven on/off switches for the optional layers (monitoring, previews, restore test and so on) in one place.
Clone and push, do not fork
This one surprised me while writing the security notes. The natural way to use a public repo is to fork it, but the plan job of an infrastructure repo produces an artifact that contains secrets, and a fork of a public repository is public. So the README tells you to clone it and push to your own private repository, then protect the main branch and turn on secret scanning.
I wrote the workflows to survive being forked anyway. Pull requests from outside get no secrets, the job that can reach a cloud account is skipped for them, and the repository settings I apply (approval for every outside contributor, a read-only default token, no Actions approving pull requests) are in the publishing notes.
What it can still cost
All three clouds have a real free tier, but "free" has edges, and I would rather you read about them here than on a bill. On Oracle the one thing that can still cost money is object storage past 20 GB, which is why the tenancy gets quota policies that act as a hard cap, plus a budget that e-mails you. On Google the VM stays inside the free machine type, there is a budget, and a kill switch detaches billing if the budget is crossed. It is live by default, and it is a blunt instrument: it stops the VM from billing by switching billing off.
The problems I hit while building it
The troubleshooting sections are built from real errors, not from what I expected to go wrong. A few of them, because they cost me hours:
- Oracle's "Out of host capacity" when creating the free micro machine. It comes and goes. The fix is to retry later, and the README says so instead of pretending it is a bug in your configuration.
- GitHub's newer identity names for the keyless login made it fail with a 401 until the trust rule used the new form.
- A token pasted with an invisible line break at the end, which looks right in every terminal and is rejected everywhere.
- A forgotten 146 GB disk that quietly used up the free storage.
- Oracle allows one budget per tenancy, and a lifecycle rule on a bucket needed a service policy before it would work.
- Quota names that Oracle's documentation does not list.
What I have not verified
I have not watched anyone else do this. The offline checks pass: formatting, validation, the tests that exist (24 of them in total), shellcheck, the cluster validation script. The network checks of the preflight scripts, against a real Oracle, Google, Cloudflare or GitHub account that is not mine, have never run. The README steps I could not confirm end to end are marked verify, including the tear-down sections and the repository-settings commands.
If you try one of them and something does not match, open an issue. I would rather have the first failed run reported than guess where the README is wrong.
The four repositories are public from today. Start with oracle-always-free if you want the cluster, or with cloudflare-free if all you want is a tunnel and a login in front of something you already run.