ENTH
PART 1 · Meet the system

What is BOMLLM + four-machine architecture

What is BOMLLM · four-machine architecture

TL;DR — the 30-second summarytldr

BOMLLM is an AI system that runs 100% on your own machines — stop paying cloud LLM bills of ~$50/day (≈ 1,700 baht) and switch to a single Mac Mini on the desk, with whole-fleet electricity measured for real at ~$0.54/day (≈ 18 baht) and even the worst case (cloud fallback active) stays under ~$3.50/day (≈ 120 baht)

ItemBefore (cloud)After (BOMLLM)
Daily LLM cost~$50.00 (≈ 1,700 baht)$0.31–2.76 (fallback only)
Whole-fleet electricity—~$0.54 (≈ 18 baht) measured from a real meter
rate limitYesNone
Datasits on someone else's cloudmain processing on machines the owner controls
Total per month~$1,500 (≈ 51,000 baht)~$36–114 (≈ 1,200–3,900 baht)

This system has been running in production continuously since August 2026 serving 5 channels at once — LINE bot, Telegram bot, an analysis desk on MT5 (read-only), a web chat, and an automated article-writing pipeline — answering Thai first, and in a real 50-case test it beat the cloud models we used to pay for (score 7.24 vs 6.02) while answering ~7x faster

BOMLLM consists of 4 machines with a clear division of duties — picture a restaurant: Mac Mini = the brain (the star chef), VPS = the storefront (dining room + cashier), NAS = the back-office manager (schedules shifts + keeps watch), i9 = the image-and-audio kitchen (a separate stove for special dishes)

MachineRoleWhy this machine
Mac Mini M4 Pro 48GBThe brain — LLM processingthe best value in speed per watt per baht — for a 27B-class model: 30 tok/s on MLX vs 7.9 tok/s on GGUF on the same machine; quiet, drawing 30–65 W
VPS (Singapore)The storefront — public HTTPStakes HTTPS, authentication, budgets, the RAG database, web search — cheap, always online, close to users
i9 + 2× RTX 5060 TiThe kitchen — image and audio workRunning ComfyUI image generation and Thai TTS requires CUDA — a machine we already owned, so the only added cost is electricity
NAS Synology DS725+The back-office manager — automationRuns n8n, receives webhooks, watches with Uptime Kuma, backs up data — low power draw, already on 24/7

Every machine is connected through Tailscale (a private mesh VPN), and the single door to the outside world goes through Cloudflare Tunnel — no router port is opened at all, not even one; every API requires a key (see chapters 2 and 9)

When to usewhen to use

BOMLLM is right for you if…

  • your business or workload burns tens of thousands of baht a month on cloud LLMs — the more calls you make, the more you save
  • you want customer data, chats and code to never leave the house (bank-grade privacy)
  • you hit rate limits when work spikes and want thousands of uncapped calls a day
  • most of your work is Thai Q&A, gold/forex analysis, content writing, translation, classification — which covers ~85% of real traffic

Not right for you if…

  • you need a frontier model for brand-new, very hard coding work — for that job, Tier 3 cloud is still cheaper
  • you have no time at all to maintain a system — you are your own SRE, budget ~1–2 hrs/week (upgrades, watching logs)
  • you think one click and it is done — this 9-chapter manual is "proof that real work is required", not magic

This 4-machine architecture is something that grew out of real use, not a fancy-website-style design drawn up in advance — if you are starting fresh:

  • Bare minimum: a single Mac + Cloudflare Tunnel already runs (chat + bot) — this kit boots without the i9 and the NAS; channels with no machine behind them simply stay off
  • Have image/audio work: add the i9 (or any NVIDIA machine you already own) per chapter 6
  • Have bots + scheduled jobs: add the NAS (or any always-on Linux machine you already own) for n8n
  • More speed / less risk: these are extras — the core system still lives on a single Mac

How-tohow to

No hands-on work in this chapter yet — its job is to let you see the real numbers before deciding. The path through the whole manual is

  1. Know the system — chapters 1–2 (cost numbers, architecture, the hardware you need)
  2. Install — chapters 2–4 (the Tailscale network → Mac → VPS → config files → per-channel keys)
  3. Use it — chapters 5–6 (the Open WebUI web chat, extra models, images/audio, Thai formulas)
  4. Connect channels — chapters 7–8 (LINE/Telegram, MT5 + the article pipeline)
  5. Maintain it — chapter 9 (security, upgrades and troubleshooting)

Finish PART 1 before opening your wallet — chapter 2 says clearly what is required and what is optional; if you get stuck anywhere → chapter 9

The path of a single message (normal chat):

Browser -> Cloudflare Tunnel -> Open WebUI -> LiteLLM (checks key+budget+picks route)
          -> Tailscale -> Ollama MLX (Mac) -> streams the answer back the same way

The web chat never talks to the Mac directly — every call goes through LiteLLM so it can be verified and logged 100%

The path of a bot message (LINE/Telegram):

