Update a node

You normally don't need to do anything: nodes update themselves.

Automatic updates

Your node checks friendlai.xyz for the current version when it starts and every 6 hours after that. When there's a newer version, it:

  1. Downloads the new binary for your platform.
  2. Checks its SHA-256 checksum, and gives up if it doesn't match.
  3. Swaps it in place of the old one in a single step, so there's never a half-written binary.
  4. Restarts. The tray icon switches to the new version too.

So every node is on the new version within about 6 hours of a release. Nodes never go back to an older version. Updates only replace the node program; your settings, identity and rewards are kept.

The 6-hourly check happens between questions, so it never cuts off an answer your node is writing.

Checking your version

friendlai-node status

The first lines show the version you're running and the network's current build; the tray menu shows your version too. Versions look like 0.3.0+f248b931df10: the part after + identifies the build. Your account page shows each node's version too.

Updating now

In the tray menu, click Check for updates, then Update to … if a new version is out. The tray also checks every hour, and offers the update as soon as it sees one. Or, in a terminal:

friendlai-node update

This checks right away instead of waiting for the next 6-hourly check, installs the new version if there is one, and restarts the node. It prints up-to-date if you already have it.

Turning automatic updates off

Run install again with --no-auto-update:

friendlai-node install --no-auto-update

Then run friendlai-node update yourself from time to time. A node that falls too far behind may stop getting work when the network changes.

To turn them back on, set "autoUpdate": true in node.json (where it is), then restart the node:

friendlai-node stop
friendlai-node start

Reinstalling

If the installed binary is damaged or missing, run the install command from your account page again. As long as node.json is still there, the node keeps its name, identity and rewards.

Nodes from before version 0.2

Early nodes looked for updates in a place that no longer exists, so they can't update themselves. Uninstall the old node and install the current one.