iOS Setup

v1.0.2

Sets up the OpenClaw iOS app by deploying the stats server, configuring access via domain/nginx, Tailscale, LAN, or manual setup, and provides connection det...

0· 102·0 current·0 all-time
byParham Majdabadi@parham-dev

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for parham-dev/skill-ios-setup.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "iOS Setup" (parham-dev/skill-ios-setup) from ClawHub.
Skill page: https://clawhub.ai/parham-dev/skill-ios-setup
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install skill-ios-setup

ClawHub CLI

Package manager switcher

npx clawhub@latest install skill-ios-setup
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill claims to deploy/configure the OpenClaw stats server and expose connection details; the included scripts detect the install type, locate the workspace, read the OpenClaw gateway token, start the stats_server.py, and produce connectivity guidance (nginx, Tailscale, LAN). All requested operations and commands are coherent with that purpose.
Instruction Scope
Instructions and scripts read local OpenClaw configuration (CLI and ~/.openclaw/openclaw.json), inspect the workspace to find stats_server.py, call system tools (pgrep, nginx, tailscale), and make an outbound request to api.ipify.org to determine public IP. These actions are relevant to determining connectivity and supplying the app token, but they do access a credential (gateway token) and run local scripts — the user should review any workspace scripts (e.g. ensure_stats_server.sh) before allowing execution.
Install Mechanism
This is an instruction-only skill with no install spec; it does not download or write new packages itself. The deploy script's docstring mentions installing Python deps, but the provided code doesn't perform arbitrary remote downloads. Overall, no high-risk installer behavior detected.
Credentials
The skill does not declare required env vars but does read the OpenClaw gateway token (via CLI or ~/.openclaw/openclaw.json). Accessing that token is proportionate to the task (the iOS app needs it), but it is a sensitive credential — users should be aware the skill reads it from local config files.
Persistence & Privilege
The skill does not request always:true and will not force itself into agent runs. It may instruct the user to add a @reboot crontab line or set Docker restart: unless-stopped; those are user-driven steps. It will execute an existing ensure_stats_server.sh if present in the workspace — this is expected but users should inspect that script since it will be run.
Assessment
This skill appears to do what it says: find your OpenClaw workspace, read the gateway token from your local config, start the stats server, and produce connection details for the iOS app. Before running it: (1) inspect workspace scripts it might run (notably scripts/dashboard/ensure_stats_server.sh and scripts/dashboard/stats_server.py) to ensure they are what you expect, (2) be aware it will read ~/.openclaw/openclaw.json or call openclaw config to obtain the gateway token (necessary for the app), (3) expect it to call system tools (tailscale, nginx) and to make a small outbound request to api.ipify.org to detect your public IP, and (4) follow prompts before applying crontab or docker-compose changes — the skill suggests edits but should not change system config without your explicit action.

Like a lobster shell, security has layers — review code before you run it.

dashboardvk97b9s6x0xz6gd0etb2npbnvth83xj9piosvk97b9s6x0xz6gd0etb2npbnvth83xj9platestvk97b9s6x0xz6gd0etb2npbnvth83xj9psetupvk97b9s6x0xz6gd0etb2npbnvth83xj9pstats-servervk97b9s6x0xz6gd0etb2npbnvth83xj9p
102downloads
0stars
3versions
Updated 4w ago
v1.0.2
MIT-0

skill-ios-setup

Set up the OpenClaw iOS app on any OpenClaw installation. Deploys the stats server, configures access, and outputs connection details for the user.

When to use

  • User says "set me up for the iOS app", "I want to use the iOS app", "help me connect the app"
  • After a fresh OpenClaw install
  • Stats server is down or iOS can't connect

What this skill does NOT do

  • Blog pipeline setup
  • Outreach pipeline setup
  • Any business-specific crons or pipelines
  • Those are optional — the app works without them

Step 1 — Detect environment

Find this skill's own directory first:

openclaw skills list --json 2>/dev/null | python3 -c "
import json,sys
skills = json.load(sys.stdin)
for s in skills:
    if s.get('id','').startswith('skill-ios-setup'):
        print(s.get('path',''))
        break
"

Then run the environment check script from that path:

python3 <skill-dir>/scripts/detect_env.py

This outputs JSON with:

  • install_type: docker | direct
  • workspace: path to agent workspace (e.g. ~/.openclaw/workspace/main)
  • gateway_token: from openclaw config
  • gateway_port: default 18789
  • stats_running: bool
  • stats_port: 8765
  • public_ip: detected public IP if any
  • tailscale_ip: Tailscale IP if tailscale is installed
  • nginx_available: bool
  • os: linux | macos | other

The workspace field is the source of truth for all subsequent paths — never hardcode orchestrator or any agent name.


Step 2 — Deploy stats server

