From clean Ubuntu to your first AI reply

This is the cloud-server route. For an owned computer, use the complete local/LAN guide ↗. Both routes use the same small package, with different addresses and ports.
Success means the phone is paired, its model test is saved, and chat receives a real reply. Skills membership, extra workspaces and voice alerts are optional later steps. The package installs pinned OpenClaw automatically; no GPU or model-weight download is required.
Run all commands in the target Ubuntu terminal, not phone chat or Windows PowerShell. Copy one code block at a time, press Enter and wait for the prompt. Do not copy explanatory text. If sudo requests a password, use the Ubuntu login user's password; no visible characters while typing is normal.
1. Check the server
Use Ubuntu 24.04 LTS x86_64, at least 4GB RAM (8GB recommended for several users) and a 40GB or larger system disk with at least 8GB currently free. Start with a clean host without an existing OpenClaw or MochiBot deployment. Do not initialize a server that is already in use.
The host needs access to Ubuntu repositories, nodejs.org, npm and your chosen model API. The phone must reach the host. The setup download is small, but installation downloads Node.js, OpenClaw and dependencies. Choose a region reachable from both the phone and the chosen API.
Open the instance terminal in your cloud console:
cat /etc/os-release
uname -m
Expect ID=ubuntu, VERSION_ID="24.04", and x86_64. Ubuntu 26.04 and ARM/aarch64 are outside this package's supported host selection. A working browser terminal is enough; a separate SSH client is not required.
2. Allow the phone entry
In the instance firewall/security group, add an inbound allow rule: TCP, port 443, source `0.0.0.0/0`. On Tencent Lighthouse: instance → Firewall → Add rule. Save and confirm TCP 443 appears in the rule list. Keep SSH access; do not expose internal ports 18890 or 19000.
This is a cloud-console step. The guest installer cannot change the provider's firewall for you.
3. Prepare download tools
Run each command separately:
sudo apt-get -o Acquire::Retries=3 -o DPkg::Lock::Timeout=180 -o APT::Update::Error-Mode=any update
This refreshes package indexes. Continue only after it returns without an E: error:
sudo apt-get -o Acquire::Retries=3 -o DPkg::Lock::Timeout=180 install -y ca-certificates curl python3
This installs HTTPS download tools and Python. If apt waits for a lock, a system update may still be running; wait rather than deleting lock files. Resolve errors before proceeding.
4. Download and verify
Create a folder and enter it:
mkdir -p ~/mochibot-setup
cd ~/mochibot-setup
pwd
The final path should end with /mochibot-setup. Download setup:
curl --fail --location --retry 3 --connect-timeout 20 --proto '=https' --tlsv1.2 'https://mochilab.bz/MochiBot/Installer.ashx?version=0.2.7' -o MochiBot-Ubuntu24-x64-online-0.2.7.run
Download its checksum:
curl --fail --location --retry 3 --connect-timeout 20 --proto '=https' --tlsv1.2 'https://mochilab.bz/MochiBot/Installer.ashx?version=0.2.7&checksum=1' -o MochiBot-Ubuntu24-x64-online-0.2.7.run.sha256
Verify:
sha256sum --check MochiBot-Ubuntu24-x64-online-0.2.7.run.sha256
Expect `MochiBot-Ubuntu24-x64-online-0.2.7.run: OK`. Stop on a failed download or checksum. Redownload and recheck; do not run an incomplete file.
5. Set the public IP, check and install
Copy this instance's public IPv4 from the cloud console. Replace the entire YOUR_PUBLIC_IPV4 placeholder below; keep the quotes. Do not use a private 10.x or 172.16.x address in cloud mode.
SERVER_IP='YOUR_PUBLIC_IPV4'
Check the value:
printf '%s\n' "$SERVER_IP"
It must match the console's public IPv4 exactly. Run local preflight:
sudo bash MochiBot-Ubuntu24-x64-online-0.2.7.run --check --mode cloud --address "$SERVER_IP"
After it reports success ("检查通过"), install:
sudo bash MochiBot-Ubuntu24-x64-online-0.2.7.run --mode cloud --address "$SERVER_IP"
Progress runs from [1/6] to [6/6]: dependencies, pinned Node.js and OpenClaw, a separate workspace, HTTPS and services, then local health. The Skills assistant is included. Setup does not download model weights or ask for a model API key in the terminal.
Initial dependency installation may take time. Wait for completion or a clear error; do not start a second installer. A pairing QR appears when setup finishes.
Local preflight does not test the cloud firewall or the phone's network. Local health checks do not replace the phone pairing and model tests below.
6. Install the App and pair
Install the current APK from the MochiBot download page ↗, version 1.0.4 or newer. Allow installation only for the browser/file manager used, if asked. No USB debugging or MochiBot registration is needed. Open Settings → Scan to connect, allow camera access, scan the terminal QR, check the server and assistant, then confirm pairing.
HTTPS is configured by setup. The App pins the server's public key during pairing; no separate domain or purchased certificate is required, and certificate checks remain enabled.
QR codes expire after five minutes. If installing the App took longer, generate a new code:
sudo mochibotctl pair
Scan the new code. Do not reinstall the server. Each extra person needs their own workspace code, not the first user's code.

