Free hosting that never sleeps

Subhankar Denria
Software Architect · Product Engineer
What this part does
Choose where the server lives. The requirement that decides everything isn't the website or the API — it's a job that must run every minute, forever, and must never be allowed to pause.
- Time
- A decision, not a build
- Cost
- $0 — if the host never sleeps
- If you get it wrong
- The every-minute jobs stop, and nothing says so
The job that rules out most "free hosting"
Lampsill's server does two things:
- 1Answers the app — an ordinary API: sign in, save settings, report an alert. If it's a bit slow now and then, nobody is hurt.
- 2Runs two jobs every minute, called ticks. Each tick looks for anyone who has gone quiet and moves their alert one step along: text the first contact, wait, text the next, then call. If the ticks stop, the alerts stop. And nothing announces it — there's no error, no crash screen. It looks exactly like a night where everyone was fine.
That second part is what makes hosting hard. Almost every free hosting offer saves money the same way: it puts your app to sleep when nobody is using it, and wakes it on the next visit. For a website, that's a small delay on the first page load. For a job that has to fire every minute on its own, with no visitor to wake it, it means the job simply doesn't run.
So the question isn't "where can I host Laravel for free?" It's:
Each square is one minute
00:00Free host that sleeps · a visitor at 00:00, then nobody
0 ranAsleep from 00:15. No ticks — and no error.
A schedule in a CI system · every 5 minutes — the shortest it allows
0 ranTwelve runs asked for; five arrived, bunched and late.
An always-on e2-micro · a small machine that never sleeps
0 ranSixty runs in sixty minutes.
What I looked at, and why each one failed
I started with the lists everyone finds — "best free Laravel hosting" — and then looked at the platforms developers usually recommend. Here's what each one does with an always-on job:
| Option | What it is | Why it doesn't fit |
|---|---|---|
| Free shared PHP hosting (the long lists of "free cPanel" hosts) | A folder on someone's crowded server | No shell to run commands, cron jobs limited or missing (often no more than every 15 minutes), usually MySQL only, and accounts that get suspended for "inactivity" |
| Render (free web service) | Modern app hosting | Sleeps after 15 minutes without visitors. The free Postgres database expires after 30 days |
| Cloud Run (Google) | Runs your app in a container — a packaged, ready-to-run copy of it — when a request arrives | Scales to zero between requests — the same sleep, by design |
| Cloud Run Jobs + Cloud Scheduler | Start a container on a timer | Fits the free tier on paper. But Laravel starts from cold every single minute, and Postgres still has to live somewhere else |
| Cloudflare Workers + D1 | Code at the edge, with a small database | No PHP. And D1 is SQLite, which can't do SELECT … FOR UPDATE SKIP LOCKED — the thing that stops two ticks sending the same text twice |
| GitHub Actions on a schedule | "Run this on a timer" in a CI system — the service that normally runs your tests | The shortest schedule it allows is every 5 minutes — and those runs are often late, sometimes by 10–30 minutes, or skipped when GitHub is busy. A ladder of "text at 0 min, call at 10 min" becomes fiction |
| Platforms with trial credit | Pay-as-you-go hosting with starter credit | Free until the credit runs out, then billed. Not "free forever" |
| Oracle Cloud Always Free | Genuinely generous free virtual machines | Great when you can get one — but "out of host capacity" errors are common, and idle free machines can be reclaimed. A safety app can't depend on "if available" |
Free shared PHP hosting (the long lists of "free cPanel" hosts)
- What it is
- A folder on someone's crowded server
- Why it doesn't fit
- No shell to run commands, cron jobs limited or missing (often no more than every 15 minutes), usually MySQL only, and accounts that get suspended for "inactivity"
Render (free web service)
- What it is
- Modern app hosting
- Why it doesn't fit
- Sleeps after 15 minutes without visitors. The free Postgres database expires after 30 days
Cloud Run (Google)
- What it is
- Runs your app in a container — a packaged, ready-to-run copy of it — when a request arrives
- Why it doesn't fit
- Scales to zero between requests — the same sleep, by design
Cloud Run Jobs + Cloud Scheduler
- What it is
- Start a container on a timer
- Why it doesn't fit
- Fits the free tier on paper. But Laravel starts from cold every single minute, and Postgres still has to live somewhere else
Cloudflare Workers + D1
- What it is
- Code at the edge, with a small database
- Why it doesn't fit
- No PHP. And D1 is SQLite, which can't do
SELECT … FOR UPDATE SKIP LOCKED— the thing that stops two ticks sending the same text twice
GitHub Actions on a schedule
- What it is
- "Run this on a timer" in a CI system — the service that normally runs your tests
- Why it doesn't fit
- The shortest schedule it allows is every 5 minutes — and those runs are often late, sometimes by 10–30 minutes, or skipped when GitHub is busy. A ladder of "text at 0 min, call at 10 min" becomes fiction
Platforms with trial credit
- What it is
- Pay-as-you-go hosting with starter credit
- Why it doesn't fit
- Free until the credit runs out, then billed. Not "free forever"
Oracle Cloud Always Free
- What it is
- Genuinely generous free virtual machines
- Why it doesn't fit
- Great when you can get one — but "out of host capacity" errors are common, and idle free machines can be reclaimed. A safety app can't depend on "if available"
What survives is the boring answer:
Google Cloud's "Always Free" e2-micro
Google Cloud has two different free things, and mixing them up is the most expensive mistake in this whole series:
| Free Trial | Always Free (the "free tier") | |
|---|---|---|
| What | $300 of credit to spend on anything | A fixed list of small resources that cost nothing |
| How long | 90 days | No end date |
| What happens after | Everything stops unless you upgrade | Keeps going — but only on an upgraded (paid) account |
What
- Free Trial
- $300 of credit to spend on anything
- Always Free (the "free tier")
- A fixed list of small resources that cost nothing
How long
- Free Trial
- 90 days
- Always Free (the "free tier")
- No end date
What happens after
- Free Trial
- Everything stops unless you upgrade
- Always Free (the "free tier")
- Keeps going — but only on an upgraded (paid) account
We want the Always Free part. Its compute allowance, as of September 2026:
| What's free | The exact line |
|---|---|
| Machine | One e2-micro running all month — non-preemptible (a normal machine, not a "Spot" one Google can take back) |
| Where | Only three US regions: us-central1 (Iowa), us-west1 (Oregon), us-east1 (South Carolina). Mumbai, Delhi, London — not free |
| Disk | 30 GB of standard persistent disk. The faster "balanced" and SSD disks are billed |
| Traffic out | 1 GB a month from North America |
| Public IPv4 address | Not free. Google charges for an in-use external IPv4 on any VM, free machine or not — about $0.005 an hour, roughly $3.65 a month. IPv6 is free. (That's why this server has no IPv4 — see post 3.) |
Machine
- The exact line
- One
e2-microrunning all month — non-preemptible (a normal machine, not a "Spot" one Google can take back)
Where
- The exact line
- Only three US regions:
us-central1(Iowa),us-west1(Oregon),us-east1(South Carolina). Mumbai, Delhi, London — not free
Disk
- The exact line
- 30 GB of standard persistent disk. The faster "balanced" and SSD disks are billed
Traffic out
- The exact line
- 1 GB a month from North America
Public IPv4 address
- The exact line
- Not free. Google charges for an in-use external IPv4 on any VM, free machine or not — about $0.005 an hour, roughly $3.65 a month. IPv6 is free. (That's why this server has no IPv4 — see post 3.)
And the machine itself:
| e2-micro | |
|---|---|
| CPU | 2 shared vCPUs — a quarter of a CPU guaranteed, bursting higher briefly |
| Memory | 1 GB |
| Enough for Lampsill? | Yes: the whole stack — nginx, PHP, Postgres, the two ticks — uses about 400 MB. With 2 GB of swap as a safety net (post 5) |
CPU
- e2-micro
- 2 shared vCPUs — a quarter of a CPU guaranteed, bursting higher briefly
Memory
- e2-micro
- 1 GB
Enough for Lampsill?
- e2-micro
- Yes: the whole stack — nginx, PHP, Postgres, the two ticks — uses about 400 MB. With 2 GB of swap as a safety net (post 5)
"But the server is in the US"
Two honest points:
- Speed: a request to Iowa takes about a tenth of a second from the UK, and about a quarter of a second from India. For an API that a phone calls now and then, that's invisible. The ticks don't care at all.
- Where personal data lives: for development and an early pilot, this is fine. For a public launch in the UK or EU, people's data — especially data that says "this person lives alone and is being watched over" — is better kept in Europe. My plan is a separate small server in the EU for that launch. The free server is the right answer now, not forever. Worth deciding early rather than migrating under pressure.
The traffic question, honestly
1 GB a month of outgoing traffic sounds small. It goes further than you'd think if the API is careful: Lampsill's app asks "anything new?" every 60 seconds, and the server answers "no change" with a tiny 304 Not Modified (about 250 bytes) almost every time.
| Households using it | Traffic / month | Cost |
|---|---|---|
| 100 | ~1.1 GB | About $0 — right on the line |
| 500 | ~5.4 GB | About $0.55 |
100
- Traffic / month
- ~1.1 GB
- Cost
- About $0 — right on the line
500
- Traffic / month
- ~5.4 GB
- Cost
- About $0.55
So "free" turns into "pennies", not a surprise bill. Worth knowing before it shows up.
The decision
Google Cloud, Always Free, one e2-micro in us-central1 (Iowa), Ubuntu, Postgres on the same machine, public traffic through Cloudflare.
It's not the fashionable answer. It's the one where the every-minute job keeps running at 3 a.m. on a Sunday when nobody has opened the app for a week.
Next up · Part 2 of 9 · 10 min read
A Google Cloud account that stays free
An account that owns the server, a card on file so the free server is never switched off, and an alarm that emails you if anything ever costs money. Nothing in this post creates a server yet — but two of the settings here decide whether it stays free.
Keep going Overview: A server that never sleeps, for $0 a monthWritten by
Subhankar Denria
Software Architect · 25+ products shipped