# Where to run CrawlGenie (and why it isn't "just a function")

CrawlGenie runs **real Chromium processes that stay alive**: a session lives for minutes, a human may watch it
over a WebSocket, recordings and saved logins sit on disk, and the SQLite database is a file in `/data`.
That shape — long-lived, stateful, memory-hungry — decides which platforms fit.

## The short version

| Platform | Can it run CrawlGenie? | Always-on cost for 2 vCPU / 4 GB | Verdict |
|---|---|---|---|
| **Any Linux VM** (Hetzner, Oracle, DigitalOcean, Hostinger, EC2, GCE…) | Yes, exactly as designed | €6 (Hetzner CX23) · $0 (Oracle Always Free ARM, 2 OCPU/12 GB) · $24 (DO) | **Recommended.** `deploy/install.sh <domain>` and you're live. |
| **AWS Lightsail** ($12: 2 vCPU / 2 GB / 60 GB, Mumbai available) | Yes — it is a plain VM with a fixed price | $12, **first 3 months free** on the $5/$7/$12 Linux bundles (one per account) | Good if you want AWS and predictable billing; 2 GB ≈ 3–5 concurrent sessions. Static IP/snapshots cost extra. |
| **AWS EC2 free tier** (t2/t3.micro 1 GB; t4g.small 2 GB trial reportedly to end-2026) | Yes, tight | $0 for 750 h/month, then ~$15–17 | 1 GB is too small for more than 1–2 sessions; t4g.small (ARM, our image is multi-arch) works if the trial applies to your account. Public IPv4 bills ~$3.6/month. |
| **Bluehost VPS** (NVMe 4: 4 GB; NVMe 8: 8 GB, root access) | Yes (self-managed, Ubuntu + Docker install yourself) | $9.49 (4 GB) / $12.99 → **$28.99 at renewal** (8 GB) | Intro prices look fine, renewals double; no Docker templates. Hostinger KVM 2 (8 GB, $8.99 → $14.99) is the better deal in the same category. |
| **Kubernetes** (GKE/EKS/any) | Yes, Helm chart in `deploy/helm/vessel` | cluster cost | For teams already on k8s or when you need many nodes. |
| **Google Cloud Run** | Yes as a single always-on instance (`--min-instances=1 --cpu-always-allocated --timeout=3600 --session-affinity`), but **no persistent disk**: Cloud Storage FUSE mounts have no file locking, so SQLite and recordings can corrupt; WebSockets are cut at 60 min. | ≈ $50–70 | Fine for the stateless endpoints (`/v1/scrape`, `/v1/screenshot`, `/v1/pdf`) behind the free tier (~50 h/month at 1 vCPU/2 GiB). Not for live sessions/profiles. |
| **Modal** | Yes as a `@modal.web_server` with a Volume at `/data` and `min_containers=1`; WebSockets supported. | ≈ $90+ (per-second CPU+RAM) minus $30 free credit | Works, but you pay serverless rates for a server that never sleeps. Good for bursty batch scraping, not for a 24/7 dashboard. |
| **Railway / Render / Fly** | Paid plans yes; free tiers no (0.5 GB RAM or trial-only; Chromium needs ~400 MB per session plus the server). | Railway ≈ $10/GB-RAM-month → $40+; Render Starter 512 MB too small | Only if you already live there. |
| **Vercel / Netlify / Cloudflare Workers** | **No.** Functions are short-lived (Vercel ≤ 800 s), no Chromium process can persist, no disk. | — | These host the *landing page*, not the browsers. |
| **Supabase / Firebase / Firestore** | Not a compute platform. | — | CrawlGenie needs no external database (below). |

## Where the data lives at each stage

| Stage | Where CrawlGenie runs | Where the database is | Who can reach it |
|---|---|---|---|
| Development (today) | your laptop | `./data/vessel.db` on your laptop | you |
| Production | a cloud VM (Hetzner/Oracle/Lightsail…) via `deploy/install.sh` | `/data` on that VM's disk (Docker volume) | the CrawlGenie process + whoever has SSH to the VM |
| Production + off-site copy | same VM | same, **plus** hourly encrypted copies in R2/S3/B2 (`VESSEL_BACKUP_URL`) | same; the bucket needs the backup key to read |
| Many nodes (later) | several VMs/Kubernetes | router mode today; a shared Postgres when accounts/routines must be shared | — |

Nothing in any stage sends data to a third-party database or auth provider.

## Why no SQL database service?

CrawlGenie ships its database: **SQLite via Node's built-in `node:sqlite`**, WAL mode, in `/data/vessel.db`.
It stores sessions, events, approvals, profiles, routines, secrets, users, organisations and API keys.
On one node it handles thousands of event writes per second, needs no credentials, no network hop, no
monthly bill, and a backup is `cp -r /data`. A hosted Postgres becomes useful only when **several nodes
must share routines/profiles/accounts**; until then it would be a second system to secure for no gain.
(The router mode already spreads sessions across nodes by id without shared state.)

## Why a proxy *service* is optional (and what it is)

A proxy changes the IP address websites see. Without one, every session leaves from your VM's IP: a
datacenter address that some sites rate-limit or challenge. Residential/mobile proxy providers rent IPs
that look like home connections and let you pick a country. CrawlGenie integrates any of them (`proxy pools`
in `docs/API.md`) but does not resell them — that is a per-GB business with thin margins and legal exposure.
Most B2B automation (your own SaaS vendors, portals, back-offices) needs **no proxy at all**; e-commerce and
social-media scraping usually does.

