VPS Lite Boot for Openclaw

Reduce OpenClaw gateway out-of-memory failures on 1–2 GB VPSs by lowering concurrency, ensuring swap is available, and optionally adjusting systemd OOM protection.

thinhbuiii
v1.0.2
Oct 13, 2026
0
66
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install vps-lite-boot

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install vps-lite-boot using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is VPS Lite Boot?

VPS Lite Boot is an OpenClaw skill for diagnosing and reducing out-of-memory (OOM) restart loops on low-memory Linux VPSs. It checks actual memory, swap, kernel logs, gateway status, and relevant OpenClaw concurrency settings before recommending changes. Its core approach is to limit concurrent work and provide swap—not to kill supposed workers, which run inside the gateway process.

The skill makes system-level changes only with the owner's understanding and explicit approval. It backs up configuration before editing, validates changes before restarting services, and stays within scope: it does not install software, alter unrelated services or SSH settings, or touch user data. Openclaw Skills users can apply it as a cautious, evidence-led recovery workflow rather than making speculative server changes.

VPS Lite Boot Use Cases

  • An OpenClaw gateway repeatedly restarts on a VPS with 1–2 GB of RAM.
  • Kernel logs report Out of memory, oom-killer, or a killed openclaw-gateway process.
  • Gateway startup or session recovery causes memory usage to spike.
  • A newly provisioned low-memory VPS needs a measured check for OOM symptoms before tuning.
  • An operator wants to reduce concurrent agent and subagent work while preserving the rest of the OpenClaw configuration.
  • A system owner wants optional systemd OOM protection after reviewing and approving the risks.

How VPS Lite Boot Works

  1. Confirm authorization and scope. The skill proceeds with system changes only when the requester is the owner and has reviewed and approved the proposed work. General server optimization requests that do not clearly concern low RAM or gateway restarts require clarification.
  2. Inspect without changing anything. Check RAM and swap with free -m and swapon --show, inspect kernel logs for OOM evidence, check whether the gateway is running, and read the current concurrency values.
  3. Report findings. Share the observed values and whether logs show OOM events. If there is no OOM evidence, do not make speculative changes; ask for more details or investigate other symptoms.
  4. Propose the remediation and wait for approval. Explain the planned concurrency changes, any required swap and /etc/fstab edits, and the optional systemd drop-in before proceeding.
  5. Back up and limit concurrency. Back up openclaw.json, then set agents.defaults.maxConcurrent to 1 and agents.defaults.subagents.maxConcurrent to 1 (or, where appropriate, 1–2). Merge only these fields and validate the configuration.
  6. Ensure swap is available. Skip this step if sufficient swap already exists. Otherwise, create a swapfile—typically 2 GB for a 2 GB VPS—secure its permissions, enable it, and add an /etc/fstab entry only after backing up and checking for duplicates. Validate the file before relying on it at boot.
  7. Optionally adjust gateway OOM handling. With approval and a confirmed service name, create a systemd drop-in to adjust the gateway's OOM score and memory limits. Skip this step if the service name or setup is uncertain.
  8. Restart and verify. Restart the gateway, then compare memory, swap, process status, and recent kernel logs with the initial readings. Report the before-and-after results; if OOM continues, explain that the VPS may need more RAM, such as an upgrade to 4 GB.

VPS Lite Boot Setup

No separate package installation is specified. Use this skill on a Linux VPS running OpenClaw, with the owner authorized to inspect the system and, if approved, use sudo or root privileges. Before any changes, explain that the workflow can edit openclaw.json, create a swapfile, modify /etc/fstab, and optionally add a systemd drop-in. Wait for explicit confirmation.

1. Collect read-only diagnostics first:

free -m
swapon --show
cat /proc/swaps
journalctl -k --since "3 days ago" 2>/dev/null | grep -iE "oom|killed process" | tail -20
dmesg 2>/dev/null | grep -iE "oom|killed process" | tail -20
ps aux | grep -i openclaw-gateway | grep -v grep

Read the current concurrency settings from the available config path:

python3 - <<'PY'
import json, os
p = os.path.expanduser("~/config/openclaw.json")
if not os.path.exists(p):
    p = os.path.expanduser("~/.openclaw/openclaw.json")
d = json.load(open(p))
ag = (d.get("agents") or {}).get("defaults") or {}
print("config:", p)
print("maxConcurrent:", ag.get("maxConcurrent"))
print("subagents.maxConcurrent:", (ag.get("subagents") or {}).get("maxConcurrent"))
PY

