Documentation

Everything you need to get Leassh running. From one-click family setup to self-hosted fleet management.

Quick Start

The fastest way to get started. Choose the connection method that works best for you.

Step 1: Create an Account

Sign up at leassh.com and choose a plan. You will receive a pairing code that identifies your fleet.

Step 2: Connect Your Machines

You have two options for connecting machines:

Option A: Install the Agent (recommended)
Install the lightweight Leassh agent on each device. Enter a pairing code and it connects automatically. Works through firewalls and NAT.

Windows (PowerShell as Admin) powershell -ExecutionPolicy Bypass -Command "& { $env:LEASSH_TOKEN='YOUR_TOKEN'; iwr -useb https://leassh.com/install-windows.ps1 | iex }"
Linux / macOS curl -fsSL https://leassh.com/install.sh | sudo LEASSH_CODE='YOUR_CODE' bash

Replace YOUR_CODE with the pairing code from your dashboard. For detailed platform-specific instructions, see the Install page.

Option B: SSH Probing (no install on targets)
Add machines to fleet.yaml with their SSH details. Leassh probes them directly. Nothing installed on the monitored machines. Requires SSH key access. See Self-Hosting for details.

Step 3: Verify

Devices appear in your dashboard within a minute. You will start receiving activity reports and can configure screen time limits, rules, and notifications.

Connection Modes

Leassh supports two ways to connect machines. Both provide the same monitoring data.

AgentSSH
Install on targetYes (tiny service)No
Setup difficultyEnter pairing codeConfigure SSH keys
Works through firewallsYes (outbound only)Needs inbound SSH access
Screenshot capabilityYes (with macOS permission)Yes (with macOS permission)
Remote command executionPaid only (tunnel mode)Yes
Best forDesktops, laptops, remote machinesServers, NAS, VMs

Deploy Agents via SSH

If you already have SSH access to a machine, you can deploy the agent remotely without physically touching the machine:

Linux ssh user@192.168.1.100 "curl -fsSL https://leassh.com/install.sh | LEASSH_CODE=YOUR_CODE sudo bash"
Windows (PowerShell) ssh user@192.168.1.100 "powershell -Command \"& { $env:LEASSH_CODE='YOUR_CODE'; iwr -useb https://leassh.com/install-windows.ps1 | iex }\""
macOS ssh user@192.168.1.129 "curl -fsSL https://leassh.com/install.sh | LEASSH_CODE=YOUR_CODE sudo bash"

macOS Note: After deploying the agent on a Mac, the Screen Recording permission must be approved once from the machine's physical keyboard. Open System Settings → Privacy & Security → Screen Recording and enable “Leassh Capture”. This is a one-time step required by Apple — no software can bypass it. All other monitoring features work immediately without this step.

Self-Hosting

Run everything on your own hardware. Zero data leaves your network.

Option A: Binary (recommended)

Download the server binary from GitHub Releases and run it directly:

Linux x64 curl -L https://github.com/cgoberg/releases/releases/latest/download/leassh-server-linux-x64.tar.gz | tar xz ./leassh fleet.yaml

Option B: Docker

The container image is hosted on GitHub Container Registry. Authenticate first:

docker-compose.yml docker login ghcr.io # GitHub username + personal access token version: "3.8" services: leassh-server: image: ghcr.io/cgoberg/leassh:latest ports: - "8383:8383" volumes: - ./fleet.yaml:/app/fleet.yaml

Requirements

  • Ollama (recommended) — for local AI vision analysis. Install from ollama.com and pull the llava model.
  • SSH access — the server connects to monitored machines over SSH. Ensure key-based authentication is set up.
  • 1 GB RAM minimum for the server. More if running Ollama on the same machine.

Configuration Reference

Leassh is configured via fleet.yaml. Here are the key sections:

Nodes

Define the machines in your fleet:

nodes: - name: kids-pc host: 192.168.1.50 ssh: user@192.168.1.50 permissions: screenshot: true process_list: true enforce: true - name: gpu-server host: 192.168.1.100 ssh: admin@192.168.1.100 gpu: nvidia

Screen Time

KeyTypeDefaultDescription
enabledboolfalseEnable screenshot capture and activity classification
capture_interval_minutesint10Minutes between screenshot captures
data_retention_daysint30Days to keep activity data before auto-purge
vision.ollama_urlstringURL of your Ollama instance for local AI
vision.modelstringllavaVision model to use for screenshot analysis

Time Limits

KeyTypeDescription
nodestringWhich node this limit applies to
categorystringActivity category (gaming, social_media, etc.)
max_minutes_per_dayintMaximum allowed minutes per day

Rules

KeyTypeDescription
namestringUnique rule identifier
whenstringCondition expression (supports time, metrics, processes)
nodeslistWhich nodes the rule applies to
actionslistActions: notify, ssh_command, kill_blacklisted, kill_category

Notifications

notifications: telegram: bot_token: "your-bot-token" chat_id: "your-chat-id" webhook: url: "https://your-webhook.com/alert"

OpenClaw Plugin

The openclaw-fleet plugin connects your Leassh fleet to any OpenClaw-compatible AI agent. Ask natural language questions about your infrastructure and get real-time answers.

Install the plugin git clone https://github.com/leassh/openclaw-fleet.git cd openclaw-fleet pip install -r requirements.txt

Once installed, you can ask your AI agent things like:

  • "How's the fleet?"
  • "Which GPU has the most VRAM free?"
  • "How much time did Elsa spend gaming this week?"
  • "Kill all Steam processes on gpu-server"

See the openclaw-fleet repository for full setup instructions and configuration.

API Reference

The Leassh server exposes a REST API for integration. All endpoints require a valid license token in the Authorization header.

License

POST /api/license/validate Validate a license key and return plan details, device count, and expiry.

Screen Time

GET /fleet/api/screen-time/{node}/today Get today's screen time breakdown by category for a specific node.
GET /fleet/api/screen-time/{node}/weekly Get the past 7 days of screen time data with daily breakdowns.

Insights

GET /fleet/api/insights/{node}/weekly AI-generated weekly narrative report with highlights and trends.
GET /fleet/api/insights/{node}/deep Deep analysis with content quality, engagement type, and notable activity.

Fleet

GET /fleet/api/status Get status of all nodes: online/offline, last seen, current metrics.
POST /fleet/api/command/{node} Execute an SSH command on a specific node. Body: {"command": "..."}

FAQ

Common questions are answered on the main site FAQ section. Here are some additional technical questions:

Does Leassh require open inbound ports?

No. The agent communicates outbound to your Leassh server. No inbound ports need to be opened on monitored machines. For self-hosted setups, you need the server to be reachable from agent machines on your LAN.

Can I run Leassh without Ollama?

Yes. Without a vision model, Leassh still captures process lists and system metrics. Screenshot classification will be disabled, but time limits based on process names still work.

What happens if the agent loses connection?

The agent buffers data locally and syncs when the connection is restored. Screen time enforcement continues to work offline based on the last known rules.

Can I monitor machines outside my LAN?

Yes. With the agent installed, machines connect outbound through any firewall or NAT. With SSH probing, use SSH tunneling or a VPN to reach machines outside your LAN.

Do I need to install software on the computers I'm monitoring?

You have two options. The recommended approach is to install the tiny Leassh agent (under 10MB) — just enter a pairing code and it connects automatically. Alternatively, power users can use SSH probing which requires no software on target machines but needs SSH access configured. Both give you the same monitoring data.