milaidy 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +538 -0
  3. package/dist/argv-CfSowvEA.js +63 -0
  4. package/dist/config-B-mboG4v.js +4 -0
  5. package/dist/eliza-CPJjgw-e.js +1491 -0
  6. package/dist/eliza.js +2192 -0
  7. package/dist/entry.js +232 -0
  8. package/dist/index.js +209 -0
  9. package/dist/links-BFKlWqSe.js +15 -0
  10. package/dist/paths-D_yh1DEJ.js +69 -0
  11. package/dist/plugins-cli-B7kSre2c.js +134 -0
  12. package/dist/program-6KwWwKKh.js +510 -0
  13. package/dist/register.agents-CPVmSjMG.js +17 -0
  14. package/dist/register.browser-B2ooXxNx.js +15 -0
  15. package/dist/register.channels-CMYQ6K6Y.js +42 -0
  16. package/dist/register.cron-D91lY1_Y.js +9 -0
  17. package/dist/register.devices-rU5I5L_y.js +13 -0
  18. package/dist/register.gateway-82SLAvw3.js +22 -0
  19. package/dist/register.hooks-B_XTBEkt.js +9 -0
  20. package/dist/register.logs-BgEGcPd8.js +10 -0
  21. package/dist/register.models-BJt9eVgZ.js +26 -0
  22. package/dist/register.nodes-B5xY1s8a.js +9 -0
  23. package/dist/register.skills-SFQqYIhg.js +10 -0
  24. package/dist/register.subclis-uF_AsbWR.js +187 -0
  25. package/dist/run-main-XODklzS-.js +56 -0
  26. package/dist/theme-DBvtuGeq.js +36 -0
  27. package/dist/utils-C1AUpp_V.js +42 -0
  28. package/dist/version-Cpn3yr5D.js +26 -0
  29. package/dist/workspace-Co3Wul2D.js +206 -0
  30. package/dist/workspace-DCA6MNVK.js +350 -0
  31. package/docs/.i18n/README.md +31 -0
  32. package/docs/.i18n/glossary.zh-CN.json +210 -0
  33. package/docs/.i18n/zh-CN.tm.jsonl +1329 -0
  34. package/docs/CNAME +1 -0
  35. package/docs/automation/cron-jobs.md +468 -0
  36. package/docs/automation/cron-vs-heartbeat.md +254 -0
  37. package/docs/automation/gmail-pubsub.md +256 -0
  38. package/docs/automation/poll.md +69 -0
  39. package/docs/automation/webhook.md +163 -0
  40. package/docs/bedrock.md +176 -0
  41. package/docs/brave-search.md +41 -0
  42. package/docs/broadcast-groups.md +442 -0
  43. package/docs/cli/acp.md +170 -0
  44. package/docs/cli/agent.md +24 -0
  45. package/docs/cli/agents.md +75 -0
  46. package/docs/cli/approvals.md +50 -0
  47. package/docs/cli/browser.md +107 -0
  48. package/docs/cli/channels.md +79 -0
  49. package/docs/cli/config.md +50 -0
  50. package/docs/cli/configure.md +33 -0
  51. package/docs/cli/cron.md +42 -0
  52. package/docs/cli/dashboard.md +16 -0
  53. package/docs/cli/devices.md +67 -0
  54. package/docs/cli/directory.md +63 -0
  55. package/docs/cli/dns.md +23 -0
  56. package/docs/cli/docs.md +15 -0
  57. package/docs/cli/doctor.md +41 -0
  58. package/docs/cli/gateway.md +199 -0
  59. package/docs/cli/health.md +21 -0
  60. package/docs/cli/hooks.md +291 -0
  61. package/docs/cli/index.md +1029 -0
  62. package/docs/cli/logs.md +24 -0
  63. package/docs/cli/memory.md +45 -0
  64. package/docs/cli/message.md +239 -0
  65. package/docs/cli/models.md +79 -0
  66. package/docs/cli/node.md +112 -0
  67. package/docs/cli/nodes.md +73 -0
  68. package/docs/cli/onboard.md +29 -0
  69. package/docs/cli/pairing.md +21 -0
  70. package/docs/cli/plugins.md +62 -0
  71. package/docs/cli/reset.md +17 -0
  72. package/docs/cli/sandbox.md +152 -0
  73. package/docs/cli/security.md +26 -0
  74. package/docs/cli/sessions.md +16 -0
  75. package/docs/cli/setup.md +29 -0
  76. package/docs/cli/skills.md +26 -0
  77. package/docs/cli/status.md +26 -0
  78. package/docs/cli/system.md +60 -0
  79. package/docs/cli/tui.md +23 -0
  80. package/docs/cli/uninstall.md +17 -0
  81. package/docs/cli/update.md +98 -0
  82. package/docs/cli/voicecall.md +34 -0
  83. package/docs/cli/webhooks.md +25 -0
  84. package/docs/concepts/agent-loop.md +146 -0
  85. package/docs/concepts/agent-workspace.md +229 -0
  86. package/docs/concepts/agent.md +122 -0
  87. package/docs/concepts/architecture.md +129 -0
  88. package/docs/concepts/channel-routing.md +114 -0
  89. package/docs/concepts/compaction.md +61 -0
  90. package/docs/concepts/context.md +159 -0
  91. package/docs/concepts/features.md +53 -0
  92. package/docs/concepts/group-messages.md +84 -0
  93. package/docs/concepts/groups.md +373 -0
  94. package/docs/concepts/markdown-formatting.md +130 -0
  95. package/docs/concepts/memory.md +546 -0
  96. package/docs/concepts/messages.md +154 -0
  97. package/docs/concepts/model-failover.md +149 -0
  98. package/docs/concepts/model-providers.md +315 -0
  99. package/docs/concepts/models.md +208 -0
  100. package/docs/concepts/multi-agent.md +376 -0
  101. package/docs/concepts/oauth.md +145 -0
  102. package/docs/concepts/plugins.md +454 -0
  103. package/docs/concepts/presence.md +102 -0
  104. package/docs/concepts/queue.md +89 -0
  105. package/docs/concepts/retry.md +69 -0
  106. package/docs/concepts/secrets.md +300 -0
  107. package/docs/concepts/session-pruning.md +122 -0
  108. package/docs/concepts/session-tool.md +193 -0
  109. package/docs/concepts/session.md +188 -0
  110. package/docs/concepts/sessions.md +10 -0
  111. package/docs/concepts/skills.md +392 -0
  112. package/docs/concepts/streaming.md +135 -0
  113. package/docs/concepts/system-prompt.md +114 -0
  114. package/docs/concepts/timezone.md +91 -0
  115. package/docs/concepts/typebox.md +289 -0
  116. package/docs/concepts/typing-indicators.md +68 -0
  117. package/docs/concepts/usage-tracking.md +35 -0
  118. package/docs/custom.css +4 -0
  119. package/docs/date-time.md +128 -0
  120. package/docs/debugging.md +162 -0
  121. package/docs/docs.json +1599 -0
  122. package/docs/environment.md +81 -0
  123. package/docs/hooks.md +876 -0
  124. package/docs/index.md +179 -0
  125. package/docs/install/ansible.md +208 -0
  126. package/docs/install/bun.md +59 -0
  127. package/docs/install/development-channels.md +75 -0
  128. package/docs/install/docker.md +567 -0
  129. package/docs/install/index.md +185 -0
  130. package/docs/install/installer.md +123 -0
  131. package/docs/install/migrating.md +192 -0
  132. package/docs/install/nix.md +96 -0
  133. package/docs/install/node.md +78 -0
  134. package/docs/install/uninstall.md +128 -0
  135. package/docs/install/updating.md +228 -0
  136. package/docs/logging.md +350 -0
  137. package/docs/multi-agent-sandbox-tools.md +395 -0
  138. package/docs/network.md +54 -0
  139. package/docs/nodes/audio.md +114 -0
  140. package/docs/nodes/camera.md +156 -0
  141. package/docs/nodes/images.md +72 -0
  142. package/docs/nodes/index.md +341 -0
  143. package/docs/nodes/location-command.md +113 -0
  144. package/docs/nodes/media-understanding.md +379 -0
  145. package/docs/nodes/talk.md +90 -0
  146. package/docs/nodes/voicewake.md +65 -0
  147. package/docs/northflank.mdx +53 -0
  148. package/docs/perplexity.md +80 -0
  149. package/docs/platforms/android.md +129 -0
  150. package/docs/platforms/digitalocean.md +262 -0
  151. package/docs/platforms/exe-dev.md +125 -0
  152. package/docs/platforms/fly.md +486 -0
  153. package/docs/platforms/gcp.md +503 -0
  154. package/docs/platforms/hetzner.md +330 -0
  155. package/docs/platforms/index.md +53 -0
  156. package/docs/platforms/ios.md +106 -0
  157. package/docs/platforms/linux.md +94 -0
  158. package/docs/platforms/mac/bundled-gateway.md +73 -0
  159. package/docs/platforms/mac/canvas.md +125 -0
  160. package/docs/platforms/mac/child-process.md +69 -0
  161. package/docs/platforms/mac/dev-setup.md +102 -0
  162. package/docs/platforms/mac/health.md +34 -0
  163. package/docs/platforms/mac/icon.md +31 -0
  164. package/docs/platforms/mac/logging.md +57 -0
  165. package/docs/platforms/mac/menu-bar.md +81 -0
  166. package/docs/platforms/mac/peekaboo.md +65 -0
  167. package/docs/platforms/mac/permissions.md +44 -0
  168. package/docs/platforms/mac/release.md +85 -0
  169. package/docs/platforms/mac/remote.md +83 -0
  170. package/docs/platforms/mac/signing.md +47 -0
  171. package/docs/platforms/mac/skills.md +33 -0
  172. package/docs/platforms/mac/voice-overlay.md +60 -0
  173. package/docs/platforms/mac/voicewake.md +67 -0
  174. package/docs/platforms/mac/webchat.md +41 -0
  175. package/docs/platforms/mac/xpc.md +61 -0
  176. package/docs/platforms/macos-vm.md +281 -0
  177. package/docs/platforms/macos.md +203 -0
  178. package/docs/platforms/oracle.md +303 -0
  179. package/docs/platforms/raspberry-pi.md +358 -0
  180. package/docs/platforms/windows.md +159 -0
  181. package/docs/plugin.md +651 -0
  182. package/docs/plugins/agent-tools.md +99 -0
  183. package/docs/plugins/manifest.md +71 -0
  184. package/docs/plugins/voice-call.md +273 -0
  185. package/docs/plugins/zalouser.md +70 -0
  186. package/docs/providers/anthropic.md +152 -0
  187. package/docs/providers/claude-max-api-proxy.md +148 -0
  188. package/docs/providers/cloudflare-ai-gateway.md +71 -0
  189. package/docs/providers/deepgram.md +93 -0
  190. package/docs/providers/glm.md +33 -0
  191. package/docs/providers/index.md +63 -0
  192. package/docs/providers/minimax.md +208 -0
  193. package/docs/providers/models.md +51 -0
  194. package/docs/providers/moonshot.md +142 -0
  195. package/docs/providers/ollama.md +223 -0
  196. package/docs/providers/openai.md +62 -0
  197. package/docs/providers/opencode.md +36 -0
  198. package/docs/providers/openrouter.md +37 -0
  199. package/docs/providers/qwen.md +53 -0
  200. package/docs/providers/synthetic.md +99 -0
  201. package/docs/providers/venice.md +267 -0
  202. package/docs/providers/vercel-ai-gateway.md +50 -0
  203. package/docs/providers/xiaomi.md +64 -0
  204. package/docs/providers/zai.md +36 -0
  205. package/docs/railway.mdx +99 -0
  206. package/docs/reference/templates/AGENTS.md +9 -0
  207. package/docs/reference/templates/BOOTSTRAP.md +3 -0
  208. package/docs/reference/templates/HEARTBEAT.md +3 -0
  209. package/docs/reference/templates/IDENTITY.md +3 -0
  210. package/docs/reference/templates/TOOLS.md +3 -0
  211. package/docs/reference/templates/USER.md +3 -0
  212. package/docs/render.mdx +165 -0
  213. package/docs/start/docs-directory.md +63 -0
  214. package/docs/start/getting-started.md +212 -0
  215. package/docs/start/milaidy.md +247 -0
  216. package/docs/start/onboarding.md +258 -0
  217. package/docs/start/pairing.md +86 -0
  218. package/docs/start/quickstart.md +81 -0
  219. package/docs/start/setup.md +149 -0
  220. package/docs/start/showcase.md +416 -0
  221. package/docs/start/wizard.md +418 -0
  222. package/docs/testing.md +368 -0
  223. package/docs/token-use.md +112 -0
  224. package/docs/tools/agent-send.md +53 -0
  225. package/docs/tools/apply-patch.md +50 -0
  226. package/docs/tools/browser-linux-troubleshooting.md +139 -0
  227. package/docs/tools/browser-login.md +68 -0
  228. package/docs/tools/browser.md +576 -0
  229. package/docs/tools/chrome-extension.md +178 -0
  230. package/docs/tools/clawhub.md +257 -0
  231. package/docs/tools/creating-skills.md +54 -0
  232. package/docs/tools/elevated.md +57 -0
  233. package/docs/tools/exec-approvals.md +246 -0
  234. package/docs/tools/exec.md +179 -0
  235. package/docs/tools/firecrawl.md +61 -0
  236. package/docs/tools/index.md +508 -0
  237. package/docs/tools/llm-task.md +115 -0
  238. package/docs/tools/reactions.md +22 -0
  239. package/docs/tools/skills-config.md +76 -0
  240. package/docs/tools/skills.md +300 -0
  241. package/docs/tools/slash-commands.md +196 -0
  242. package/docs/tools/subagents.md +151 -0
  243. package/docs/tools/thinking.md +73 -0
  244. package/docs/tools/web.md +261 -0
  245. package/docs/tui.md +159 -0
  246. package/docs/vps.md +43 -0
  247. package/docs/web/control-ui.md +221 -0
  248. package/docs/web/dashboard.md +46 -0
  249. package/docs/web/index.md +116 -0
  250. package/docs/web/webchat.md +49 -0
  251. package/milaidy.mjs +14 -0
  252. package/package.json +271 -0
  253. package/skills/.cache/catalog.json +88519 -0
