[{"data":1,"prerenderedAt":88},["ShallowReactive",2],{"blog:\u002Fblog\u002F2026-06-17-nitro-on-bun":3},{"id":4,"title":5,"body":6,"date":78,"description":79,"extension":80,"meta":81,"navigation":82,"path":83,"seo":84,"stem":85,"tag":86,"__hash__":87},"blog\u002Fblog\u002F2026-06-17-nitro-on-bun.md","Why we run Nitro on Bun in production",{"type":7,"value":8,"toc":71},"minimark",[9,13,26,31,43,58,62,65],[10,11,5],"h1",{"id":12},"why-we-run-nitro-on-bun-in-production",[14,15,16,17,21,22,25],"p",{},"AiChat's server runs on Bun in production — ",[18,19,20],"code",{},"nitro.preset: 'bun'",", so the process is\n",[18,23,24],{},"Bun.serve",". The interesting part wasn't the runtime. It was the build.",[27,28,30],"h2",{"id":29},"the-build-doesnt-run-on-bun-on-purpose","The build doesn't run on Bun — on purpose",[14,32,33,34,38,39,42],{},"The Nitro server bundle (Rollup) is a known Nuxt memory hog — it peaks around 7.5 GB\nregardless of runtime. DigitalOcean App Platform ",[35,36,37],"strong",{},"hard-caps every build at 8 GB",",\nun-raisable. Node's ",[18,40,41],{},"--max-old-space-size"," throttles the build heap so it fits under\nthat cap; Bun's JS engine has no equivalent throttle, peaks higher, and risks an\nexit-137 OOM on the builder.",[14,44,45,46,50,51,54,55,57],{},"So the Dockerfile builds on Node and runs on Bun. The build ",[47,48,49],"em",{},"engine"," doesn't change\nthe artifact — ",[18,52,53],{},"preset: 'bun'"," emits the same ",[18,56,24],{}," output either way — so the\nproduction server is still 100% Bun.",[27,59,61],{"id":60},"the-lesson","The lesson",[14,63,64],{},"\"Full Bun\" is a runtime decision, not a build one. Match the tool to the constraint:\nBun where it wins (the server), Node where the platform forces your hand (a memory-\ncapped builder). The user never sees the difference.",[66,67,68],"callout",{},[14,69,70],{},"If we ever outgrow the 8 GB build cap, the escape hatch is building the image in CI\nand deploying from a registry — which sidesteps the cap entirely.",{"title":72,"searchDepth":73,"depth":73,"links":74},"",3,[75,77],{"id":29,"depth":76,"text":30},2,{"id":60,"depth":76,"text":61},"2026-06-17","Identical artifact, a Bun runtime, and a build cap that forced an honest decision.","md",{},true,"\u002Fblog\u002F2026-06-17-nitro-on-bun",{"title":5,"description":79},"blog\u002F2026-06-17-nitro-on-bun","Infra","sbsBfThN8l8oUJx_Nwoz1VE1K5foFPBENt3ntbr7sQM",1781793790961]