Check stats_running. If false, deploy it:

python3 <skill-dir>/scripts/deploy_stats.py

This will:

  1. Locate stats_server.py under the workspace path from Step 1
  2. Install Python deps (requests, etc.) if missing
  3. Start the stats server

If stats server is already running, skip this step.

Auto-restart on reboot

After starting, set up auto-restart appropriate to the install type:

Docker install — tell the user to add restart: unless-stopped to their docker-compose.yml for the OpenClaw service. Docker will restart the container (and the stats server with it) automatically on reboot or crash.

Direct install — use the workspace value from Step 1 to build the correct path:

# workspace = value from detect_env.py output, e.g. /home/user/.openclaw/workspace/main
ENSURE_SCRIPT="<workspace>/scripts/dashboard/ensure_stats_server.sh"

# Tell user to run:
crontab -e
# Add this line (substituting the actual path):
@reboot bash <workspace>/scripts/dashboard/ensure_stats_server.sh

Always show the user the fully resolved path — never show a placeholder like /path/to/.

Do NOT set up an agent watchdog cron for open source users — it wastes tokens on every install.


Step 3 — Determine connectivity method

Ask the user (or detect from env output):

"How do you want to expose OpenClaw to your iPhone?

  1. I have a domain + nginx/reverse proxy
  2. I use Tailscale
  3. Direct IP on local network (home/office only)
  4. I'll set it up myself — just give me the details"

Use their answer to proceed to the relevant step below.


Step 4a — Domain + nginx

Tell the user:

Add this to your nginx config (replace YOUR_DOMAIN):

server {
    listen 443 ssl;
    server_name YOUR_DOMAIN;

    # SSL config here (certbot/Let's Encrypt recommended)

    # Gateway (WebSocket + API)
    location / {
        proxy_pass http://127.0.0.1:18789;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_read_timeout 86400;
    }

    # Stats server
    location /stats/ {
        proxy_pass http://127.0.0.1:8765;
        proxy_set_header Host $host;
    }
    location /tools/ {
        proxy_pass http://127.0.0.1:8765;
        proxy_set_header Host $host;
    }
}

Then run: sudo nginx -t && sudo systemctl reload nginx

Connection details for iOS app:

  • Gateway URL: https://YOUR_DOMAIN
  • Token: (from config)

Step 4b — Tailscale

Check if Tailscale is installed (tailscale_ip in env output).

If installed, tell the user to run:

tailscale serve --bg http://127.0.0.1:18789
tailscale serve --bg --set-path /stats http://127.0.0.1:8765

Then get their Tailscale hostname:

tailscale status --json | python3 -c "import json,sys; d=json.load(sys.stdin); print(d['Self']['DNSName'].rstrip('.'))"

Connection details for iOS app:

  • Gateway URL: https://<tailscale-hostname>
  • Token: (from config)

If Tailscale is NOT installed, suggest it:

"Tailscale is the easiest way to access OpenClaw remotely with no port forwarding. Install from tailscale.com, then come back and run this skill again."


Step 4c — Local network (LAN only)

Use lan_ip from the detect_env.py output directly.

Tell the user:

  • Gateway URL: http://<lan_ip>:18789
  • This only works when your iPhone is on the same WiFi network
  • Not recommended for production use

Step 4d — Manual / self-managed

Output the raw details:

  • Gateway port: 18789 (WebSocket + HTTP API)
  • Stats server port: 8765 (internal, proxy to /stats/* and /tools/*)
  • Token: (from config)

Tell them to expose these however they prefer and enter the URL + token in the app.


Step 5 — Output connection summary

Always end with a clean summary block:

✅ OpenClaw iOS Setup Complete

Gateway URL:  https://your-domain-or-ip
Token:        your-token-here

In the iOS app:
1. Open the app
2. Enter the URL and token when prompted
3. Tap Connect

Stats server: running on port 8765 ✓

If anything failed, clearly say what failed and what the user needs to do manually.


Notes

  • Never hardcode agent names (orchestrator, main, etc.) — always use the workspace path from detect_env.py
  • The gateway token comes from: openclaw config get gateway.auth.token or from ~/.openclaw/openclaw.json
  • Docker installs: scripts run inside the container, nginx typically lives on the host
  • For Docker + nginx: the nginx block is on the HOST, proxying into the container's exposed ports

Stats server survival across restarts

Gateway soft restart (SIGUSR1): stats server survives — it is a separate process, unaffected.

Docker container restart or machine reboot: stats server dies. Recovery is handled by the OS-level mechanism set up in Step 2 (Docker restart: unless-stopped or system @reboot crontab) — no agent watchdog needed.

Tell the user: "If your iOS app loses connection after a server restart, the stats server may have stopped. Message the agent 'restart stats server' and it will bring it back up."

Comments

Loading comments...