LINE/Telegram platform -> webhook -> n8n (NAS) -> workflow
  -> LiteLLM /v1/chat/completions (model thai-chat-rt, think off)
  -> format the answer -> reply to the platform

Special routes: web search uses SearXNG on the VPS, RAG uses vectors on Qdrant, images run to ComfyUI through the router on the NAS, audio runs to the i9 — details in chapters 5–6; if you get stuck anywhere → chapter 9

Config exampleconfig example

Here is the condensed "expense receipt" — every number was measured from real hardware, not guessed (the full version with the measurement method lives in docs/cost.md in the repo)

# Daily electricity cost = Σ(machine average watts x 24 hrs / 1000) x price per unit
# Real data from plug meters + powermetrics / nvidia-smi (7-day average)

Mac Mini M4 Pro 48GB    ~8 W  (estimated)      -> 0.192 kWh/day (approx.)
i9 + 2x RTX 5060 Ti    ~93 W  (GPU, measured)     -> 2.232 kWh/day (approx.)
NAS Synology DS725+    ~28 W  (survey midpoint) -> 0.67 kWh/day
Network gear (share)   ~15 W                   -> 0.36 kWh/day
------------------------------------------------------------------
Total 3.67 kWh x 4.84 baht/kWh (MEA) = ~17.8 baht/day ~ $0.54

The electricity you actually pay varies with your local utility's rate — the kWh figures are the reusable numbers

The remaining cloud spend (Tier 3 fallback, only on days when the Mac is down) is measured from the LiteLLM_SpendLogs table in the first week of September 2026: normal days $0.31–1.10, worst peak day $2.76 (55% of the $5 cap) — the cap was never breached

The 3-tier fallback ladder — the reason the system never goes dark, even when the Mac reboots:

TierWhereCostDuty
🟢 Tier 1Mac (27B MLX)Freetakes ~80–85% of all traffic
🟡 Tier 2VPS (small model on CPU)Freeholds the bots up while the Mac boots or runs too hot
🔴 Tier 3Cloud APICosts moneypulled in only when the first two tiers truly fail — real spend $0.31–2.76/day

This whole mechanism is configured in LiteLLM (the fallbacks rows) — the actual setup is in chapter 4

Pro tip — lessons from the fieldpro tip

★ PROD LESSON
This is not a fun side project — it is a real production system — that sentence comes from the project's own launch plan. This system has answered real customers every day since Aug 2026 — it is not a demo toy. Every number in this manual is backed by logs/meters/scripts, and we disclose both what worked "and what failed", so you can decide on evidence, not advertising
★ PRO TIP
Think like an investor — Mac ~$2,000 (≈ 66,000 baht) that saves ~$46.5/day (≈ 1,600 baht) = payback in ~6 weeks — after that the cost of 1 token is close to zero, but do not forget to add ~1–2 hrs/week of maintenance time
★ PROD LESSON
Single point of failure = yes, and we accept that — if the Mac goes down, Tier 2 takes over immediately (smaller model, slower answers), and if things break harder than that, Tier 3 is pulled in under a $5/day cap — our 5-channel bot business can accept this risk; it is cheaper than paying full cloud prices every day
★ PRO TIP
Start small, grow later — do not buy all 4 machines in one day — start with the Mac alone, use it for real for 1–2 weeks, then add machines as the need "shows itself". Our system's growth path came from real work too, not from planning on paper

FAQfaq

Q: Is the Thai really good enough? — good enough to genuinely replace the cloud: its 50-case evaluation score wins with statistical significance (see chapter 6), though it still has limitations we do not hide — for example, Chinese characters slip into ~15/100 answers

Q: How good with computers do I need to be? — comfortable enough with a terminal, SSH and Docker; this manual walks chapter by chapter, and every command can be copied

All 12 most-asked questions (cost, risk, trading and more) are collected on the FAQ page

Q: Why not put everything on one machine? — you can, but splitting the machines means (1) heavy image/audio work never touches LLM speed, (2) the public storefront is separated from the brain, (3) machines we already owned become useful again

Q: How powerful does the VPS need to be? — the reference spec is Debian 12, 12 vCPU, 47GB, but the compose stack runs comfortably on 4 vCPU / 8GB

See alsosee also

Figuresfigures

BOMLLM banner — a self-hosted AI system at 18 baht a day in electricity
The project banner (from the upstream repo)
BOMLLM Manual cover
This manual's cover — depicting the atmosphere of the system's real working desk
Diagram of the 4-machine BOMLLM architecture — Mac VPS i9 NAS linked by Tailscale
Whole-system overview diagram (SVG drawn from the real architecture document)
Diagram of the 3-tier fallback ladder — Mac, then VPS, then cloud
The mechanism that keeps the system alive when the Mac goes down
Architecture image from the upstream repository
The same image as in the repo README — every box is labeled in English

Real screen recording for this lesson · click play to hear the summary · not investment advice

▶ Watch the manual video: https://youtu.be/O4hM39cgDCY