Headless binary + CI/CD: build and validate a no-UI OpenHuman build for Linux (Raspberry Pi / server) with automated GitHub Actions verification
Summary
Build and validate a headless (no desktop / no GUI) binary of OpenHuman that runs on Linux without a display — targeting low-power devices like Raspberry Pi as well as headless servers. Validate its basic functionality end-to-end. Set up automated CI/CD via GitHub Actions so that Linux headless compatibility is verified on every build automatically, rather than requiring manual testing in VirtualBox.
Problem
OpenHuman currently requires a desktop environment (Tauri + WebView). Users who want to run it on a Raspberry Pi, a headless VPS, or a server without a display cannot do so. A headless binary would open OpenHuman to a large class of always-on, low-power, and server use cases.
Without automated CI, Linux compatibility can only be caught by manually spinning up a VirtualBox VM — which is slow, inconsistent, and doesn't run on every PR.
Solution
Strip the Tauri/WebView layer and compile a headless CLI/daemon binary from the existing Rust core that exposes the same agent functionality (inference, memory, tool use, orchestration) without any UI. The binary should be configurable via config file or environment variables and expose its interface over a local socket, HTTP, or stdio.
Pair this with a GitHub Actions workflow that builds and smoke-tests the headless binary on Linux automatically on every push.
Tasks
1. Architecture decision
- [ ] Decide on interface for the headless binary: local HTTP server / stdio / Unix socket / all three
- [ ] Determine which Tauri-specific code paths need to be stubbed or removed for a no-UI build
- [ ] Decide feature scope for v1 headless: inference + memory only, or full tool/channel surface
2. Build
- [ ] Create a
headlessbinary target in the Cargo workspace that shares theopenhumancore crate but omits Tauri/WebView dependencies - [ ] Compile successfully for
aarch64-unknown-linux-gnu(Raspberry Pi 4/5) andx86_64-unknown-linux-gnu - [ ] Binary runs without
DISPLAYenvironment variable set - [ ] Config loaded from
~/.openhuman/config.toml(same schema as desktop)
3. GitHub Actions CI/CD (new)
Replace manual VirtualBox testing with an automated pipeline:
- [ ] Add a GitHub Actions workflow (
.github/workflows/headless-linux.yml) that triggers on push tomainand on PRs touching the Rust core or headless binary - [ ] Use an Arch Linux runner (via
archlinuxcontainer image or a self-hosted Arch runner) to catch Linux-specific dependency and compatibility issues early - [ ] Also run on
ubuntu-latestfor broad coverage - [ ] Workflow steps:
- Install Rust toolchain + cross-compilation targets (
aarch64-unknown-linux-gnu,x86_64-unknown-linux-gnu) - Build the headless binary in release mode
- Run smoke tests: launch binary, send a test prompt, verify a response is returned, verify graceful SIGTERM shutdown
- Fail the build if the binary does not compile or smoke tests fail
- Install Rust toolchain + cross-compilation targets (
- [ ] ARM64 cross-compile verified in CI (actual Pi validation stays manual for now, but the build is confirmed in CI)
- [ ] CI badge added to README
4. Raspberry Pi validation
- [ ] Install and run the headless binary on a Raspberry Pi (Pi 4 or Pi 5, 4 GB RAM minimum)
- [ ] Verify inference works (chat, reasoning) via the headless interface
- [ ] Verify memory sync and retrieval works
- [ ] Verify the binary starts reliably on boot (systemd service or equivalent)
- [ ] Log resource usage: CPU, RAM, and response latency under light load
5. Basic functionality checklist
- [ ] Agent responds to prompts
- [ ] Memory reads and writes work
- [ ] Config (API keys, provider, model) is respected
- [ ] Graceful shutdown on SIGTERM
- [ ] Logs written to file (not dependent on a terminal)
6. Documentation
- [ ] README section: "Running OpenHuman headless on Linux / Raspberry Pi"
- [ ] Systemd unit file example included
- [ ] CI badge + link to workflow in README
Acceptance criteria
- [ ] Headless binary compiles for ARM64 and x86-64 Linux
- [ ] GitHub Actions workflow runs on every PR and passes on both Arch Linux and Ubuntu runners
- [ ] Smoke test (launch → prompt → response → shutdown) passes in CI without manual intervention
- [ ] Runs on a Raspberry Pi without a display and without errors
- [ ] All 5 basic functionality items above pass
- [ ] Resource usage on Raspberry Pi 4 is documented
- [ ] Setup documented well enough that a non-dev user can follow it
Related
- Linux VM QA setup: #4843
- spaCy / Python runtime (may need headless-specific handling): #4688
- Backend orchestration (headless may rely on managed backend more than desktop): #4729
- tinyagents crate (shared Rust inference layer): tinyhumansai/tinyagents
Headless core — deployment verified end-to-end, moving to Testing
The headless openhuman-core path is working end-to-end and has been validated on a real Linux server (x86_64 Ubuntu 24.04). One paste-block installs the prebuilt release binary and runs it as a memory-capped systemd service — no build, no Docker, no CI. Moving this to Testing so others can reproduce.
✅ Progress
- Headless core runs on a remote Linux server from the prebuilt release binary — no build, no Docker, no CI. Download → systemd service → live in minutes.
- Desktop app connects as a thin client ("Cloud/remote" core mode) over an SSH tunnel.
- Runs 24/7, independent of the desktop app — survives the app closing, the laptop sleeping, and network drops.
- Channel autonomy proven end-to-end — a Telegram bot message reaches the core via the backend's outbound socket and is processed server-side, even with the app closed.
- Safe co-hosting on a shared box — a memory-capped systemd unit (
MemoryMax) lets the core sit next to an existing backend (e.g. staging) without risking it; verified it stayed within budget and left the neighbour untouched. - Version parity understood — same release version on core + app = no "update required" gate. Mismatch only happens with dev builds.
⚠️ Limitations / things to know
- All state lives on the server. Config, memory, threads, and credentials persist in the server's workspace — not on the client. Backups/migration are a server-side concern.
- Re-login required when switching modes. The session JWT is tied to the active core/backend. Switching between hosted-core and local-binary mode means logging in again.
- The
CORE_TOKENmust be managed. Generated per deploy and stored on the server (/etc/openhuman/core.env) — save it (or re-read it from the box) to connect the app. - SSH tunnel is per-session. It's your pipe to the UI; re-open it after drops/reboots (the core keeps running regardless). The bot/channel path doesn't need the tunnel — that runs autonomously.
- No local models on small servers. A local LLM needs multiple GB RAM; capped/small boxes must use cloud or BYOK inference.
- Inference needs a backend login.
/health+core.pingwork immediately, but chat/inference needs an authenticated session withBACKEND_URL(defaulthttps://api.tinyhumans.ai) — normally created by logging in through the desktop app. Headless login provisioning is still to be wired up. (BYOK Claude Code inference runs fully offline as an alternative.)
Deploy (for anyone who already has SSH to their server)
1. SSH into your server (replace with your host):
ssh <user>@<your-server-ip>
2. Install + run the core — paste on the server (x86_64; swap aarch64 in the filename for ARM):
set -e
VER=0.61.2; base="https://github.com/tinyhumansai/openhuman/releases/download/v$VER"
tb="openhuman-core-$VER-x86_64-unknown-linux-gnu.tar.gz"
cd /tmp && curl -fLO "$base/$tb" && curl -fLO "$base/$tb.sha256"
echo "$(cat "$tb.sha256") $tb" | sha256sum -c -
tar xzf "$tb" && sudo install -m 0755 openhuman-core /usr/local/bin/openhuman-core
sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends \
ca-certificates libssl3 libasound2t64 libxdo3 libxtst6 libx11-6 libevdev2 >/dev/null
id openhuman >/dev/null 2>&1 || sudo useradd --system --create-home \
--home-dir /var/lib/openhuman --shell /usr/sbin/nologin openhuman
sudo install -d -o openhuman -g openhuman /etc/openhuman /var/lib/openhuman
TOKEN=$(openssl rand -hex 32)
sudo tee /etc/openhuman/core.env >/dev/null <<EOF
OPENHUMAN_CORE_HOST=127.0.0.1
OPENHUMAN_CORE_PORT=7788
OPENHUMAN_CORE_TOKEN=$TOKEN
OPENHUMAN_WORKSPACE=/var/lib/openhuman/.openhuman
RUST_LOG=info
EOF
sudo chown openhuman:openhuman /etc/openhuman/core.env && sudo chmod 600 /etc/openhuman/core.env
sudo tee /etc/systemd/system/openhuman-core.service >/dev/null <<'EOF'
[Unit]
Description=OpenHuman headless core (JSON-RPC)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=openhuman
Group=openhuman
EnvironmentFile=/etc/openhuman/core.env
Environment=HOME=/var/lib/openhuman
ExecStart=/usr/local/bin/openhuman-core run
Restart=on-failure
RestartSec=3
KillSignal=SIGTERM
TimeoutStopSec=30
MemoryHigh=700M
MemoryMax=900M
CPUWeight=50
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/openhuman
PrivateTmp=true
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload && sudo systemctl enable --now openhuman-core
sleep 4
echo "=== service: $(systemctl is-active openhuman-core) ==="
echo "=== health: $(curl -fsS http://127.0.0.1:7788/health | head -c 90) ==="
echo "=== ping: $(curl -s -X POST http://127.0.0.1:7788/rpc -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"core.ping","params":{}}') ==="
echo "=== TOKEN (SAVE THIS): $TOKEN ==="
The MemoryMax/CPUWeight caps let the core co-exist with an existing service on the box without starving it. Expected output: service: active, health with "healthy":true, and ping returning {"ok":true}. Save the printed TOKEN — you need it to connect the app.
3. Connect the desktop app — keep the core private (loopback) and reach it over an SSH tunnel from your machine:
# on your machine — leave this running:
ssh -N -L 7788:127.0.0.1:7788 <user>@<your-server-ip>
Then in the app: Settings → Core connection → Cloud/remote → URL http://127.0.0.1:7788, Token = the TOKEN from step 2. Keep the app and the core on the same release version to avoid the update gate. Channel replies (Telegram/Discord) run 24/7 over the core's outbound socket regardless of whether the tunnel is open — the tunnel is only for opening the app UI.
Upgrade later: re-run step 2 with a newer VER. sudo install overwrites the single binary in place (no buildup, nothing to remove); the workspace and managed caches persist.
Triage: needs opinion — “Headless binary + CI/CD: build and validate a no-UI OpenHuman build for Linux (Raspberry Pi / server) with automated GitHub Actions verification” needs a maintainer decision on product scope/priority or fresh reproduction evidence before its status can be settled. Please advise whether to pursue, narrow, or close it.
Thanks for this. Most of it is done: every release now ships a headless openhuman-core binary for Linux x86_64 and aarch64 (build-cli-linux in release-production.yml), and it has been run as a systemd service on a plain Ubuntu server.
One piece is still missing: nothing in CI starts the release binary and checks it. The release job builds and uploads the tarballs without running them, and the old --version smoke steps are disabled. So the remaining work is a small CI step that unpacks each tarball, starts openhuman-core, and checks /health (plus a run on arm64). We suggest narrowing this issue to that.