7. Configure your cloud model
Open Settings → Models → Add a cloud model:
- Choose DeepSeek, Qwen, OpenAI, or a compatible API.
- Enter a recognizable profile name, the provider's HTTPS API endpoint and your own key. Qwen keys and endpoints must use the same region. The API endpoint is not a website login URL.
- Tap Read available models and choose a chat model; if listing is unavailable, enter the exact ID from the provider console. Image, audio and embedding models are not chat models.
- Context and output limits are prefilled but must fit the selected model; reduce them if the provider requires it.
- Tap Test and save, and wait for success before returning to chat. Testing makes a small billable API request.
For a key, follow the DeepSeek account, credit and API-key guide ↗. Provider API charges apply. Enter keys in dedicated fields, never in chat.
8. Receive the first real reply
Send: "Hello, please introduce yourself in one sentence."
A normal reply completes first-time setup. You can now chat and send files without the optional steps below.
Optional later steps
- Skills account: Settings → MochiLab Skills account → Connect/manage account. Sign in on the website, obtain an
mls_ access key, enter it in the dedicated App field and verify. The assistant is already installed; account authorization permits entitled downloads. Each workspace connects separately; authorized users may connect the same membership account. - More people: Create a separate workspace and pairing code ↗. Chats, files and model settings remain separate; everyone uses the same App interface.
- Voice alerts: Plans, confirmation, task results and cancellation ↗. Enable reception on the Reminders tab, allow notifications and background operation, and keep both devices online.
- Your own hardware: Follow the complete LAN deployment guide ↗ rather than copying cloud-mode addresses and ports.
Troubleshooting: resume rather than reinstall
Interrupted download or setup
Return to the same folder. Set the address again after a new login:
cd ~/mochibot-setup
SERVER_IP='YOUR_PUBLIC_IPV4'
If initialization started but did not finish, resolve the reported network/error condition and resume the same package version:
sudo bash MochiBot-Ubuntu24-x64-online-0.2.7.run --resume --mode cloud --address "$SERVER_IP"
Completed stages and verified download caches are retained. Do not delete workspaces, switch package versions to resume, disable firewalls, or delete apt/dpkg locks. Wait for any existing installation to exit first. A completed setup does not need the resume flow.
For failed Ubuntu repositories, fix the network then repeat step 3. Only if apt explicitly reports dpkg was interrupted, wait for other system updates to finish, run sudo dpkg --configure -a, repeat step 3 and resume. Never delete locks or kill a running package manager.
If [3/6] OpenClaw repeatedly fails reaching the official npm registry, append --registry https://registry.npmmirror.com to the same-version resume command. This changes only npm dependency downloads; pinned file integrity remains checked. Node.js downloads and model API reachability are separate requirements.
Setup completed, but pairing times out
Check the cloud-console TCP 443 rule, public IPv4 and phone network first. For an expired QR, run sudo mochibotctl pair. Do not reinstall for a pairing timeout.
Check server services:
sudo mochibotctl doctor
Expect connector, tlsEntry, apiHealthy to be true, and installerState to be complete. `modelConfigured: false` is normal before entering a model; it should become true after saving the App's model configuration.
For recent service errors:
sudo journalctl -u mochibot.service -u mochibot-entry.service -n 60 --no-pager
Redact private addresses and credentials before sharing logs. A failed model test calls for checking endpoint, region, key, balance and model ID, not reinstalling Ubuntu.
Optional: update an existing standard deployment
For a completed standard deployment only, wait for all workspace tasks to finish. Repeat the step 4 download and verification commands. Only after the versioned file reports OK, run:
sudo bash MochiBot-Ubuntu24-x64-online-0.2.7.run --update
Expect “服务器更新完成” and a healthy-service count. This updates recognized service code while retaining keys, Skills connections, pairing and workspaces. It does not rerun initialization or replace installed Node.js/OpenClaw. Unknown local modifications or unfinished jobs stop the update; resolve the reported condition rather than invoking fresh setup. Interrupted setup must resume its original package version; --update is not a substitute.
Verification scope
Existing-host updates, separate multi-user chat and phone connections were tested. No blank test host is currently available: a complete first-to-last installation of this version on clean Ubuntu remains pending, as does a full run on an independent owned LAN computer. Expected results and troubleshooting are provided; success on every network/hardware combination is not guaranteed.