Perch v1.5.0

🐦 Perch

Your machine, at a glance.

CI License: MIT Site Roadmap

A local system + developer dashboard for Linux β€” monitoring, ops, a full developer toolbox, and an AI assistant, in one token-protected web app that runs on 127.0.0.1.

Perch overview β€” live CPU/memory/network/GPU charts, a file-search box and the health scorecard


What is this?

Perch is a self-hosted control panel for your own Linux machine. It runs as a small local web service and gives you a single browser tab (or a native desktop window) where you can see everything that is happening on the system and act on it β€” instead of juggling htop, df, du, systemctl, journalctl, lsof, docker ps, Postman, and a pile of scratch converter tabs.

It is built for:

Under the hood it is a single small Python service (stdlib HTTP server + psutil) with a framework-free HTML/CSS/JS frontend β€” no database, no build step, no cloud.

What can you do with it?

Monitor the system

Tab tour β€” Overview, Monitor, Security, Traffic, installed packages and Storage

Manage storage & files

Developer tools

AI assistant

Control the desktop

Everything is reachable through a Ctrl+K command palette (and ? lists every keyboard shortcut), the assistant is one click away in the bottom-right corner from any tab, and the grouped sidebar scrolls on its own (independently of the page) with live CPU/MEM/DISK mini-bars pinned at the bottom. Integrations that aren't installed on your machine hide themselves automatically β€” and a Simple mode toggle (in Settings) hides the developer tabs entirely for a monitoring-and-settings dashboard aimed at non-technical users.

Installation

Requirements

Option 1 β€” Debian / Ubuntu package (recommended)

git clone https://github.com/dwarka-prasad/perch && cd perch
make deb                                  # builds dist/perch_1.2.3_all.deb
sudo apt install ./dist/perch_1.2.3_all.deb

Then launch Perch from your app menu, or:

perch-desktop     # native window
perch             # headless β€” open the printed URL in a browser

Option 2 β€” From source, per-user (no root)

git clone https://github.com/dwarka-prasad/perch && cd perch
make install-user

This sets up a systemd user service (perch.service) plus an app-menu launcher β€” no pip, no root. Useful commands afterwards:

systemctl --user status perch     # is it running?
systemctl --user restart perch    # restart after editing the code
make uninstall-user               # remove service + launcher

Option 3 β€” Docker (headless host monitoring)

git clone https://github.com/dwarka-prasad/perch && cd perch
docker compose -f docker/compose.yaml up -d --build
docker compose -f docker/compose.yaml logs    # copy the token URL

The container runs with host PID + network namespaces for real visibility. Desktop-only features (brightness, wallpaper, Bluetooth, notifications, opening apps) work only in the native/.deb install on the host.

Just run it (no install)

make run          # http://127.0.0.1:9080  (token printed at startup)
make desktop      # native GTK/WebKit window

First run

On first start Perch generates an access token in ~/.perch-token and prints a ready-to-open URL like http://127.0.0.1:9080/?t=<token>. Every request needs that token β€” bookmark the URL.

Configuration

Env Default Meaning
PERCH_PORT 9080 Port to bind
PERCH_HOST 127.0.0.1 Bind address (0.0.0.0 to reach from LAN β€” still token-protected)

State (search index, alert history, screenshots) lives under ~/.cache/perch; alert and app config under ~/.config/perch β€” including alertctl.json (alerting on/off/snooze), customrules.json (your own alert rules), fleet.json (other machines, chmod 600) and home.json (the home-screen layout). Because the layout lives on the server, it follows you to a different browser or machine; the browser keeps a copy as an offline cache, and reset layout on the Overview tab clears both.

Security

Perch binds to 127.0.0.1 and every request needs the token from ~/.perch-token. On first visit the URL token is exchanged for an HttpOnly, SameSite=Strict cookie and the URL is cleaned, so the token stops living in browser history; repeated bad tokens from one address are locked out. Privileged actions (package install, upgrades) go through pkexec, which shows a system password dialog β€” credentials are never stored or handled by Perch. The web terminal and database browser run as your user; writes from the file editor/sketch are restricted to your home directory. Review the code before exposing it beyond localhost.

Roadmap and contributing

What comes next is in ROADMAP.md; issues tagged help wanted and good first issue are open to anyone.

Development

See CONTRIBUTING.md. Backend is one organised module; frontend is plain HTML/CSS/JS with no build step. make help lists tasks.

make test            # unit + HTTP smoke tests (stdlib unittest only)
make test-frontend   # drives the real app in headless Chrome

The frontend suite boots a throwaway Perch on a temp HOME, opens it in headless Chrome over the DevTools Protocol, and asserts the app actually works β€” live tiles, the widget gallery, layout persistence across a reload, the alerting switch, custom rules, port filtering, and every tab opening without a console error. It skips itself if no Chrome is on PATH.

Releasing

CI (.github/workflows/ci.yml) lints, compiles, and builds the .deb and Docker image on every push/PR. To cut a release, bump the version in all four places that carry it β€” setup.cfg (the package metadata; pyproject.toml deliberately holds none), packaging/debian/control (what build-deb.sh reads), src/perch/config.py and src/perch/__init__.py β€” add a CHANGELOG.md entry, then:

git tag v1.0.0 && git push origin v1.0.0

release.yml then builds the .deb, pushes the image to ghcr.io/<owner>/perch, and publishes a GitHub Release with the .deb attached.

License

MIT β€” see LICENSE.