# Krellstack > Krellstack is hosted monitoring for Linux servers, homelabs and AI rigs. A small read-only agent on each machine reports CPU, memory, disks, network, temperature, graphics cards, loaded local models and basic security signals to a web dashboard at https://gkrellm.net/app/. This file tells an AI agent how to set a server up, check that it worked, and what not to do. Krellstack is in early access and invite only. It is an independent product from DeltaTech LTD and is not the GKrellM desktop program. **What you are setting up** One background service, `krellstack-agent`, on each Linux server. Every 30 seconds it sends one small JSON report over HTTPS to `https://gkrellm.net/api/ingest`. It opens no ports, accepts no commands and changes nothing on the machine. The human then sees the server as a stack of panels in their dashboard. **First, work out where you are running** - **You have a shell on the Linux server to be monitored.** Follow "Setup" below. - **You are a hosted assistant with no shell.** Do not pretend to install anything. Give the human the install command from "Setup" and the checks from "Verify", and ask them to run it. - **You are in a sandbox and `gkrellm.net` is blocked.** Stop. Do not try mirrors, proxies or other hosts. Tell the human the network policy blocks the install and give them the command to run themselves. **What you need from the human** An agent token. It starts with `gka_` and the human gets it once, when they activate their invite at `https://gkrellm.net/claim`. One token covers all of that person's servers. - If the human has no token, you cannot make one. Accounts are invite only: point them to the waitlist at https://gkrellm.net/ and stop. - Never invent, guess or reuse a token from somewhere else. - Treat the token as a secret. Pass it through the `GK_TOKEN` environment variable. Do not print it, log it, paste it into chat, write it into a repository, or put it in a URL. **Setup** Requirements: Linux with systemd, `bash`, `curl`, and root access through `sudo`. 1. Ask the human to confirm before you install. This adds a service that runs as root. 2. If they want to read the code first, it is two short shell scripts: - `curl -fsSL https://gkrellm.net/agent.sh` is the agent. - `curl -fsSL https://gkrellm.net/install.sh` is the installer. 3. With the token in `GK_TOKEN`, install: ```sh curl -fsSL https://gkrellm.net/install.sh | sudo GK_TOKEN="$GK_TOKEN" bash ``` The installer does three things and nothing else: puts the agent at `/usr/local/bin/krellstack-agent`, writes the token to `/etc/krellstack-agent.conf` readable by root only, and creates and starts the `krellstack-agent` systemd service. **Verify** Run all three and check each result before telling the human it worked. ```sh systemctl is-active krellstack-agent sudo krellstack-agent --print curl -fsS -H "Authorization: Bearer $GK_TOKEN" https://gkrellm.net/api/agent/status ``` - The first prints `active`. - The second prints the exact JSON the agent sends, without sending it. Check `host` is the name the human expects. - The third returns JSON like `{"ok":true,"servers":[{"name":"atlas","seconds_since_report":12}]}`. This server should be listed with `seconds_since_report` under 90. Allow up to a minute after install. If the service is not active, read `journalctl -u krellstack-agent -n 30 --no-pager` and report what it says. Do not retry in a loop. **Servers without systemd** In a container or on a system without systemd, run the agent under whatever supervisor the machine already uses: ```sh curl -fsSL https://gkrellm.net/agent.sh -o /usr/local/bin/krellstack-agent && chmod 755 /usr/local/bin/krellstack-agent GK_TOKEN="$GK_TOKEN" krellstack-agent # runs until stopped GK_TOKEN="$GK_TOKEN" krellstack-agent --once # sends one report and exits ``` **Optional settings** Set these in `/etc/krellstack-agent.conf` or the environment, then restart the service. - `GK_HOST`: the name shown in the dashboard. Defaults to the machine's hostname. Letters, digits, dot, dash and underscore. - `GK_INTERVAL`: seconds between reports. Default 30. Do not go below 15. - `GK_OLLAMA_URL`: where a local Ollama server listens. Default `http://127.0.0.1:11434`. **Graphics cards and local models** - NVIDIA cards are reported automatically when `nvidia-smi` is installed: load, memory, temperature and power for each card. - If an Ollama server is running, the agent reports which models are loaded and whether the server answers. - Other card vendors and other model servers are not supported yet. Do not install extra software to work around that. **What the agent reads, and what it never reads** Reads: `/proc` and `/sys` for CPU, memory, network, temperature and uptime; `df` for disk use; `journalctl` or `/var/log/auth.log` for a count of failed SSH logins; `apt` or `dnf` for a count of pending security updates; `ss` for listening port numbers; `nvidia-smi`; the Ollama list of loaded models. Never reads or sends: file contents, environment variables, command lines, usernames, IP addresses of who logged in, prompts, model output, or anything in home directories. **How to report back to the human** Keep it to this: 1. One line: installed or not, and the server name it reports as. 2. The dashboard link: https://gkrellm.net/app/ 3. Anything missing, for example "no GPU panel because nvidia-smi is not installed". 4. How to remove it, in one line. **Rules** - Install only on machines the human owns or administers, and only after they say yes. - One agent per server. If `systemctl is-active krellstack-agent` already prints `active`, do not reinstall. Just run the checks. - Do not change firewalls, SSH settings, package sources or anything else to "help" the install. - Do not expose the dashboard, the token or the report JSON to third parties. - Krellstack shows what is happening. It does not block attacks or fix problems. Do not tell the human their server is now protected. - If something fails twice, stop and report the error text. **Removing it** ```sh sudo systemctl disable --now krellstack-agent sudo rm /etc/systemd/system/krellstack-agent.service /usr/local/bin/krellstack-agent /etc/krellstack-agent.conf ``` **Limits in early access** - Up to 25 servers per account, about one day of history. - Alerts to Telegram, Slack and Discord are planned and not available yet. - Linux only. **Sending reports yourself** You do not need the agent script. Any program can report a server: ``` POST https://gkrellm.net/api/ingest Authorization: Bearer Content-Type: application/json ``` Body, at most 8 KB. Only `host` is required; leave out what you cannot measure. ```json { "host": "atlas", "os": "Debian GNU/Linux 13", "cores": 8, "cpu_pct": 37.2, "sys_pct": 4.1, "mem_used_kb": 11700000, "mem_total_kb": 32000000, "disks": [{ "mount": "/", "used_pct": 61 }], "rx_bps": 4100000, "tx_bps": 620000, "temp_c": 54, "uptime_s": 3561000, "ssh_failed_24h": 3214, "sec_updates": 2, "reboot_required": false, "ports": [22, 443], "gpus": [{ "name": "RTX 4090", "util_pct": 92, "mem_used_mb": 21912, "mem_total_mb": 24564, "temp_c": 71, "power_w": 388 }], "model_server": "up", "models": ["llama3.1:70b"] } ``` Responses: `200 {"ok":true}` on success, `401` for a bad token, `403 host_limit` when the account is at 25 servers, `413` when the body is too large, `422` for a bad `host` name. Report no more often than every 15 seconds per server. ## Docs - [Agent script](https://gkrellm.net/agent.sh): the full source of what runs on the server - [Installer](https://gkrellm.net/install.sh): the full source of the install script - [Dashboard](https://gkrellm.net/app/): where the human sees their servers - [Privacy notice](https://gkrellm.net/privacy): what the waitlist stores ## Optional - [Homepage](https://gkrellm.net/): product overview, planned pricing and the waitlist - Contact: contact@gkrellm.net