If your server is taking several minutes to generate the node-keystore.ks file then it is possible that your server doesn’t have enough entropy (randomness).
To check this, run the following command:
cat /proc/sys/kernel/random/entropy_avail
and you should get a value in the thousands.
If your value is low, then install the Random Number Generator tools package as specified in the Node installation guide as follows:
sudo apt install rng-tools
sudo rngd -r /dev/random
Alternatively, you can install the haveged
package by following the instructions here: