Skip to content
ConduitConduit

Tunnels — move a tunnel to another account

A common MSP situation: you deployed a Tunnel on a customer’s host under your own (reseller) account, and now the device should belong to the customer’s account. You do not uninstall and reinstall. It is the same service on the same host — only the enrollment token changes.

The enrollment token is the Tunnel’s whole identity. It is an identity-only JWT bound to exactly one org, carries no capabilities, and is long-lived (1 year by default) because the Tunnel re-uses it to re-register on every reconnect. So “which account does this device belong to” is answered by one value: the ENROLLMENT_TOKEN it presents. Present a token minted in the customer’s account and the Tunnel registers there.

Item Moves with the device?
The conduit-tunnel binary and service Yes. Untouched if you edit the env file; re-running the installer refreshes the binary to the currently pinned release.
Host, hostname, outbound network path Yes — untouched.
Enrollment token (identity) No — you replace it with one minted in the destination account.
Connector config (enabled connections, endpoints, credentials) No. It is stored per org and pushed down the tunnel. The destination org starts empty: re-enable the connections and re-enter their credentials.
Access grants (who can use each connector) No. Re-grant them in the destination org.
The old tunnel row in the source account No — it stays there, Disabled, until its old token has expired (step 6).
  • An admin of the destination account has to mint the token. As a reseller you can do this yourself: from Customers (/org/customers) click Manage on the customer to switch into acting-as on their org, then use their Connections → Tunnels page like the customer’s own admin. Otherwise ask the customer’s admin to mint it and hand it to you over a secure channel. See Onboarding a customer.
  • Conduit keeps one live tunnel per org. If the destination org already has a live tunnel (say, a different site), and both are online, the most recently seen one wins routing. Retire or disable the other first, or this device may not be the one serving traffic. See Architecture.
  • Mint the token for the same environment (production or staging) as the host’s RELAY_URL.

1. Mint a token in the destination account

Section titled “1. Mint a token in the destination account”

In the destination account (acting-as the customer, or the customer’s admin), go to Connections → Tunnels → Add Tunnel. Copy the enrollment token it shows.

Linux. Edit the ENROLLMENT_TOKEN line in /etc/conduit-tunnel/env, replacing the old value. Leave RELAY_URL and the rest as they are, and keep the file at mode 600:

Terminal window
sudo nano /etc/conduit-tunnel/env # replace the ENROLLMENT_TOKEN= value only
sudo chmod 600 /etc/conduit-tunnel/env

Don’t uninstall anything, and don’t set CAPABILITIES.

Alternatively, re-run the Linux one-liner from Add Tunnel with the new token. The installer is upgrade-safe on an existing host: it stops the service, rewrites /etc/conduit-tunnel/env (mode 600) with the new token, and starts the service again. It also resets LOG_LEVEL to its default unless you pass it.

Windows. Re-run the Windows one-liner from Add Tunnel with the new token. It is the same installer used for the first deploy, run again with the new token on the existing host:

Terminal window
& ([scriptblock]::Create((irm https://conduit.wyre.ai/get/tunnel.ps1))) -Token '<new identity-only JWT>'

The Windows installer is upgrade-safe on an existing host. It stops the running service, reconfigures it rather than creating a second one, rewrites the service’s environment (where the token lives) with the new token, and starts it again. An existing gMSA logon account is preserved on re-run; the wrapper only takes -Token. To change the account, call the upstream installer as in Quickstart 1a.

If you edited the env file by hand (Linux), restart the service. Re-running the Linux or Windows installer already restarts it for you.

Terminal window
sudo systemctl restart conduit-tunnel
sudo journalctl -u conduit-tunnel -f

Either way, you should see the Tunnel register:

tunnel registered (v2, zero capabilities until config push)

It comes up empty because the destination org has no connector config yet.

4. Confirm it is online in the destination account

Section titled “4. Confirm it is online in the destination account”

In the destination account, Connections → Tunnels should list the tunnel as Online with a fresh Last seen.

In the destination account, open the tunnel and enable the connections you need, entering each one’s endpoint and credentials again. See Using the connectors. Then grant access to the members or teams who should use them. Config arrives within moments (config applied connectors=[…] in the logs).

6. Retire the old entry in the source account

Section titled “6. Retire the old entry in the source account”

In the source (reseller) account, open the old tunnel under Connections → Tunnels:

  1. Disable it. Disable is the routing kill-switch: a disabled tunnel is excluded from routing, and a connector that re-registers under it stays disabled.
  2. Remove the connections you configured in the source org for this site, and their credentials, so nothing sensitive is left there to be pushed.
  3. Do not Delete the row until the old token has expired (up to 1 year after you minted it). Delete frees the token’s identity, so a re-presented old token would register a brand-new, enabled tunnel in the source org. Keep the Disabled row as the only control you have over that token.

The order matters. A live tunnel re-registers when it reconnects, so Delete alone won’t stop a connector that is still running — the console warns about this, and says to use Disable for that.

  • relay rejected registration (invalid_identity / revoked_identity) — the relay refused the token. Likely the token was truncated on paste, expired, or minted for the other environment (staging vs. production). The Tunnel stops rather than retry. Re-mint in the destination account and re-paste it cleanly. See the full entry.
  • Old tunnel still Online, or its Last seen keeps updating, in the source account — the old token is still in place or the service wasn’t restarted. Check ENROLLMENT_TOKEN in the env file and restart. (The old row staying listed as Disabled is expected; see step 6.)
  • Online but Unknown vendor or access denied — the destination org has no config or grants yet. Do step 5.
  • Need to undo — repeat these steps with a token minted in the other account.