Hi,
Following by go-ipfs doc, private-networks, I tried to setup a private network.
After all steps finished, I launched ipfs daemon and got a error. It says:
cmd/ipfs: error from node construction: psk header error: multicodec did not match daemon.go:335
Error: psk header error: multicodec did not match
I am new to p2p network and IPFS. Maybe I didn’t set the swarm.key correctly. Using the ipfs-swarm-key-gen tool, I created a swarm.key file and put it in my $IPFS_PATH folder and copied it to my peer node. Here is my swarm.key.
As suggested by Kubuxu in the linked Github issue, try replacing the windows line endings in the swarm.key file with unix ones. I can reproduce this error on Windows if I have the wrong line endings in it.
It’s not stated how the key is being copied, so I’m guessing this might be happening due to copying the text from swarm.key into something like notepad on Windows which uses windows-style line feeds.