Moving a proxy in Topologix
Infrastructure & Networking
A proxy is identified by its auth key, and host agents trust it by the certificate pin of its host-agent listener. Reinstalling with the one-liner on a new machine gives you a new certificate and strands every agent. Move this proxy (Proxies → the proxy → Proxy settings) instead carries the proxy over: an encrypted bundle made on the old host is restored by the normal per-proxy one-liner on the new host. The proxy stays the same row in Topologix (sources, settings, history), keeps its certificate, and agents 2.19.0+ follow it to the new address by themselves.
Requirements
- Proxy 1.343.0 or later on the old host (the export command ships with it) and the per-proxy installer from this server for the new one. Linux (systemd) and macOS (launchd); Windows is not supported by the bundle yet — reinstall there and re-enrol the agents.
- The proxy's owner tier: the owner, a platform admin, or on an organisation proxy its owners / co-owners and the person who added it — the users who may create its installer. Only they can set Agents reach this proxy at.
- Host agents 2.19.0 or later to follow the move by themselves. Older agents need the old IP / DNS name to keep pointing at the proxy, or the agent one-liner rerun after the move.
- A way to copy one file from the old host to the new one (scp, a USB stick). The bundle never goes through Topologix.
1 · Move it
- Declare the new addressIn Proxy settings → Host agents, set Agents reach this proxy at to the new machine's IP address or DNS name (no
https://, no port; up to 8). Topologix adds it to the addresses it gives the agents for this proxy, and agents 2.19.0+ keep it as an alternate with the same certificate pin. Wait at least one agent config refresh (5 minutes): the Move section counts the agents that fetched their config since. - Export on the old hostCopy the command from the Move section, e.g.
cd /opt/topologix/proxy && sudo node dist/index.js move export --out /root/topologix-proxy-move.tpxm. It stops and disables the proxy service first (a running old proxy keeps accepting agent pushes the new one never sees;--keep-runningopts out), asks twice for a passphrase (at least 12 characters), writes the bundle with mode 0600 and prints the listener fingerprint.--with-flowsadds the local flow store (a consistent SQLite copy; it can be gigabytes). - Copy the fileCopy the bundle to the new host, e.g.
scp /root/topologix-proxy-move.tpxm admin@new-host:/root/. - Create the restore commandBack in the Move section, enter the bundle's absolute path on the new host and click Create the restore command. It is the normal per-proxy one-liner (a link that works once, for 15 minutes) with
--restore=<path>added. The package carries a new auth key for this same proxy: the old key stops working the moment the command downloads it. - Run it on the new hostThe installer asks for the passphrase at the terminal, checks the bundle against the host, stops a proxy service already running there, installs, restores the bundle into
<install dir>/data, writes this server's URL and the new key, makes the restored keys private to the proxy user (0700 / 0600) and starts the service. - Check the moveThe Move section's checklist shows the proxy online, the listener certificate unchanged, how many agents reached it at its addresses since the move, how many have not been seen since, and how many are too old to follow. On a proxy shared with other organisations it also counts their hosts (never named) — tell those owners about the move. Then re-point the senders that do not follow a proxy (below) and delete the bundle file on both hosts.
What the bundle carries
Contents
What makes the proxy this proxy and cannot be re-created by the server:
- The host-agent listener's key and certificate (
data/host-agent-tls/) — the pin every agent checks. An operator certificate (hostAgent.tls) and the API relay's certificate (apiRelay.tls) are carried too; on the new host they land indata/operator-tls/and config.json points there. - The config backups store (
data/config-backups/: the backup key and the encrypted files — never the temporary decrypted copies), so earlier backups stay readable. data/runtime.json(the heap size) and the Zigbee / Matter controller state (data/controller/). The server keeps its own copy too (pushed on changes, hourly, and — from proxy 1.343.0 — when the service stops, so the export's stop refreshes it). At its first start on the new host each controller takes the newer of the two: the bundled state when it was captured after the server's copy, else the server's.config.jsonwithoutauthKey/serverUrl— includingnetflow.clickhouse(its credentials, when set there). The one-liner writes the fresh key and the URL.- With
--with-flows: the local flow storeflows.dband the flow ledgerledger.db, restored intodata/netflow/. - Never: logs, CPU profiles, update scratch, decrypted config backups, the old auth key.
Encryption
The passphrase is turned into a key with scrypt (N = 217, r = 8, p = 1, a random 16-byte salt). The file is AES-256-GCM in 1 MiB records, each bound to the file's header, its position and whether it is the last one — a changed, re-ordered, cut or extended file is refused, and a wrong passphrase is refused before anything is written. The passphrase is asked at the terminal (or TOPOLOGIX_MOVE_PASSPHRASE for the export only), never stored and never logged. The restore unpacks into a temporary data.restore-<pid> folder and renames it into place only when every file checked out.
How the agents follow
Same-pin alternates (agent 2.19.0+)
Every config answer lists, for each proxy an agent may use, its certificate pin and addresses: Agents reach this proxy at first, then the listener's own interface addresses. For a proxy in its agent.conf, the agent keeps the other addresses as alternates with the same pin (in proxies.json; never removed on their own). When the old address stops answering, the agent rotates to an alternate, pushes there and sticks to it. Every connection checks the certificate pin — an address listed for the pin that serves another certificate is never sent anything, and an address listed under another proxy's pin is never an alternate.
Older agents
An agent older than 2.19.0 only knows the address it was installed with and cannot update itself once its proxy is gone. Keep the old IP address or DNS name pointing at the new proxy (a DNS record, a NAT rule) until they are updated, or rerun the agent one-liner on those hosts. The Move section counts them.
What does not follow
Senders to re-point by hand
These devices and applications send to the proxy's address and know nothing about the move:
- NetFlow / IPFIX / sFlow exporters — the collector address on each router / firewall.
- Syslog senders and SNMP trap destinations.
- OTLP senders (applications and collectors exporting to the proxy's OTLP relay).
- API relay pipelines — CI/CD jobs calling the Changes + Catalogue API on the proxy.
A host that already runs a proxy
The restore refuses a host whose installed proxy has another listener certificate or config-backups key — restoring there would silently replace a different proxy. Add --replace-existing to the command to restore anyway; the replaced files are kept in data.replaced-<time>/.
Good to know
- Two processes never share one identity: the restore command's package carries a new auth key, and the old key stops working the moment it is downloaded. The export also stops the old service.
- Rolling back: on the old host
sudo systemctl enable --now topologix-proxy(macOS:launchctl load -w ~/Library/LaunchAgents/com.topologix.proxy.plist) — then reinstall it with a fresh per-proxy installer, because its key was rotated.
Related guides
See it on your own infrastructure
Book a demo and we will walk you through Topologix with your systems in mind: on our cloud, or self-hosted in your own network.