If OOM is confirmed and the owner approves the changes, back up the configuration and set the concurrency fields without overwriting unrelated settings:

cp ~/config/openclaw.json ~/config/openclaw.json.bak.$(date +%F-%H%M)
openclaw config set agents.defaults.maxConcurrent 1
openclaw config set agents.defaults.subagents.maxConcurrent 1
openclaw config validate

Adjust the backup path to match the actual config location. If the CLI cannot set a field, patch only that field after backing up, then validate. Restore the backup if validation fails.

If swap is absent, create and enable a 2 GB swapfile (or choose a size appropriate to the host):

SWAPFILE=/swapfile
SWAPSIZE=2G
sudo fallocate -l "$SWAPSIZE" "$SWAPFILE" || sudo dd if=/dev/zero of="$SWAPFILE" bs=1M count=2048 status=progress
sudo chmod 600 "$SWAPFILE"
sudo mkswap "$SWAPFILE"
sudo swapon "$SWAPFILE"
swapon --show
free -m

To persist swap, back up /etc/fstab, check for an existing swap entry, and append the swapfile entry only if it is not already present. Validate before rebooting; restore the backup if validation fails:

sudo cp /etc/fstab /etc/fstab.bak.$(date +%F-%H%M)
grep -nE '^[^#]*swap' /etc/fstab
printf '%s\n' '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo findmnt --verify --verbose
sudo swapon -a

The optional systemd adjustment requires separate approval and the verified gateway service name. After approved changes, restart the gateway and check results:

openclaw gateway restart
sleep 60
free -m
swapon --show
ps aux | grep -i openclaw-gateway | grep -v grep
journalctl -k --since "2 minutes ago" | grep -iE "oom|killed" | tail

VPS Lite Boot Data Schema & Taxonomy

The skill does not define a separate database or generated report format. It reads and, only with approval, updates a small set of system configuration files and runtime settings.

Location or setting Purpose and handling
~/config/openclaw.json or ~/.openclaw/openclaw.json OpenClaw configuration. The skill reads the agents.defaults concurrency values and may update only maxConcurrent and subagents.maxConcurrent. Back up the file before editing; preserve unrelated fields and validate afterward.
agents.defaults.maxConcurrent Maximum concurrent default agent work; the suggested value for a VPS with no more than 2 GB RAM is 1.
agents.defaults.subagents.maxConcurrent Maximum concurrent subagent work; the suggested value is 1–2, commonly 1 for the minimal low-memory setup.
/swapfile Optional swap backing file, typically 2 GB for a 2 GB VPS. Its permissions are set to 600; it is created only when suitable swap is not already available.
/etc/fstab Persistent swap configuration. The skill backs up the file, checks for an existing swap entry, appends only when needed, and validates before reboot.
*.bak.YYYY-MM-DD-HHMM Timestamped backups of the OpenClaw configuration and, when changed, /etc/fstab.
~/.config/systemd/user/<service>.d/10-oom.conf Optional user-service systemd drop-in containing OOM and memory directives. <service> must be confirmed from the actual gateway service; do not guess it.
Runtime diagnostics RAM, swap, kernel OOM messages, gateway process status, and before-and-after checks are read from system commands and logs.

The skill's scope excludes unrelated configuration, SSH settings, user data, and software installation. Do not expose secrets or tokens in diagnostic output.

VPS Lite Boot Advanced Features

  • Evidence-first diagnosis: Uses live memory and swap readings, kernel logs, process checks, and config values; it does not assume an OOM event without evidence.
  • Targeted concurrency tuning: Changes only the two relevant OpenClaw concurrency fields, preserving other configuration values and validating the result.
  • Safe swap persistence: Checks for existing swap, backs up /etc/fstab, avoids duplicate entries, and requires validation before rebooting. If fallocate is unavailable or fails, dd is the fallback.
  • Optional systemd OOM protection: Can create a user-service drop-in with OOMScoreAdjust=-500, MemoryHigh=75%, and MemoryMax=90%, after owner approval and confirmation of the real service name. This reduces the gateway's OOM kill priority; it does not guarantee the process cannot be killed or replace adequate RAM.
  • Before-and-after verification: Restarts the gateway with the OpenClaw restart command, then checks memory, swap, gateway status, and recent OOM logs.
  • Explicit safety boundaries: Requires an owner request and confirmation for system changes, backs up before editing, validates before restart or reboot, and recommends a RAM upgrade when tuning and swap do not resolve OOM.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*