Browse all docs

Install a node

Install a cdnca node with the command from the console, common flags, initialisation, adding it to a line group and checking it works.

Nodes are the servers that actually accelerate and protect sites. The administrator copies an install command in the control plane and runs it on the node; the node registers itself, and the administrator then initialises it and adds it to a line group.

Before you start

  • A control plane you can sign in to, with node licence quota left.
  • A freshly installed x86_64 node server with root access; see requirements.
  • Decide the node's region. The node and its line group must use the same region, otherwise the node's IP does not appear in the line group.

Step 1: copy the install command

  1. As an administrator, open "Nodes → Node list". If you use named regions, add them first under "Region management".
  2. Click "Install node", choose "Install by command" and click "Copy install command".

All nodes of a control plane use the same command; you do not add the node or fill in an ID first, and copying the command does not create a node. The command carries the registration key (passed on stdin, never as an argument); keep it private. If it leaks, click "Reset registration key": every command copied before stops working, installed nodes are not affected. "SSH remote install" is a separate option; the command is enough for your first node.

The command looks like this (always use the one copied from the console):

(f=$(mktemp) || exit 1; trap 'rc=$?; rm -f "$f"; exit $rc' EXIT; trap 'exit 130' INT; trap 'exit 143' TERM; { curl --proto '=https' --proto-redir '=https' -fsSL -o "$f" 'https://console.cdnca.com/downloads/install-node.sh'; } || { rc=$?; echo '[cdnca-edge] error: 无法下载安装脚本' >&2; exit $rc; }; { [ "$(head -c 2 "$f")" = '#!' ] && [ "$(tail -n 1 "$f")" = 'main "$@"' ]; } || { echo '[cdnca-edge] error: 下载的安装脚本为空或不完整' >&2; exit 1; }; printf '%s\n' '<注册密钥>' | bash "$f" --control-plane 'https://console.cdnca.com' --registration-key-stdin)

Step 2: run it on the node

Sign in as root and paste the whole command. The installer shows each step, overall progress and the estimated time left; the full output goes to /var/log/cdnca-install-node-*.log. The last `install-state:` line is the result: `install-state: serving` means the install is done and the node serves traffic. A new node that is not initialised yet ends at once with `install-state: installed_pending_initialization` and exit code 3: it is installed and waits for initialisation, not a failure, and opens by itself after step 3. An initialised node that gets no first licence ticket within 180 seconds shows `install-state: installed_pending_ticket` (installed, awaiting the first ticket).

Common flags (add them before the closing parenthesis of the copied command):

FlagPurpose
--yesContinue when the preflight only warns
--public-ip IPSet the public IP (detected by default)
--no-external-probeDo not take part in external probing
--skip-firewallLeave the host firewall alone
--disable-xdpDo not attach the XDP filter (nftables only)
(f=$(mktemp) || exit 1; trap 'rc=$?; rm -f "$f"; exit $rc' EXIT; trap 'exit 130' INT; trap 'exit 143' TERM; { curl --proto '=https' --proto-redir '=https' -fsSL -o "$f" 'https://console.cdnca.com/downloads/install-node.sh'; } || { rc=$?; echo '[cdnca-edge] error: 无法下载安装脚本' >&2; exit $rc; }; { [ "$(head -c 2 "$f")" = '#!' ] && [ "$(tail -n 1 "$f")" = 'main "$@"' ]; } || { echo '[cdnca-edge] error: 下载的安装脚本为空或不完整' >&2; exit 1; }; printf '%s\n' '<注册密钥>' | bash "$f" --control-plane 'https://console.cdnca.com' --registration-key-stdin --yes --public-ip 203.0.113.10)

Step 3: initialise the node

  1. Back in "Nodes → Node list", open "Pending initialisation" and find the new node by IP and time added.
  2. Click "Initialise". If the dialog shows "Region", choose the region you planned (a single region is preselected) and click "OK".
  3. When the node turns "Normal", check that it is online and its last heartbeat keeps updating.

Before initialisation the node receives no site or system configuration and is not added to DNS. The page notes that the node certificate is valid for 24 hours, so initialise within that time. Installing on the server alone does not put the node into service.

Step 4: add it to a line group

  1. Open "Nodes → Line groups" and click "Add group".
  2. Choose the same "Region" as the node and enter a name. The resolution value can be left empty to generate one, the note can be empty and the order can stay 100. Click "OK".
  3. On the new group's row click "Set resolution". Tick the node IP in the list on the left, click "Add in batch" → "OK".
  4. Check that the IP appears, enabled, in the configured list on the right. Use "Set standby in batch" for standby IPs; start with a primary IP.

Only initialised nodes with a usable IP in the same region as the group appear in the list.

Check the node works

  • The node list shows the right IP, status "Normal" and a fresh heartbeat.
  • The line group lists the node's IP.
  • A test site using this line opens correctly after its configuration is published (see add a site).

On the node itself: there is no separate OpenResty service; cdnca-edge-agent starts OpenResty once the first release arrives. 204 from the second command means OpenResty is running:

systemctl is-active cdnca-edge-agent
curl -fsS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:18080/healthz

Problems

What you seeCheck first
The install command failsThe failed step marked at the end and the error line above it; full output in /var/log/cdnca-install-node-*.log. Fix the cause and run the same command again
The node does not appear under "Pending initialisation"The command came from this control plane; the installer reported no error; node quota is left; the node can reach the control plane and its gateway ports
It stays pendingYou clicked "Initialise"; installing on the server does not replace this step
No IP to add in the line groupThe node is initialised and has a usable IP, and its region matches the group
Node is normal but the site does not openThe site's line, publish result, DNS, origin and certificate; the online badge alone is not enough
You want to reinstall the nodeThe installer refuses to register a machine twice. Handle the old node in the console first; "Reset registration key" is not a reinstall

To uninstall a node see operations. More in troubleshooting.