Just create a random url and share it with your friend.
The full url is used as the seed for the private key, so the same url means the same key, and the same key means the same board.
Using Nostr, each client subscribe to itself, and sends an event to itself when the board changes, putting them in sync.
Repo at https://github.com/bordalix/chesstr
Twitter thread for discussion
Connecting to nostr relays