Adding a ZennoPoster worker

Steps

  1. On the machine with ZennoPoster, run the zpServer.zp template.
  2. A registration line — a single line of JSON — appears in the run log:
{"machine":"WORKER-01","host":"192.168.0.10","external":"203.0.113.5","port":22222,"token":"9f3c...","firewall":"off","portRule":"no"}
  1. Copy it whole.
  2. Open ZP7, press NODES and paste the line into the add-node field.

The node appears in the list. From there Cronopus polls its state on its own.

The line carries the node's access token — treat it like a password.

Running it on every ZennoPoster start

zpServer.zp should run after every ZennoPoster start: the machine address and the firewall state can change, and the registration records them.

How you arrange that is up to you — ZennoPoster's own autostart, or a schedule in Tasker. Running it again over an already registered node breaks nothing: the record is updated, not duplicated.

What the line must contain

Parsing is done by ZpNodeStore.TryParse.

Required:

  • machine — the machine name, non-empty;
  • port — between 1 and 65535;
  • host or external — either one is enough.

Optional: external, token, firewall, portRule.

Parsing does not require token, but a node with authorization answers 401 without it: a line with no token is only good for z3n7.dll builds that have no authorization yet.

A boolean urlacl field is accepted instead of portRule: true reads as yes, false as no.

A trailing single quote is stripped before parsing, so the line can be copied from the log as it is, without cleaning it by hand.

What Cronopus does next

The node is stored in the zp_nodes table of the current schema. host and port go into the requests, token goes into the header of each one:

GET  http://HOST:PORT/state
POST http://HOST:PORT/command
GET  http://HOST:PORT/log
GET  http://HOST:PORT/traffic
GET  http://HOST:PORT/version

Authorization: Bearer <token>

The token is kept in the token column of zp_nodes and is not served back by /zp/nodes: the browser only receives the probe result.

The node serves logs and traffic from files on its own machine; Cronopus does not store them but forwards the request through GET /zp/log and GET /zp/traffic. See Logs and Traffic.

When the token changes

The node keeps its token in the ZP_TOKEN key of the .env file next to the build. If that file could not be written, the node generates a new token on the next ZennoPoster start and the one stored in Cronopus stops matching.

What you observe then: the node is marked Unauthorized in the list and its requests return 401. The fix is to paste the registration line again — run zpServer.zp and copy the fresh line.

Checking it

  1. Open ZP7.
  2. Make sure the node appears in the list.
  3. Check that the state loads.
  4. Send a start or stop command.
  5. Open allLogs and traffic — the node should answer in both windows.

The z3n7 build on the node

The z3n7 and ZennoPoster versions are shown in the NODES list under the node address. They come from the node itself: GET /version on every list refresh. An empty line means either that the node did not answer or that it runs a z3n7.dll build without the /version route — the node itself is working either way.

The traffic window asks for the tail of the file with the tail parameter. If a node returns the first N records instead of the last ones, it is running a z3n7.dll build without tail support: there will be data, but the wrong data. Update the build on that node.