Skip to content
use-cases / one-sandbox-per-customer / hero
CONTAINERS · MULTI-TENANT SAAS

One sandbox per customer, automatically

When a customer signs up, one API call provisions their isolated environment. No tenant_id columns, no namespace YAML — just a POST that returns a container URL in seconds.

Read the copy docs
use-cases / one-sandbox-per-customer / trigger

What that single API call provisions

Each POST to /api/v1/projects/{id}/containers spins up an isolated environment. One call, one tenant, one URL handed back to your app.

01 · WEBHOOK

Signup triggers the container POST

Your Stripe (or any billing) webhook hits a Hoody Exec script. No Express, no server config — just a file in scripts/.

02 · ISOLATION

Linux namespaces, not a WHERE clause

The new container has its own filesystem, its own SQLite, its own ramdisk. Tenant A literally cannot see tenant B's data.

03 · URL

A unique URL back to your app

The response includes a container URL. Your app redirects the user into their own sandbox in the same deploy window.

04 · FIREWALL

Per-tenant network rules cloned

Container network and firewall rules are copied from your template. Every new tenant starts from the same security baseline.

05 · IDLE

Zero cost when idle

Stop the container and it costs nothing. BTRFS keeps only the delta from your template — disk stays cheap even at scale.

06 · OFFBOARD

DELETE container = forget tenant

One DELETE call removes the container and all their data. GDPR offboarding is not a script, it is a single HTTP call.

The whole flow is one webhook handler. No Kubernetes operator, no namespace YAML, no cluster admin. Three HTTP calls: webhook in, container out, URL to user.

use-cases / one-sandbox-per-customer / compare

Shared multi-tenancy vs container-per-customer

The traditional choices were a column on every table or a fleet of VMs you could not afford. Hoody is a third shape: containers cheap enough to give one to every customer.

DIMENSION
SHARED DB · TENANT_ID
HOODY · CONTAINER PER CUSTOMER
  • ISOLATIONWHERE tenant_id = $1 — and you hope every query remembersLinux namespaces. Tenant A literally cannot see tenant B's filesystem.
  • DATA LEAK SURFACEevery JOIN, every ORM hook, every reporting scriptthe container boundary. One artifact to audit, not 200 query sites.
  • PER-TENANT CONFIGfeature flags table, brittle, half-tested in devedit one container's environment. The other 399 are unchanged.
  • NOISY NEIGHBORone heavy customer can lock the shared DBcontainer CPU and disk quotas; one tenant's load stays in their box.
  • OFFBOARDINGDELETE … WHERE tenant_id … plus 12 other tables you forgotDELETE the container. Their data goes with it. GDPR is one HTTP call.
  • COST AT IDLEevery row costs storage even when the customer is asleepstop the container — zero CPU, zero RAM. BTRFS keeps only the delta.
  • no tenant_id columns
  • no row-level security audits
  • no namespace YAML
  • delete = forget
use-cases / one-sandbox-per-customer / punchline

Multi-tenancy stops being an architecture problem. It becomes a `cp` command.

ONBOARDPOST /containers/$TEMPLATE/copy
OFFBOARDDELETE /containers/$CID
PER-TENANT TWEAKPATCH /containers/$CID [ env_vars ]
  • namespace-grade isolation
  • GDPR delete in one call
  • one container per account
use-cases / one-sandbox-per-customer / replaces

What this replaces

Per-tenant isolation has historically meant either a clever WHERE clause or an expensive cluster. Container-per-customer displaces the usual workarounds:

  • Shared multi-tenancy (tenant_id column)One bad query exposes everyone
  • Custom tenant isolation middlewareHand-rolled guard you maintain forever
  • Postgres row-level security policiesRight answer, costly to audit per table
  • Kubernetes namespace per tenantCluster-level overhead, ops team required
  • Per-customer schemas / databasesMigration multiplier, connection-pool pain
  • Stripe metering rows in a shared tableUsage-tracking glued onto the same shared box
use-cases / one-sandbox-per-customer / cta

Idle customers cost nothing. Active ones scale on demand. The whole thing runs on $49 of bare metal until you have hundreds of paying users.

use-cases / one-sandbox-per-customer / related

Read the others