Building PicoPaaS: the design
What PicoPaaS is, why it is shaped the way it is, and the isolation and cost decisions behind it.
PicoPaaS is a tiny, strict, multi-tenant PaaS for throwaway projects. You give it one Docker image, some env vars, and optionally a MySQL database (50 MB) and a Spaces bucket (100 MB). It gives you an HTTPS URL. Every app is capped at 200m CPU, 384 MB RAM and a 512 MB image. That is deliberate: small caps are what make the whole thing affordable and safe.
The shape of it
The platform is a FastAPI backend with a Vue 3 frontend baked into the same image. It runs on DigitalOcean Kubernetes with Traefik for ingress, cert-manager for a wildcard certificate, managed MySQL for the platform and per-app databases, and Spaces for object storage. A reconciler inside the API process continuously drives the cluster toward what the database says should exist, so a crashed deploy or a half-created namespace heals itself on the next sweep.
Isolation is the product
Each app gets its own namespace with the restricted Pod Security Standard enforced, a default-deny NetworkPolicy (only Traefik in, only its own MySQL out), no service-account token mounted, and a ResourceQuota and LimitRange sized from the caps. Images must run as non-root, and the size cap is checked against the registry before anything is scheduled. Images are pinned by digest, so what we checked is what runs.
Guardrails
- Signups are approval-gated, so strangers cannot just show up and run code.
- Everything privileged is written to an audit log.
- SMTP egress is blocked, because a free host is a spam magnet otherwise.
- Secrets are encrypted at rest with rotating Fernet keys.
Cost model
The baseline is around $60 a month: one worker node, a small managed MySQL, a load balancer and a Spaces subscription. After that, an extra app costs close to nothing until the node fills up, roughly 8 to 12 apps per node. I wrote the numbers down, with sources, in the architecture doc rather than guessing.
That is the foundation. The next posts are about what we built on top of it. Try it at picopaas.xyz.