Fixed/constant peerId

Hi
I have a problem with make a node
I need a constant node with knowed peerId (same as QmQayyvMd5vdQQJDzveS1jRr4vtG9kHNpRqiaCxFzwCduV )

but i can’t find any example for create node(/host) with set peerId option to initial value (same as above value)

Anybody know how to do it?

The default option just generate a random peer id.
The other thing you can do is first generate a peer id, write the private key to a file, and read the private key from the file instead of regenerating a new one.

Thanks @Jorropo !
Can you show me how to implement that?

Solved!