@@ -0,0 +1,303 @@
1
+ ---
2
+ summary: "Milaidy on Oracle Cloud (Always Free ARM)"
3
+ read_when:
4
+ - Setting up Milaidy on Oracle Cloud
5
+ - Looking for low-cost VPS hosting for Milaidy
6
+ - Want 24/7 Milaidy on a small server
7
+ title: "Oracle Cloud"
8
+ ---
9
+
10
+ # Milaidy on Oracle Cloud (OCI)
11
+
12
+ ## Goal
13
+
14
+ Run a persistent Milaidy Gateway on Oracle Cloud's **Always Free** ARM tier.
15
+
16
+ Oracle’s free tier can be a great fit for Milaidy (especially if you already have an OCI account), but it comes with tradeoffs:
17
+
18
+ - ARM architecture (most things work, but some binaries may be x86-only)
19
+ - Capacity and signup can be finicky
20
+
21
+ ## Cost Comparison (2026)
22
+
23
+ | Provider | Plan | Specs | Price/mo | Notes |
24
+ | ------------ | --------------- | ---------------------- | -------- | --------------------- |
25
+ | Oracle Cloud | Always Free ARM | up to 4 OCPU, 24GB RAM | $0 | ARM, limited capacity |
26
+ | Hetzner | CX22 | 2 vCPU, 4GB RAM | ~ $4 | Cheapest paid option |
27
+ | DigitalOcean | Basic | 1 vCPU, 1GB RAM | $6 | Easy UI, good docs |
28
+ | Vultr | Cloud Compute | 1 vCPU, 1GB RAM | $6 | Many locations |
29
+ | Linode | Nanode | 1 vCPU, 1GB RAM | $5 | Now part of Akamai |
30
+
31
+ ---
32
+
33
+ ## Prerequisites
34
+
35
+ - Oracle Cloud account ([signup](https://www.oracle.com/cloud/free/)) — see [community signup guide](https://gist.github.com/rssnyder/51e3cfedd730e7dd5f4a816143b25dbd) if you hit issues
36
+ - Tailscale account (free at [tailscale.com](https://tailscale.com))
37
+ - ~30 minutes
38
+
39
+ ## 1) Create an OCI Instance
40
+
41
+ 1. Log into [Oracle Cloud Console](https://cloud.oracle.com/)
42
+ 2. Navigate to **Compute → Instances → Create Instance**
43
+ 3. Configure:
44
+ - **Name:** `milaidy`
45
+ - **Image:** Ubuntu 24.04 (aarch64)
46
+ - **Shape:** `VM.Standard.A1.Flex` (Ampere ARM)
47
+ - **OCPUs:** 2 (or up to 4)
48
+ - **Memory:** 12 GB (or up to 24 GB)
49
+ - **Boot volume:** 50 GB (up to 200 GB free)
50
+ - **SSH key:** Add your public key
51
+ 4. Click **Create**
52
+ 5. Note the public IP address
53
+
54
+ **Tip:** If instance creation fails with "Out of capacity", try a different availability domain or retry later. Free tier capacity is limited.
55
+
56
+ ## 2) Connect and Update
57
+
58
+ ```bash
59
+ # Connect via public IP
60
+ ssh ubuntu@YOUR_PUBLIC_IP
61
+
62
+ # Update system
63
+ sudo apt update && sudo apt upgrade -y
64
+ sudo apt install -y build-essential
65
+ ```
66
+
67
+ **Note:** `build-essential` is required for ARM compilation of some dependencies.
68
+
69
+ ## 3) Configure User and Hostname
70
+
71
+ ```bash
72
+ # Set hostname
73
+ sudo hostnamectl set-hostname milaidy
74
+
75
+ # Set password for ubuntu user
76
+ sudo passwd ubuntu
77
+
78
+ # Enable lingering (keeps user services running after logout)
79
+ sudo loginctl enable-linger ubuntu
80
+ ```
81
+
82
+ ## 4) Install Tailscale
83
+
84
+ ```bash
85
+ curl -fsSL https://tailscale.com/install.sh | sh
86
+ sudo tailscale up --ssh --hostname=milaidy
87
+ ```
88
+
89
+ This enables Tailscale SSH, so you can connect via `ssh milaidy` from any device on your tailnet — no public IP needed.
90
+
91
+ Verify:
92
+
93
+ ```bash
94
+ tailscale status
95
+ ```
96
+
97
+ **From now on, connect via Tailscale:** `ssh ubuntu@milaidy` (or use the Tailscale IP).
98
+
99
+ ## 5) Install Milaidy
100
+
101
+ ```bash
102
+ curl -fsSL https://milaidy.ai/install.sh | bash
103
+ source ~/.bashrc
104
+ ```
105
+
106
+ When prompted "How do you want to hatch your bot?", select **"Do this later"**.
107
+
108
+ > Note: If you hit ARM-native build issues, start with system packages (e.g. `sudo apt install -y build-essential`) before reaching for Homebrew.
109
+
110
+ ## 6) Configure Gateway (loopback + token auth) and enable Tailscale Serve
111
+
112
+ Use token auth as the default. It’s predictable and avoids needing any “insecure auth” Control UI flags.
113
+
114
+ ```bash
115
+ # Keep the Gateway private on the VM
116
+ milaidy config set gateway.bind loopback
117
+
118
+ # Require auth for the Gateway + Control UI
119
+ milaidy config set gateway.auth.mode token
120
+ milaidy doctor --generate-gateway-token
121
+
122
+ # Expose over Tailscale Serve (HTTPS + tailnet access)
123
+ milaidy config set gateway.tailscale.mode serve
124
+ milaidy config set gateway.trustedProxies '["127.0.0.1"]'
125
+
126
+ systemctl --user restart milaidy-gateway
127
+ ```
128
+
129
+ ## 7) Verify
130
+
131
+ ```bash
132
+ # Check version
133
+ milaidy --version
134
+
135
+ # Check daemon status
136
+ systemctl --user status milaidy-gateway
137
+
138
+ # Check Tailscale Serve
139
+ tailscale serve status
140
+
141
+ # Test local response
142
+ curl http://localhost:18789
143
+ ```
144
+
145
+ ## 8) Lock Down VCN Security
146
+
147
+ Now that everything is working, lock down the VCN to block all traffic except Tailscale. OCI's Virtual Cloud Network acts as a firewall at the network edge — traffic is blocked before it reaches your instance.
148
+
149
+ 1. Go to **Networking → Virtual Cloud Networks** in the OCI Console
150
+ 2. Click your VCN → **Security Lists** → Default Security List
151
+ 3. **Remove** all ingress rules except:
152
+ - `0.0.0.0/0 UDP 41641` (Tailscale)
153
+ 4. Keep default egress rules (allow all outbound)
154
+
155
+ This blocks SSH on port 22, HTTP, HTTPS, and everything else at the network edge. From now on, you can only connect via Tailscale.
156
+
157
+ ---
158
+
159
+ ## Access the Control UI
160
+
161
+ From any device on your Tailscale network:
162
+
163
+ ```
164
+ https://milaidy.<tailnet-name>.ts.net/
165
+ ```
166
+
167
+ Replace `<tailnet-name>` with your tailnet name (visible in `tailscale status`).
168
+
169
+ No SSH tunnel needed. Tailscale provides:
170
+
171
+ - HTTPS encryption (automatic certs)
172
+ - Authentication via Tailscale identity
173
+ - Access from any device on your tailnet (laptop, phone, etc.)
174
+
175
+ ---
176
+
177
+ ## Security: VCN + Tailscale (recommended baseline)
178
+
179
+ With the VCN locked down (only UDP 41641 open) and the Gateway bound to loopback, you get strong defense-in-depth: public traffic is blocked at the network edge, and admin access happens over your tailnet.
180
+
181
+ This setup often removes the _need_ for extra host-based firewall rules purely to stop Internet-wide SSH brute force — but you should still keep the OS updated, run `milaidy security audit`, and verify you aren’t accidentally listening on public interfaces.
182
+
183
+ ### What's Already Protected
184
+
185
+ | Traditional Step | Needed? | Why |
186
+ | ------------------ | ----------- | ---------------------------------------------------------------------------- |
187
+ | UFW firewall | No | VCN blocks before traffic reaches instance |
188
+ | fail2ban | No | No brute force if port 22 blocked at VCN |
189
+ | sshd hardening | No | Tailscale SSH doesn't use sshd |
190
+ | Disable root login | No | Tailscale uses Tailscale identity, not system users |
191
+ | SSH key-only auth | No | Tailscale authenticates via your tailnet |
192
+ | IPv6 hardening | Usually not | Depends on your VCN/subnet settings; verify what’s actually assigned/exposed |
193
+
194
+ ### Still Recommended
195
+
196
+ - **Credential permissions:** `chmod 700 ~/.milaidy`
197
+ - **Security audit:** `milaidy security audit`
198
+ - **System updates:** `sudo apt update && sudo apt upgrade` regularly
199
+ - **Monitor Tailscale:** Review devices in [Tailscale admin console](https://login.tailscale.com/admin)
200
+
201
+ ### Verify Security Posture
202
+
203
+ ```bash
204
+ # Confirm no public ports listening
205
+ sudo ss -tlnp | grep -v '127.0.0.1\|::1'
206
+
207
+ # Verify Tailscale SSH is active
208
+ tailscale status | grep -q 'offers: ssh' && echo "Tailscale SSH active"
209
+
210
+ # Optional: disable sshd entirely
211
+ sudo systemctl disable --now ssh
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Fallback: SSH Tunnel
217
+
218
+ If Tailscale Serve isn't working, use an SSH tunnel:
219
+
220
+ ```bash
221
+ # From your local machine (via Tailscale)
222
+ ssh -L 18789:127.0.0.1:18789 ubuntu@milaidy
223
+ ```
224
+
225
+ Then open `http://localhost:18789`.
226
+
227
+ ---
228
+
229
+ ## Troubleshooting
230
+
231
+ ### Instance creation fails ("Out of capacity")
232
+
233
+ Free tier ARM instances are popular. Try:
234
+
235
+ - Different availability domain
236
+ - Retry during off-peak hours (early morning)
237
+ - Use the "Always Free" filter when selecting shape
238
+
239
+ ### Tailscale won't connect
240
+
241
+ ```bash
242
+ # Check status
243
+ sudo tailscale status
244
+
245
+ # Re-authenticate
246
+ sudo tailscale up --ssh --hostname=milaidy --reset
247
+ ```
248
+
249
+ ### Gateway won't start
250
+
251
+ ```bash
252
+ milaidy gateway status
253
+ milaidy doctor --non-interactive
254
+ journalctl --user -u milaidy-gateway -n 50
255
+ ```
256
+
257
+ ### Can't reach Control UI
258
+
259
+ ```bash
260
+ # Verify Tailscale Serve is running
261
+ tailscale serve status
262
+
263
+ # Check gateway is listening
264
+ curl http://localhost:18789
265
+
266
+ # Restart if needed
267
+ systemctl --user restart milaidy-gateway
268
+ ```
269
+
270
+ ### ARM binary issues
271
+
272
+ Some tools may not have ARM builds. Check:
273
+
274
+ ```bash
275
+ uname -m # Should show aarch64
276
+ ```
277
+
278
+ Most npm packages work fine. For binaries, look for `linux-arm64` or `aarch64` releases.
279
+
280
+ ---
281
+
282
+ ## Persistence
283
+
284
+ All state lives in:
285
+
286
+ - `~/.milaidy/` — config, credentials, session data
287
+ - `~/.milaidy/workspace/` — workspace (AGENTS.md, memory, artifacts)
288
+
289
+ Back up periodically:
290
+
291
+ ```bash
292
+ tar -czvf milaidy-backup.tar.gz ~/.milaidy ~/.milaidy/workspace
293
+ ```
294
+
295
+ ---
296
+
297
+ ## See Also
298
+
299
+ - [Gateway remote access](/gateway/remote) — other remote access patterns
300
+ - [Tailscale integration](/gateway/tailscale) — full Tailscale docs
301
+ - [Gateway configuration](/gateway/configuration) — all config options
302
+ - [DigitalOcean guide](/platforms/digitalocean) — if you want paid + easier signup
303
+ - [Hetzner guide](/platforms/hetzner) — Docker-based alternative
@@ -0,0 +1,358 @@
1
+ ---
2
+ summary: "Milaidy on Raspberry Pi (budget self-hosted setup)"
3
+ read_when:
4
+ - Setting up Milaidy on a Raspberry Pi
5
+ - Running Milaidy on ARM devices
6
+ - Building a cheap always-on personal AI
7
+ title: "Raspberry Pi"
8
+ ---
9
+
10
+ # Milaidy on Raspberry Pi
11
+
12
+ ## Goal
13
+
14
+ Run a persistent, always-on Milaidy Gateway on a Raspberry Pi for **~$35-80** one-time cost (no monthly fees).
15
+
16
+ Perfect for:
17
+
18
+ - 24/7 personal AI assistant
19
+ - Home automation hub
20
+ - Low-power, always-available Telegram/WhatsApp bot
21
+
22
+ ## Hardware Requirements
23
+
24
+ | Pi Model | RAM | Works? | Notes |
25
+ | --------------- | ------- | -------- | ---------------------------------- |
26
+ | **Pi 5** | 4GB/8GB | ✅ Best | Fastest, recommended |
27
+ | **Pi 4** | 4GB | ✅ Good | Sweet spot for most users |
28
+ | **Pi 4** | 2GB | ✅ OK | Works, add swap |
29
+ | **Pi 4** | 1GB | ⚠️ Tight | Possible with swap, minimal config |
30
+ | **Pi 3B+** | 1GB | ⚠️ Slow | Works but sluggish |
31
+ | **Pi Zero 2 W** | 512MB | ❌ | Not recommended |
32
+
33
+ **Minimum specs:** 1GB RAM, 1 core, 500MB disk
34
+ **Recommended:** 2GB+ RAM, 64-bit OS, 16GB+ SD card (or USB SSD)
35
+
36
+ ## What You'll Need
37
+
38
+ - Raspberry Pi 4 or 5 (2GB+ recommended)
39
+ - MicroSD card (16GB+) or USB SSD (better performance)
40
+ - Power supply (official Pi PSU recommended)
41
+ - Network connection (Ethernet or WiFi)
42
+ - ~30 minutes
43
+
44
+ ## 1) Flash the OS
45
+
46
+ Use **Raspberry Pi OS Lite (64-bit)** — no desktop needed for a headless server.
47
+
48
+ 1. Download [Raspberry Pi Imager](https://www.raspberrypi.com/software/)
49
+ 2. Choose OS: **Raspberry Pi OS Lite (64-bit)**
50
+ 3. Click the gear icon (⚙️) to pre-configure:
51
+ - Set hostname: `gateway-host`
52
+ - Enable SSH
53
+ - Set username/password
54
+ - Configure WiFi (if not using Ethernet)
55
+ 4. Flash to your SD card / USB drive
56
+ 5. Insert and boot the Pi
57
+
58
+ ## 2) Connect via SSH
59
+
60
+ ```bash
61
+ ssh user@gateway-host
62
+ # or use the IP address
63
+ ssh user@192.168.x.x
64
+ ```
65
+
66
+ ## 3) System Setup
67
+
68
+ ```bash
69
+ # Update system
70
+ sudo apt update && sudo apt upgrade -y
71
+
72
+ # Install essential packages
73
+ sudo apt install -y git curl build-essential
74
+
75
+ # Set timezone (important for cron/reminders)
76
+ sudo timedatectl set-timezone America/Chicago # Change to your timezone
77
+ ```
78
+
79
+ ## 4) Install Node.js 22 (ARM64)
80
+
81
+ ```bash
82
+ # Install Node.js via NodeSource
83
+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
84
+ sudo apt install -y nodejs
85
+
86
+ # Verify
87
+ node --version # Should show v22.x.x
88
+ npm --version
89
+ ```
90
+
91
+ ## 5) Add Swap (Important for 2GB or less)
92
+
93
+ Swap prevents out-of-memory crashes:
94
+
95
+ ```bash
96
+ # Create 2GB swap file
97
+ sudo fallocate -l 2G /swapfile
98
+ sudo chmod 600 /swapfile
99
+ sudo mkswap /swapfile
100
+ sudo swapon /swapfile
101
+
102
+ # Make permanent
103
+ echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
104
+
105
+ # Optimize for low RAM (reduce swappiness)
106
+ echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
107
+ sudo sysctl -p
108
+ ```
109
+
110
+ ## 6) Install Milaidy
111
+
112
+ ### Option A: Standard Install (Recommended)
113
+
114
+ ```bash
115
+ curl -fsSL https://milaidy.ai/install.sh | bash
116
+ ```
117
+
118
+ ### Option B: Hackable Install (For tinkering)
119
+
120
+ ```bash
121
+ git clone https://github.com/milaidy/milaidy.git
122
+ cd milaidy
123
+ npm install
124
+ npm run build
125
+ npm link
126
+ ```
127
+
128
+ The hackable install gives you direct access to logs and code — useful for debugging ARM-specific issues.
129
+
130
+ ## 7) Run Onboarding
131
+
132
+ ```bash
133
+ milaidy onboard --install-daemon
134
+ ```
135
+
136
+ Follow the wizard:
137
+
138
+ 1. **Gateway mode:** Local
139
+ 2. **Auth:** API keys recommended (OAuth can be finicky on headless Pi)
140
+ 3. **Channels:** Telegram is easiest to start with
141
+ 4. **Daemon:** Yes (systemd)
142
+
143
+ ## 8) Verify Installation
144
+
145
+ ```bash
146
+ # Check status
147
+ milaidy status
148
+
149
+ # Check service
150
+ sudo systemctl status milaidy
151
+
152
+ # View logs
153
+ journalctl -u milaidy -f
154
+ ```
155
+
156
+ ## 9) Access the Dashboard
157
+
158
+ Since the Pi is headless, use an SSH tunnel:
159
+
160
+ ```bash
161
+ # From your laptop/desktop
162
+ ssh -L 18789:localhost:18789 user@gateway-host
163
+
164
+ # Then open in browser
165
+ open http://localhost:18789
166
+ ```
167
+
168
+ Or use Tailscale for always-on access:
169
+
170
+ ```bash
171
+ # On the Pi
172
+ curl -fsSL https://tailscale.com/install.sh | sh
173
+ sudo tailscale up
174
+
175
+ # Update config
176
+ milaidy config set gateway.bind tailnet
177
+ sudo systemctl restart milaidy
178
+ ```
179
+
180
+ ---
181
+
182
+ ## Performance Optimizations
183
+
184
+ ### Use a USB SSD (Huge Improvement)
185
+
186
+ SD cards are slow and wear out. A USB SSD dramatically improves performance:
187
+
188
+ ```bash
189
+ # Check if booting from USB
190
+ lsblk
191
+ ```
192
+
193
+ See [Pi USB boot guide](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#usb-mass-storage-boot) for setup.
194
+
195
+ ### Reduce Memory Usage
196
+
197
+ ```bash
198
+ # Disable GPU memory allocation (headless)
199
+ echo 'gpu_mem=16' | sudo tee -a /boot/config.txt
200
+
201
+ # Disable Bluetooth if not needed
202
+ sudo systemctl disable bluetooth
203
+ ```
204
+
205
+ ### Monitor Resources
206
+
207
+ ```bash
208
+ # Check memory
209
+ free -h
210
+
211
+ # Check CPU temperature
212
+ vcgencmd measure_temp
213
+
214
+ # Live monitoring
215
+ htop
216
+ ```
217
+
218
+ ---
219
+
220
+ ## ARM-Specific Notes
221
+
222
+ ### Binary Compatibility
223
+
224
+ Most Milaidy features work on ARM64, but some external binaries may need ARM builds:
225
+
226
+ | Tool | ARM64 Status | Notes |
227
+ | ------------------ | ------------ | ----------------------------------- |
228
+ | Node.js | ✅ | Works great |
229
+ | WhatsApp (Baileys) | ✅ | Pure JS, no issues |
230
+ | Telegram | ✅ | Pure JS, no issues |
231
+ | gog (Gmail CLI) | ⚠️ | Check for ARM release |
232
+ | Chromium (browser) | ✅ | `sudo apt install chromium-browser` |
233
+
234
+ If a skill fails, check if its binary has an ARM build. Many Go/Rust tools do; some don't.
235
+
236
+ ### 32-bit vs 64-bit
237
+
238
+ **Always use 64-bit OS.** Node.js and many modern tools require it. Check with:
239
+
240
+ ```bash
241
+ uname -m
242
+ # Should show: aarch64 (64-bit) not armv7l (32-bit)
243
+ ```
244
+
245
+ ---
246
+
247
+ ## Recommended Model Setup
248
+
249
+ Since the Pi is just the Gateway (models run in the cloud), use API-based models:
250
+
251
+ ```json
252
+ {
253
+ "agents": {
254
+ "defaults": {
255
+ "model": {
256
+ "primary": "anthropic/claude-sonnet-4-20250514",
257
+ "fallbacks": ["openai/gpt-5-mini"]
258
+ }
259
+ }
260
+ }
261
+ }
262
+ ```
263
+
264
+ **Don't try to run local LLMs on a Pi** — even small models are too slow. Let Claude/GPT do the heavy lifting.
265
+
266
+ ---
267
+
268
+ ## Auto-Start on Boot
269
+
270
+ The onboarding wizard sets this up, but to verify:
271
+
272
+ ```bash
273
+ # Check service is enabled
274
+ sudo systemctl is-enabled milaidy
275
+
276
+ # Enable if not
277
+ sudo systemctl enable milaidy
278
+
279
+ # Start on boot
280
+ sudo systemctl start milaidy
281
+ ```
282
+
283
+ ---
284
+
285
+ ## Troubleshooting
286
+
287
+ ### Out of Memory (OOM)
288
+
289
+ ```bash
290
+ # Check memory
291
+ free -h
292
+
293
+ # Add more swap (see Step 5)
294
+ # Or reduce services running on the Pi
295
+ ```
296
+
297
+ ### Slow Performance
298
+
299
+ - Use USB SSD instead of SD card
300
+ - Disable unused services: `sudo systemctl disable cups bluetooth avahi-daemon`
301
+ - Check CPU throttling: `vcgencmd get_throttled` (should return `0x0`)
302
+
303
+ ### Service Won't Start
304
+
305
+ ```bash
306
+ # Check logs
307
+ journalctl -u milaidy --no-pager -n 100
308
+
309
+ # Common fix: rebuild
310
+ cd ~/milaidy # if using hackable install
311
+ npm run build
312
+ sudo systemctl restart milaidy
313
+ ```
314
+
315
+ ### ARM Binary Issues
316
+
317
+ If a skill fails with "exec format error":
318
+
319
+ 1. Check if the binary has an ARM64 build
320
+ 2. Try building from source
321
+ 3. Or use a Docker container with ARM support
322
+
323
+ ### WiFi Drops
324
+
325
+ For headless Pis on WiFi:
326
+
327
+ ```bash
328
+ # Disable WiFi power management
329
+ sudo iwconfig wlan0 power off
330
+
331
+ # Make permanent
332
+ echo 'wireless-power off' | sudo tee -a /etc/network/interfaces
333
+ ```
334
+
335
+ ---
336
+
337
+ ## Cost Comparison
338
+
339
+ | Setup | One-Time Cost | Monthly Cost | Notes |
340
+ | -------------- | ------------- | ------------ | ------------------------- |
341
+ | **Pi 4 (2GB)** | ~$45 | $0 | + power (~$5/yr) |
342
+ | **Pi 4 (4GB)** | ~$55 | $0 | Recommended |
343
+ | **Pi 5 (4GB)** | ~$60 | $0 | Best performance |
344
+ | **Pi 5 (8GB)** | ~$80 | $0 | Overkill but future-proof |
345
+ | DigitalOcean | $0 | $6/mo | $72/year |
346
+ | Hetzner | $0 | €3.79/mo | ~$50/year |
347
+
348
+ **Break-even:** A Pi pays for itself in ~6-12 months vs cloud VPS.
349
+
350
+ ---
351
+
352
+ ## See Also
353
+
354
+ - [Linux guide](/platforms/linux) — general Linux setup
355
+ - [DigitalOcean guide](/platforms/digitalocean) — cloud alternative
356
+ - [Hetzner guide](/platforms/hetzner) — Docker setup
357
+ - [Tailscale](/gateway/tailscale) — remote access
358
+ - [Nodes](/nodes) — pair your laptop/phone with the Pi gateway