[GH-ISSUE #5674] Bug: cloned device causes original peer removal across different networks #10913

Open
opened 2026-08-05 01:27:41 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @le1boro on GitHub (Mar 24, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5674

Describe the problem

I cloned a Raspberry Pi system that already had NetBird configured. On the new device, I logged out and connected it to a completely different network using a setup key. At first, everything worked fine: the original device stayed in its network, the new device was in the new network.

However, after some time, the original device suddenly disappeared from its network for no apparent reason. The issue was resolved only after regenerating the machine ID on the devices.

To Reproduce

  1. On Device A:
    netbird up
    (connected to Network A)

  2. Create a full system image and flash it to Device B

  3. On Device B (without changing machine-id):
    netbird logout

  4. Connect Device B to a different network:
    netbird up --setup-key <KEY>
    (Network B)

Expected behavior

  • Device A remains stable and connected to Network A
  • Device B operates independently in Network B
  • No cross-impact between devices

Actual behavior

  • Initially everything works fine:
    Device A is in Network A
    Device B is in Network B

  • After some time (no clear trigger, after around 6h):
    Device A is unexpectedly removed from Network A
    Peer disappears from Web UI
    No warnings or errors are shown

Suspected cause

  • Both devices share the same machine-id (cloned system)
  • NetBird may derive or reuse identity across networks
  • Identity conflict leads to delayed invalidation or overwrite
  • Action on Device B eventually affects Device A

Workaround

Regenerating machine identity before connecting to new network resolves the issue:
sudo rm /etc/machine-id
sudo systemd-machine-id-setup
Then reconnect:
netbird up --setup-key <KEY>

Suggested improvements

  • Detect duplicate machine identity across peers (even across networks)
  • Warn users when using cloned environments
  • Add explicit documentation about regenerating machine-id after cloning

Additional notes
Issue is not immediate → appears after some time
Makes debugging difficult
I understand that cloning a disk with an active VPN connection is not recommended. I expected there might be some issues, but I did not expect the original device to disappear after 6 hours of normal operation.

NetBird version
netbird version 0.60.8

Is any other VPN software installed?
nope

Originally created by @le1boro on GitHub (Mar 24, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5674 **Describe the problem** I cloned a Raspberry Pi system that already had NetBird configured. On the new device, I logged out and connected it to a completely different network using a setup key. At first, everything worked fine: the original device stayed in its network, the new device was in the new network. However, after some time, the original device suddenly disappeared from its network for no apparent reason. The issue was resolved only after regenerating the machine ID on the devices. **To Reproduce** 1. On Device A: `netbird up` _(connected to Network A)_ 2. Create a full system image and flash it to Device B 3. On Device B (without changing machine-id): `netbird logout` 4. Connect Device B to a different network: `netbird up --setup-key <KEY>` _(Network B)_ **Expected behavior** - Device A remains stable and connected to Network A - Device B operates independently in Network B - No cross-impact between devices **Actual behavior** - Initially everything works fine: Device A is in Network A Device B is in Network B - After some time (no clear trigger, after around 6h): Device A is unexpectedly removed from Network A Peer disappears from Web UI No warnings or errors are shown **Suspected cause** - Both devices share the same machine-id (cloned system) - NetBird may derive or reuse identity across networks - Identity conflict leads to delayed invalidation or overwrite - Action on Device B eventually affects Device A **Workaround** Regenerating machine identity before connecting to new network resolves the issue: `sudo rm /etc/machine-id` `sudo systemd-machine-id-setup` Then reconnect: `netbird up --setup-key <KEY>` **Suggested improvements** - Detect duplicate machine identity across peers (even across networks) - Warn users when using cloned environments - Add explicit documentation about regenerating machine-id after cloning **Additional notes** Issue is not immediate → appears after some time Makes debugging difficult I understand that cloning a disk with an active VPN connection is not recommended. I expected there might be some issues, but I did not expect the original device to disappear after 6 hours of normal operation. **NetBird version** `netbird version 0.60.8` **Is any other VPN software installed?** nope
saavagebueno added the triage-needed label 2026-08-05 01:27:41 -04:00
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#10913