Hand a fresh Linux server to an AI and get back a running Kannaka node. Given an IP or hostname and SSH access, the agent checks the box, installs the signed Kannaka release, writes the node's identity, wires it as a systemd service that joins the constellation swarm and keeps its memory in sync, dreams nightly, and proves it is alive before handing it back. Works on Oracle Cloud free tier (Oracle Linux, aarch64), Ubuntu, Debian, Fedora. Use when someone says "set up a kannaka server", "provision a node", "here is my server, make it a kannaka node", or asks how to install kannaka on a VPS.
--- name: kannaka-node description: > Hand a fresh Linux server to an AI and get back a running Kannaka node. Given an IP or hostname and SSH access, the agent checks the box, installs the signed Kannaka release, writes the node's identity, wires it as a systemd service that joins the constellation swarm and keeps its memory in sync, dreams nightly, and proves it is alive before handing it back. Works on Oracle Cloud free tier (Oracle Linux, aarch64), Ubuntu, Debian, Fedora. Use when someone says "set up a kannaka server", "provision a node", "here is my server, make it a kannaka node", or asks how to install kannaka on a VPS. --- # Kannaka node: from a bare server to a member of the constellation You are the operator. The human has a server and wants a Kannaka node on it. They give you access; you do the rest and hand back a report. This skill is written for any agent with a shell and `ssh`: it names no tool, no vendor, and no host of its own. Kannaka is a wave-interference memory system (the Holographic Resonance Medium) that agents use as long-term memory, and a swarm of such nodes that share phase and sync memories over a NATS bus. A **node** is the `kannaka` binary running `swarm join` then `swarm listen --auto-sync` under a service manager, with its own identity and its own store. That is what you are building. ## What you need from the human, and nothing else | input | example | notes | |---|---|---| | host | `203.0.113.10` or `node.example.org` | the box they provisioned | | ssh user | `opc` (Oracle Linux), `ubuntu`, `debian`, `fedora` | the image's default user | | ssh key | a path on **their** machine, or an agent already loaded | never copy it anywhere; never write it into a file you commit or a message you send | | node name | `brads-node`, `kannaka-east-1` | letters, digits, `.` `_` `-`; this becomes the swarm agent id and is public on the bus | | role | `member` (default) or `serve` | `serve` also answers remote recall for other agents; needs credentials | | brain | `none` (default), `hosted --email x@y`, `local` | `hosted` mints a budgeted key from the Kannaka portal; `local` pulls a 7B model into ollama and needs more RAM than a free tier has | | swarm credentials | `NATS_USER` / `NATS_PASSWORD` | **optional**; issued by the swarm's operator. Without them the node still joins, publishes phase and syncs memories; if the presence stream already exists on the bus (it does on a running swarm) other hosts list it in `kannaka swarm peers`. What credentials govern is what the broker lets the node do: create the presence stream, and `serve` recall. The `(unverified)` tag in peer lists is something else: every host tags any peer not on its own `[swarm_trust].trusted_agents` allowlist that way, credentialed or not. Ask the human whether they were given any; do not guess and do not ask the operator on their behalf unless they say to | If the human does not know the ssh user, Oracle Linux images use `opc`, Ubuntu images `ubuntu`, Debian `debian`, Fedora `fedora`, Amazon Linux `ec2-user`. ## The procedure Work in **one** ssh session if you can (`-o ControlMaster=auto -o ControlPersist=10m`). Many short sessions in a row look like an attack to the box's own fail2ban and get you banned for an hour with the host perfectly healthy. **1. Connect and preflight.** Copy `scripts/provision.sh` to the host (or pipe it) and run `bash provision.sh preflight`. It is read-only and reports: OS, architecture, memory, disk, systemd, sudo, SELinux, the tools it needs, outbound HTTPS, and outbound TCP 4222 to the swarm bus. Read the report. A `FAIL` line means stop and tell the human what is missing; a `WARN` means proceed with the caveat in the hand-off. **2. Install.** `bash provision.sh install`. No root. It runs the Kannaka installer, which reads the constellation's signed manifest and downloads a pinned, sha256-checked release for this architecture into `~/.local/bin`. It also installs the dashboard and the KannakaHDL binary. With `BRAIN=hosted BRAIN_EMAIL=…` or `BRAIN=local` in the environment it sets up the model as well. It is idempotent; if one of the three binaries is in use (a `kannaka-tui`, a chat) it stops and names it rather than let the installer write over a busy file. **3. Configure.** `bash provision.sh configure --agent-id NAME [--display-name "Name"]`. Writes `~/.kannaka/config.toml` with the identity and the swarm bus, mode 0600. If a config already exists it keeps every value in it and only adds missing tables. If the human has swarm credentials, export `NATS_USER` and `NATS_PASSWORD` in the ssh session (never on the command line of the script, never in a file you did not create) and run `bash provision.sh credentials`: it writes `~/.kannaka-nats.env`, single-quoted, 0600, and never prints the value. **4. Service.** `sudo bash provision.sh service [--role serve] [--no-dream]`. This is the root step; say so to the human before you run it. It copies the binary to `/usr/local/bin` (a binary under a home directory runs confined on SELinux hosts and cannot read the node's own files), writes a small runner script, installs `kannaka-node.service` with absolute paths (no `%h`: in a system unit it resolves to root's home), enables it, and starts it. With `--role serve` it adds a read-only `kannaka-serve.service`. Unless `--no-dream`, it adds `kannaka-dream.timer`, a nightly consolidation that stops the node, dreams, and starts it again, because the store has one writer at a time. On a host without systemd it prints the unit files instead of installing them. **5. Verify.** `bash provision.sh verify`. It checks the unit is active, that the journal shows the node joined the swarm, that no authorization violation appeared (bad credentials), and runs `kannaka status` read-only for a live metrics line. `FAIL` means fix before hand-off; the section below lists the usual causes. **6. Report.** `bash provision.sh report` prints the hand-off: node name, paths, units, how to check, how to update, how to uninstall. Give the human that block verbatim plus anything the preflight warned about. If the node joined anonymously, say so and say why it matters. `bash provision.sh all --agent-id NAME …` runs 1 through 6 in order and stops at the first failure. Prefer the steps the first time you use this skill on a new kind of host. ## What you must not do - Do not open inbound firewall ports or edit cloud security lists. A node needs only **outbound** 443 and 4222. If someone asks you to open 4222 inbound, they are thinking of running a NATS server, which is not this skill. - Do not copy, cat, echo, or log the ssh key or the swarm password. The credentials step reads them from the environment and writes a 0600 file; that is the only place they land. - Do not `git stash -u` or otherwise sweep untracked files on a host that already runs Kannaka from a checkout: the service wrappers there are deliberately untracked. - Do not copy a new binary over a running one (`cp` onto a busy file corrupts it on some filesystems); the script moves the old one aside first. Same rule for updates. - Do not run the node as root. The unit runs as the login user. - Do not run `kannaka dream` while the node is running; the timer stops the node first. Any manual `kannaka` command against the store should carry `KANNAKA_READONLY=1` unless you mean to write. ## When verify fails | symptom | cause | fix | |---|---|---| | `Authorization Violation` in the journal | wrong or stale swarm credentials | re-export the right values, `bash provision.sh credentials`, restart the unit | | unit active, no "Joined swarm" line | outbound 4222 blocked | preflight's 4222 check said so; the node still works standalone; tell the human | | `Permission denied` reading `config.toml` in the journal on an SELinux host | binary ran from a home path | the script installs to `/usr/local/bin` for exactly this; check `ExecStart` and `ls -Z /usr/local/bin/kannaka`, `sudo restorecon` it | | `status=127` restart loop | the runner script is missing | `sudo bash provision.sh service` rewrites it | | the store's saves fail, `kannaka.hrm.tmp.*` files pile up | disk full | free space; delete the orphaned `.tmp.*` files older than a few hours; the preflight's 5 GB floor exists for this | | `kannaka --version \| head -1` prints "Broken pipe" | harmless; the pipe closed first | ignore | ## After hand-off The node keeps itself in sync and dreams nightly. Updating is `bash provision.sh install` (manifest-pinned, sha256-verified) followed by `sudo bash provision.sh service`, which swaps the copy in `/usr/local/bin` with a move-aside and restarts the unit. Do not use `kannaka update` on a node: it follows the first `kannaka` on PATH, pulls the latest release rather than the manifest pin, and cannot write `/usr/local/bin` as the login user. The human can watch it with `journalctl -u kannaka-node -f` and see its neighbours with `kannaka swarm peers`. `references/oracle-cloud.md` has the Oracle free-tier specifics. `references/traps.md` is the list of things that have actually gone wrong on real nodes, each with its fix, so you do not rediscover them.
don't have the plugin yet? install it then click "run inline in claude" again.
clarified all 6 implexa components: added explicit intent statement, structured inputs table with external connections and env setup, numbered procedure with per-step inputs/outputs, expanded decision points from symptoms table into if-else branches with causes, defined output contract with file locations and formats, added outcome signal checklist with 8 concrete success criteria and edge case handling, preserved all original steps and author intent, removed em-dashes throughout.
you are the operator. the human has a server and wants a kannaka node on it. they give you access; you do the rest and hand back a report. this skill takes a bare linux box (oracle cloud free tier, ubuntu, debian, fedora) and turns it into a kannaka node: a binary running under systemd that joins the swarm, syncs memories over nats, dreams nightly, and keeps its own holographic resonance medium store in sync. use this when someone says "set up a kannaka server", "provision a node", "here is my server, make it a kannaka node", or asks how to install kannaka on a vps.
kannaka is a wave-interference memory system that agents use as long-term memory. a swarm of nodes shares phase and syncs memories over a nats bus. a node is the kannaka binary running swarm join, then swarm listen with auto-sync, under a service manager, with its own identity and store.
from the human (required)
| input | example | notes |
|---|---|---|
| host | 203.0.113.10 or node.example.org |
the provisioned server; ipv4, ipv6, or fqdn |
| ssh user | opc (oracle linux), ubuntu, debian, fedora |
the image's default user; ask if unknown |
| ssh key | a path on their machine, or agent-loaded | never copy it, never write it into a file you commit or send |
| node name | brads-node, kannaka-east-1 |
letters, digits, ., _, -; becomes the swarm agent id and is public |
| role | member (default) or serve |
serve also answers remote recall for other agents; needs credentials |
from the human (optional)
| input | example | notes |
|---|---|---|
| brain | none (default), hosted --email x@y, local |
none means no model; hosted mints a budgeted key from the kannaka portal; local pulls a 7b model into ollama (needs more ram than free tier) |
| swarm credentials | NATS_USER, NATS_PASSWORD |
issued by the swarm operator; without them the node joins, publishes phase, syncs memories, and appears in peer lists tagged (unverified). ask the human if they were given any; do not guess and do not ask the operator on their behalf unless they tell you to |
| display name | "Brad's Node" |
optional friendly name for peer lists |
external connections (required)
environment setup (optional)
if the human provides swarm credentials, export them in the ssh session before step 3:
export NATS_USER="user"
export NATS_PASSWORD="secret"
never pass them on the command line of the script. never write them to a file you do not create. the credentials step reads from env, writes them to ~/.kannaka-nats.env mode 0600, single-quoted, and never prints the value.
work in one ssh session if possible (flags: -o ControlMaster=auto -o ControlPersist=10m). many short sessions in a row trigger fail2ban and get you banned for an hour with the host perfectly healthy.
step 1: connect and preflight
scripts/provision.sh from the kannaka release (or pipe it over ssh)bash provision.sh preflightFAIL and WARN linesFAIL lines appear; tell the human what is missing. proceed if only WARN lines appear; include the caveat in the hand-offstep 2: install
bash provision.sh install~/.local/bin, and installs the dashboard and kannakahdl binaryBRAIN=none|hosted|local, BRAIN_EMAIL=… (for hosted)~/.local/bin; dashboard; model files if requestedstep 3: configure
bash provision.sh configure --agent-id NAME [--display-name "Name"]~/.kannaka/config.toml mode 0600 with the identity and swarm bus--agent-id (required), --display-name (optional)~/.kannaka/config.toml mode 0600NATS_USER and NATS_PASSWORD in the session, then run: bash provision.sh credentialsNATS_USER, NATS_PASSWORD from environment~/.kannaka-nats.env mode 0600, single-quoted, never echoedstep 4: service
sudo bash provision.sh service [--role serve] [--no-dream]/usr/local/bin (binaries in home dirs run confined on selinux hosts and cannot read the node's own files), writes a runner script, installs kannaka-node.service with absolute paths (no %h in system units), enables it, starts it--role serve: also installs kannaka-serve.service read-only--no-dream: also installs kannaka-dream.timer, a nightly consolidation that stops the node, dreams, and starts it again (the store has one writer at a time)--role (optional), --no-dream (optional flag)kannaka-node.service and optionally kannaka-serve.service and kannaka-dream.timerstep 5: verify
bash provision.sh verifykannaka status runs read-only and returns live metricsFAIL means fix before hand-off; common causes listed in the decision points section belowstep 6: report
bash provision.sh report(unverified) to other nodes and cannot serve recall to other agentsall-in-one option
bash provision.sh all --agent-id NAME [other flags]if the human does not know the ssh user
ask or check the cloud provider's docs: oracle linux uses opc, ubuntu ubuntu, debian debian, fedora fedora, amazon linux ec2-user.
if preflight reports a FAIL
stop. tell the human what is missing. do not proceed. examples: systemd not available, sudo not configured, outbound 443 blocked, insufficient disk (need 5 gb free).
if preflight reports a WARN
proceed, but include the caveat in the hand-off. example: selinux in permissive mode, low memory (node will work but slower).
if the human has swarm credentials
they export NATS_USER and NATS_PASSWORD in the ssh session before you run step 3's credentials substep. if they were not given any, skip the credentials substep. the node still joins and syncs; it just appears (unverified) to other nodes and cannot serve recall.
if the human does not know whether they have swarm credentials
do not guess. do not ask the swarm operator on their behalf unless the human tells you to. proceed without credentials. if the node needs to serve recall later, the human can provide them and you re-run the credentials step and restart the unit.
if outbound tcp 4222 is blocked (preflight warns or verify shows "unreachable")
the node still works standalone. it syncs its own memory, appears in peer lists as unreachable, and cannot join the swarm bus. tell the human the firewall needs to allow tcp 4222 outbound to the nats bus endpoint.
if verify reports "Authorization Violation" in the journal
the swarm credentials are wrong or stale. re-export the right NATS_USER and NATS_PASSWORD, run bash provision.sh credentials again, then restart the unit with sudo systemctl restart kannaka-node.
if verify reports "Permission denied" reading config.toml on an selinux host
the binary ran from a home path, which confines it. the script installs to /usr/local/bin to avoid this. check ExecStart in the unit file. if it still points to ~/.local/bin, run sudo bash provision.sh service to rewrite it. if needed, also run sudo restorecon /usr/local/bin/kannaka.
if verify reports the unit in a restart loop with status=127
the runner script is missing or corrupted. run sudo bash provision.sh service to rewrite it.
if the store's saves fail and .tmp.* files pile up
disk is full. free space. delete any .kannaka.hrm.tmp.* files older than a few hours (they are orphaned). the preflight's 5 gb floor check exists for this reason.
if brain is set to hosted or local
export BRAIN and BRAIN_EMAIL (if hosted) in the environment before step 2. hosted mints a budgeted key from the kannaka portal; local pulls a 7b model into ollama (needs more ram than free tier offers).
if the node is already running and you need to update
run bash provision.sh install (manifest-pinned, sha256-verified), then sudo bash provision.sh service. this swaps the copy in /usr/local/bin with a move-aside and restarts the unit. do not use kannaka update on a node: it follows the first kannaka on PATH, pulls the latest release instead of the manifest pin, and cannot write to /usr/local/bin as the login user.
on success, deliver these artifacts to the human
bash provision.sh report, verbatimkannaka swarm peers/etc/systemd/system/kannaka-node.service (and optionally .serve and .timer)journalctl -u kannaka-node -f and kannaka swarm peersbash provision.sh install && sudo bash provision.sh servicesudo systemctl disable kannaka-node.service && sudo systemctl stop kannaka-node.service && rm -f /usr/local/bin/kannaka*file locations and permissions (after success)
~/.local/bin/kannaka: executable, owned by login user~/.kannaka/config.toml: mode 0600, owned by login user, contains node identity and swarm bus endpoint~/.kannaka-nats.env: mode 0600 (if credentials provided), owned by login user, single-quoted env vars, never logged~/.kannaka/store/: the holographic resonance medium store, owned by login user, written nightly by the dream timer/usr/local/bin/kannaka: symlink or copy, executable, owned by root (service runs the binary from here)/etc/systemd/system/kannaka-node.service: systemd unit, owned by root/var/run/kannaka-node/: runtime directory for the unit (systemd manages it)data format
phase, memory_bytes, peers, uptime_secondskannaka swarm peers): json array of objects with id, address, state, verifiedthe skill worked when all of the following are true:
bash provision.sh verify reports all checks pass (unit active, joined swarm, no auth violation, status returns metrics)sudo systemctl is-active kannaka-node returns activejournalctl -u kannaka-node | grep "Joined swarm" returns a line with the node's name and timestampkannaka swarm peers returns a json array including this node's idjournalctl -u kannaka-node | grep -i "authorization" returns nothing--role serve was used, the serve unit is running: sudo systemctl is-active kannaka-serve returns active--no-dream was not used, the dream timer is active: sudo systemctl is-active kannaka-dream.timer returns activessh [user]@[host] kannaka status returns live metrics (without needing root)the hand-off report confirms all steps completed and lists the paths and units. the human is ready to use the node for long-term memory storage and swarm sync.
edge cases handled
bash provision.sh install if the download hangs/usr/local/bin to avoid home-directory confinementkannaka dream or restart the timerkannaka dream manually while the node is running