## How Browserbase, Steel and Kernel host browsers

All three run fleets of containers/microVMs they operate themselves (Browserbase describes 2 vCPUs per
browser on "globally distributed infrastructure"; Fly.io-style Firecracker microVMs are the common pattern),
bill per browser-hour plus per-GB proxy, and front it with an orchestrator API. CrawlGenie is that orchestrator
layer, proprietary, on hardware you choose. You can run it on one €6 box today and move the same image to
Kubernetes when you outgrow it.

## "Can CrawlGenie do what Modal does?"

Partly, and only where it makes sense for browsers. Modal runs *your code* next to the resources;
CrawlGenie's equivalent is `POST /v1/sessions/:id/script`: a snippet of Playwright code executed **inside the
CrawlGenie node**, next to the browser, with `page` and `context` in scope — no round trips per action, the
session's policy still applies. It is for trusted operators (gated by `VESSEL_ALLOW_SCRIPTS`; off for
multi-tenant sign-ups) because running arbitrary code is never a security boundary in Node.

Sources (Oct 2026): [Cloud Run WebSockets](https://docs.cloud.google.com/run/docs/triggering/websockets),
[Cloud Storage volume mounts (no locking)](https://docs.cloud.google.com/run/docs/configuring/services/cloud-storage-volume-mounts),
[Cloud Run pricing](https://cloud.google.com/run/pricing), [Modal servers](https://modal.com/docs/guide/servers),
[Modal pricing](https://www.beam.cloud/blog/modal-pricing-explained), [Fly discontinued free plans](https://fly.io/docs/about/discontinued-plans/),
[Render free plan](https://costbench.com/software/developer-tools/render/free-plan), [Railway free plan](https://costbench.com/software/developer-tools/railway/free-plan/),
[Hetzner 2026 prices](https://findstack.com/resources/hetzner-price-increase-2026), [Oracle free tier](https://fullmetalbrackets.com/blog/oci-free-tier-breakdown),
[Browserbase under the hood](https://docs.browserbase.com/under-the-hood), [Lightsail pricing 2026](https://cloudburn.io/blog/amazon-lightsail-pricing), [EC2 t4g.small free trial](https://repost.aws/articles/ARbeHG--bbT6mXw38WgSz01w/announcing-amazon-ec2-t4g-free-trial-extension), [Lightsail regions](https://docs.aws.amazon.com/lightsail/latest/userguide/understanding-regions-and-availability-zones-in-amazon-lightsail.html), [Bluehost VPS pricing](https://hostadvice.com/hosting-company/blue-host-reviews/vps-pricing/), [Hostinger renewal prices](https://findstack.com/resources/hostinger-renewal-price).

## Free and near-free ways to run CrawlGenie (verified Oct 2026)

Ranked by how much of CrawlGenie you keep. "Always on" means the dashboard, live sessions, MCP and cron all work.

| Option | Cost | What you get | Catch |
|---|---|---|---|
| **Oracle Cloud Always Free** (Arm, up to 2 OCPU / 12 GB) | $0 forever | Always on, the only free tier that runs Chromium comfortably | Signup is flaky: use a fresh incognito Chrome, a physical credit card with international payments enabled, pick Mumbai over Hyderabad, retry; capacity errors are common for Arm, retry at night |
| **Google Cloud e2-micro** (1 shared vCPU / 1 GB, us-west1 / us-central1 / us-east1 only) | $0 forever + ~$3.65/mo for the external IPv4 | Always on for light use: `VESSEL_WARM_BROWSERS=1`, `VESSEL_MAX_SESSIONS=2`, add 2 GB swap | 1 GB RAM: two concurrent sessions at most; skip the IPv4 charge by using IPv6 + Cloudflare Tunnel |
| **Google Cloud $300 / 90 days** (new accounts) | $0 for ~3 months | A real 2 vCPU / 4 GB VM (e2-medium) with everything on | Then pay or move; export `/data` with the built-in backup |
| **Cloud Run** (scale-to-zero, 2 GB) | $0 within the free tier (180k vCPU-s, 360k GiB-s / month ≈ 50 active hours) | API, scrape, extractors, MCP on demand | No resident process: sessions end when idle; point an external cron at `POST /v1/tick` (admin key) to run watches/schedules; mount nothing persistent — use `VESSEL_BACKUP_URL` (S3-compatible, GCS works with HMAC keys) and restore on boot |
| **GitHub Actions** (public repo: unlimited standard-runner minutes; private: 2,000/month) | $0 | Scheduled extractors, scrapes and crawls as batch jobs with results committed to the repo — see `deploy/github-actions/vessel-extract.yml` | No dashboard, no live sessions, no state between runs beyond what you commit |
| **AWS / Azure credits** | $100–200 of credit, 6 months / 30 days | A proper VM for a few months | Not permanent since 2025 |
| **Hetzner CX22 / CX23** | ≈ €4.5–6 / month | The reference always-on setup (2 vCPU / 4 GB, EU/US) | Not free |

What does **not** work: Render/Railway/Koyeb/Fly free tiers (≤ 512 MB RAM — Chromium will not start), Vercel/Netlify (no long-running process), Cloudflare Browser Rendering (browsers only inside Workers, no CDP endpoint, 10 min/day free), Modal (fine for burst jobs, but keeping one container warm costs more than a VPS and scale-to-zero kills sessions and cron).
