Every time I showed people the thing I built — a chat that spins up Oracle Cloud sandboxes and deletes them when their time is up — the reply was the same. Nice, but I would need a paid tenancy and an admin to try it, so I won't.
That was fair. So I made a Free Tier edition. Pick Edition: free on the install form and it runs on an Oracle Cloud Free Tier account with no payment method attached, on Always Free resources only.
What you get on Free Tier
- An Always Free Autonomous Database 23ai — REST enabled, in-database document search
- NoSQL tables and Object Storage buckets
- Containerised applications on an Always Free Arm VM: Grafana, the React and FastAPI starters, Streamlit, an MCP server, or your own image or Git repo
- The same chat, the same priced plan before anything is built, the same expiry that destroys the sandbox when its lifetime ends
The worker is one Always Free Arm VM (VM.Standard.A1.Flex, 2 OCPU, 12 GB) running the same worker image under podman, instead of Container Instances. The assistant uses the Google Gemini API with your own free key from AI Studio, instead of OCI Generative AI. Without a key the one-click starters and the form still work.
What you don't get, said up front
Always Free doesn't include these, so the factory declines them before it builds anything rather than failing ten minutes in:
- Kafka (Streaming with Apache Kafka)
- Functions
- Data Flow (Spark, Iceberg) and Data Catalog
- Queue
- API Gateway and extra Container Instances — applications run on the worker VM instead, over plain HTTP
- Paid database tiers, and Select AI
Two more worth knowing. Always Free allows two databases per tenancy and the factory's control database is one of them, so it is one database sandbox at a time — destroy it or let it expire before the next. And Always Free capacity is shared, so a VM or database can come back "out of capacity" at a busy moment. That is Oracle, not the factory. Try again later.
Install
One Resource Manager stack, about 15 minutes, in your home region.
- Repo and the Deploy button: https://github.com/ashishsinha1602/oci-sandbox-factory
- What the Free Tier edition can and cannot build: https://github.com/ashishsinha1602/oci-sandbox-factory/blob/main/docs/FREE-TIER.md
- Overview and cost breakdown: https://ashishsinha1602.github.io/oci-sandbox-factory/
Apache-2.0. The Terraform for the install and for every sandbox type is public, so you can read exactly what lands in your tenancy before you run it.
If you try it on Free Tier and something is declined that you expected to work, tell me in the comments — that list is the part I most want to get right.
Top comments (6)
Staying inside a free tier with no card on file is the cheapest possible cost strategy, the real engineering challenge is keeping the sandbox factory from accidentally spinning up something that falls outside the free tier's limits
What guardrails stop it from drifting past the free tier boundaries?
Good question. Four layers, and one of them is off by default, which I should say plainly.
1. The edition changes what gets built, not just what is permitted. Container Instances are not Always Free, so
edition = "free"runs the same worker image under podman on one Always Free VM instead.worker_shapeis validated to the two Always Free shapes only, so Terraform refuses anything else before the API is ever called.2. Compartment quotas are the real hard stop, because OCI enforces them server-side rather than the factory policing itself:
The defaults are exactly the Always Free envelope (4 OCPU / 24 GB Arm, 2 autonomous databases), and GPU, dedicated and ExaCC are zeroed, so nobody can launch one by hand either.
The honest gap:
enable_quotasdefaults tofalse. Quota names vary between tenancies and I did not want a first apply to die on a name mismatch, so you confirm them withoci limits service listand switch it on. Out of the box that layer is off, and it is the weakest part of this.3. TTL, which in practice matters more than any single cap. On a free tier the thing that gets you is not one oversized resource, it is fifteen small ones nobody deleted. Every sandbox is tagged
sbx.expires;ttl_daysdefaults to 3 with a validated hard cap of 30, and the reaper destroys the stack after that date.4. A monthly budget on the compartment, with threshold alerts and a forecast-100% alert. Not a stop, but it tells you before the invoice does.
One design choice does more work than the caps: on the free edition a sandbox that asks for a database gets a schema in the control database rather than its own ADB. Otherwise two sandboxes would eat the entire free allowance of two autonomous databases.
The honesty about enable_quotas defaulting to false is the useful part here, a lot of writeups would've left that out and let the diagram imply full coverage, the TTL reaper plus the budget-alert-not-a-stop is a good compromise once you admit layer 2 isn't universal
Given quota names vary by tenancy, is flipping that default to true ever realistic, or does the tenancy variance mean it has to stay an opt-in step forever?
Thanks. Leaving it out would have made the diagram dishonest.
Not as a blind default, no. The quota statements name things like
standard-a1-core-countandadb-free-count, and those names differ by region and tenancy. If one is wrong, OCI rejects the whole quota policy and the install fails at that step, for a reason a first-time user can't diagnose. That's worse than no quota.What would make "on" realistic is checking the names before using them: read the tenancy's real limit definitions at plan time (the limits API lists them), keep only the statements whose names exist there, and report the ones it dropped. Then quotas could default to on and degrade to "partially on, here's what was skipped" instead of failing. Until that check exists it stays opt-in, with the TTL reaper and the budget alert as the layers everyone gets.
Checking the tenancy's real limit names against the limits API before applying the quota policy instead of assuming they're universal is the right fix, failing the whole policy over one wrong name is a bad failure mode for something meant to be a safety net
Once that check is in, does a dropped statement just get logged, or does the factory also fall back to a tighter resource cap automatically if a layer of quota protection turns out to be missing?
Honest answer first: that check isn't built yet, so today the answer is "neither", and quotas stay opt-in.
Two things already soften it. The statements are split into four separate quota policies (database, compute, container-engine, streaming), so a bad name fails only that service's policy, not all of them. And the worker checks the limits API at request time for the resources most likely to run out: API gateways and Data Catalogs. If there's none left, it waits for one (gateway) or builds without it (catalog), and says so on the sandbox card. Every sandbox still has the per-user cap of 3 and the TTL reaper.
When the name check lands, my plan is: log each dropped statement in the install output and show it on the control page, then let the worker cover the gap the same way as gateways. If the compute quota is missing, it reads A1 core availability before each build and refuses the request instead of letting the apply hit the tenancy limit. So it's a tighter cap at the factory layer, not a silent fallback.