Moving five self-hosted tools from a NAS to Workers: the bill and the pitfalls
@2MarsSI’s X article records two weekends moving five small tools from a home NAS to Cloudflare Workers: about ¥13 a month in NAS power and disk wear became ¥0 inside the free allowance, with a ranked list of pitfalls and cases where Workers is the wrong fit.
- Products
- WorkersKVR2
- Source
- Author experience𝕏 article
- Author
- 2MarsSI (@2MarsSI)
Key points
- The author estimates the NAS cost about ¥13 a month in electricity and disk wear; after the move, Workers Free and Workers KV stayed within the free allowance at ¥0, and the domain was already on Cloudflare.
- Pitfalls he ranks: cold starts (about 1.5 s on the first request, then under 30 ms); keep secrets in the dashboard rather than a Docker-style .env; treat statelessness as a hard constraint and use KV instead of in-memory caches; uploads need a different architecture — temporary files in KV plus scheduled cleanup, "or the bill will teach you a lesson".
- He says Workers suits home use and low concurrency (citing the 100,000 requests a day free allowance), not long-running tasks; large storage should go to R2 or stay on the NAS.
- He advises against copying him when tools depend on native Node modules, need long-lived WebSockets, or have compliance or data-residency requirements.
Original sources
Published
Original post
Read on 𝕏@2MarsSI’s X article records two weekends moving five small tools from a home NAS to Cloudflare Workers: about ¥13 a month in NAS power and disk wear became ¥0 inside the free allowance, with a ranked list of pitfalls and cases where Workers is the wrong fit.
2mars
@2MarsSI · Original 𝕏 post
https://t.co/2mz1uPDDN2
Read originalArchived
2mars · @2MarsSI
两周把5个自建小工具搬到Cloudflare Workers:账单与踩坑全记录
我上个月做了个决定:把家里 NAS 上跑的前端小工具全部迁到 Cloudflare Workers。原因很简单——一次出差,家里断电,我的"私有云"一夜之间变成"私有砖"。 今天这篇不是教程,是我两周的真实账本和避坑记录。你会看到:到底花了多少钱、哪些坑白踩了、以及什么时候你不该用 Workers。 先给你结论(30 秒版) • 5 个工具全部迁移完成,月度账单从约 ¥13 降到 ¥0(免费额度内) • 全球平均首字节延迟 220ms → 38ms • 搬家耗时:两个周末,总计约 14 小时 • 最大的坑不是技术,而是"习惯"——习惯了 Docker,就忘了 Serverless 的边界 为什么选 Workers,而不是 VPS 如果你在跑 NAS,大概率纠结过:要不要搞台 VPS?我的判断标准很简单——你的工具是"给几个人用"还是"给几百人用"? • 家庭自用、低并发:Workers 免费额度绰绰有余(10 万请求/天) • 需要长时间运行任务:别用 Workers,它是短时执行模型 • 需要大存储:搭配 R2,或继续让 NAS 当存储层 账单实测(你最想看的数字) 迁移前:NAS 每月电费 + 硬盘折旧,折算约 ¥13 迁移后:Workers 免费版 ¥0,Workers KV 免费额度内 ¥0 唯一的花费:0 元(域名直接用 Cloudflare 自己的) 省下的钱不多,但真正省下的是"断电焦虑"。 踩坑清单(按疼度排序) 1. 冷启动不是玄学——首次请求 1.5 秒,之后 30ms 内。给关键路由做预热,或保持活跃 2. 环境变量别学 Docker 那套 .env——直接面板配置,secret 和普通变量分开存 3. 无状态是硬约束——别把内存变量当缓存用,改用 KV 4. 上传文件要改架构——临时文件存 KV + 定时清理,否则账单会教你做人 什么情况下我劝你别学我 • 你的工具依赖 Node 原生模块 → 排查成本可能超过收益 • 你需要 WebSocket 长连接 → Workers 支持,但复杂度上升 • 你有合规 / 数据主权要求 → 数据在边缘节点,先想清楚 写在最后 这次迁移让我重新理解了"自托管":重要的不是服务器在哪,而是你不再害怕它宕机。下一站,我准备把手上的 AI 小工具也扔上去。 你最想把哪个自建服务搬到 Serverless?评论区聊聊,我会挑真实案例继续回答。 📌 下周预告:用 Workers AI 给这个站加一个免费的 AI 摘要功能——手把手、带完整代码,实测免费额度到底够不够用。
More to read
Feng Yi: a free Cloudflare stack still needs an exit map; if a restore into a fresh account takes over 30 minutes, it is cheap but not operationally free
On 2026-11-21, X user @Michael_liyang (Feng Yi) replied to @hiromu_bdy that the free stack still needs an exit map: export D1 to SQL, R2 objects with checksums, and Worker config to version control. Test a restore into a fresh account; if that takes over 30 minutes, the stack is cheap but not operationally free. The 30-minute threshold is the author’s operational test, not an official limit or a billed amount.
BowTied SaaS Guy: a $4,950 Cloudflare bill with $2,000 credited.
BowTied SaaS Guy (@BowTiedDolphin) says he ran up a $4,950 bill on Cloudflare and was credited $2,000 because no notifications were sent for the amount above $200. In a reply he says he upgraded after hitting free-plan limits and that another Worker’s usage skyrocketed because of a poor index on a public website.
Jonhoni99: Workers AI's 10,000 Neurons per day reset at 8:00 Beijing time, but some models must have a payment method bound first
On 2026-11-13, X user @Jonhoni99 wrote: Cloudflare's 10,000 Neurons are cleared to zero every day at 8:00 Beijing time. The catch is that models such as Kimi K2.6, GLM-5.3, and DeepSeek V4 Pro require a payment method to be bound; the official list has 9, and the free quota cannot be used. On the same day @Nyerishi also pointed out that DeepSeek V4.1 Flash on the Workers AI free plan requires a Workers Paid subscription to actually access it. These are the author's checks against the official catalog, not a bill that has already occurred.