A Holochain node is usually pictured as a process that stays on: a home server, a rented VPS, a laptop that never sleeps. We wanted to know whether a node could sleep instead. If a node can shut down when idle and wake on the next request, a person can run their own node inside their own Cloudflare account for about $5.50–$7/mo, with 0 servers to patch.
On 27 Nov 2026 we ran the experiment on live infrastructure and wrote down every number.
The test bed was a stock node in a scale-to-zero container
The node ran unmodified holochain 0.7.1 with its lair keystore, running in a Cloudflare Containers standard-1 instance: 4 GiB of RAM, 0.5 vCPU and an 8 GB ephemeral disk with 7.32 GiB free. Cloudflare Containers run each instance in a small virtual machine that starts on demand and stops when idle.
Ephemeral is the important word. When the container sleeps, its disk is gone. The node's state has to be saved to durable storage on the way down and restored on the way up. We used a real Cloudflare R2 bucket for that. A Cloudflare Worker sat in front as the public HTTPS endpoint, forwarding verified requests to the container.
We ran 2 workloads: a compact node holding under 25 MB of state, and a heavy node holding 53 MiB of stored objects written across 3 separate cells. A cell is the signed chain a node keeps for 1 app.
A compact node wakes in about 5 seconds
A node born fresh inside the container was serving in 4.65 s. Once warm, its health endpoint answered in 227–280 ms.
The number that matters is the cold wake: container starts, state streams down from R2, the node opens its databases and answers. For the compact node that took 4.22–4.66 s measured inside the container and 5.51–5.93 s as seen by an HTTPS client.
Wake time grows with the size of the chain
The heavy node told the other half of the story. Its 53 MiB of objects occupied 151.06 MB in the node's encrypted databases, about 2.8× the logical size.
Saving that state to R2 took 10.84 s for a 150.70 MB checkpoint uploaded in 18 parts.
We then deleted 1 of the 3 cells to see what came back. The next checkpoint was 120.32 MB, a saving of 30.38 MB. Whole-cell deletion reclaims space; deleting single entries inside a cell adds to the chain.
Restoring that 120.32 MB checkpoint took 3.60 s of streaming, and the full cold wake came to 10.02 s inside the container and 16.57 s over HTTPS.
The conclusion shaped hAppBucket's architecture. A scale-to-zero node stays pleasant to use while its chain stays small, so files belong in an object store with the chain keeping their index. Keys in Holochain, Ciphertext Anywhere describes that design.
Peak memory stayed at 281.2 MiB
The kernel's VmHWM counter records the most resident memory a process has ever held. Under the heaviest writes it read 287,952 KiB, under 7% of the container's 4 GiB.
2 settings kept it there. MALLOC_ARENA_MAX=2 limits the C allocator to 2 memory arenas, which bounds how far memory spreads under concurrent work. We also capped concurrent calls into the node at 2. With both in place, Holochain 0.7.1 fits a standard-1 container with room to spare.
Copying an encrypted database with the SQLite tool corrupted it
This trap is easy to walk into. Holochain's conductor.db and wasm.db, and lair's store_file, are SQLCipher databases. SQLCipher is SQLite with page-level encryption, and it reserves 80 bytes at the end of every page for authentication data.
The standard way to snapshot a live SQLite database is sqlite3 .backup. Run against these files, it wrote copies with the per-page authentication stripped. On the next wake the node refused them:
sqlcipher_page_cipher: hmac check failed for pgno=1
The reliable procedure treats the files as opaque. Send the node SIGTERM, wait for a clean shutdown, then copy every file byte for byte. Our checkpoint pipes those files through tar, Zstandard at level 1 and AES-256-GCM in a single streaming pass to R2, and the restore runs the same pipe in reverse with 0 plaintext temp files. That pipeline produced the 3.60 s restore above.
The container reports swap in a different place than the checks expected
Our startup script requires swap to be off before the node may start. It read the cgroup file /sys/fs/cgroup/memory.swap.max. Inside Cloudflare's virtual machine that file is unpopulated, so the check failed on a machine that had 0 swap.
/proc/meminfo carried the answer: SwapTotal: 0 kB. The entrypoint now accepts either signal.
Disk had a similar surprise. A free-space floor of 25 GiB, sensible on a VPS, can never pass on an 8 GB disk with 7.32 GiB free. The floor for containers is now 512 MiB or less. Both rules are written into hAppBucket's engineering constraints so the next port starts from them.
Rejected requests never wake the node
A public endpoint attracts scanners and bots. If each probe woke the container, the owner would pay for strangers' curiosity.
The Worker in front checks each request's signature before anything else. Invalid requests received a 401 in 76.9–94.9 ms, and the container stayed asleep through all of them. Unauthorized traffic triggers 0 container boots and $0 of compute.
This also answers a common networking question. HTTPS ends at Cloudflare's edge, and the Worker forwards verified requests to the container over a private loopback connection. The setup needs 0 raw TCP proxying, so Cloudflare Spectrum stays out of the bill.
The whole deployment costs about $5.50–$7/mo in the owner's account
| Item | Cost |
|---|---|
| Workers Paid plan | $5/mo |
standard-1 container compute, billed while active | usage |
| R2 storage, first 10 GB | $0 |
| R2 egress | $0 |
| Total for a personal node | about $5.50–$7/mo |
The bill goes to the person who owns the node, in their own Cloudflare account, and the keys stay in that account's runtime. Compare a self-managed Docker host at €6–36/mo plus the hours of keeping Linux patched.
What these numbers set in motion
Each measurement became a rule in hAppBucket. Chains stay compact, so wakes stay near 5 s. Bulk bytes go to R2 as encrypted chunks, so deletes return space. Checkpoints copy bytes exactly after a clean stop. Edge checks run first, so idle costs stay at the base plan.
The Cloudflare package that applies all of this is the next milestone on the build plan.