This is a quick guide on how to use a prepared Powershell script to download, setup and run a Jormungandr Shelley node in a few of minutes.
Start a Powershell console (search for “powershell” on your Windows Desktop).
In your users home folder (where Powershell normally opens) create a subfolder for your testnet node and change into this new directory.
mkdir jormungandr-node cd jormungandr-node
There is a powershell script ready for download which will fetch the latest release of the executable files, and set up a testnet configuration.
To execute this script in the Powershell console just
Option a) simply copy and paste this and then hit Enter.
powershell -nop -c "iex(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/input-output-hk/jormungandr/master/scripts/bootstrap.ps1')"
Note: The above command downloads the Script code as a string and invokes it for execution. Not the most secure way because you have no real idea what’s going on. If you don’t care just skip the following paragraphs down to “launch the boostrap script”.
Option b) The more secure way is to download the script, give it a look in a text editor and then manually execute it in your Powershell console. You can download the script by opening a browser navigating to https://github.com/input-output-hk/jormungandr/tree/master/scripts and download the bootstrap.ps1 file, or by executing this command:
curl -outfile bootstrap.ps1 https://raw.githubusercontent.com/input-output-hk/jormungandr/master/scripts/bootstrap.ps1
Now you should see a file bootstrap.ps1 in your jormungandr-node folder. If you try to execute this script you probably will see a red security alert and the script will not run as expected. This is because Powershell’s default setting prevents downloaded unsigned scripts from execution. To allow it please open another Powershell console with Administrator rights (right click and select Run as Administrator) …
Now allow execution of such scripts for your user.
Set-ExecutionPolicy -scope Currentuser unrestricted
Close this admin console and switch back to the first one.
Now launch the bootstrap script:
Option a automatically fetched and executed the script. When you followed preparations for option b, you now can execute
.\bootstrap.ps1
The script sees there are no executables, and so looks up online for the latest release. If you confirm it will download it for you.
This will take some seconds, but then all the secret keys, a basic configuration and the database folder are generated for your node (green console messages).
If you confirm (y) the node will start up and produce blocks as Cardano Ouroboros Genesis_Praos should do.
If you look at the directory you will see the script downloaded the executable files, added subfolders and created different files inside the folders.
It’s important to understand, the script used the executable Jcli.exe to setup all configuration files on your computer. This includes the random generation of your private and secure keys. Only you – the stake pool operator – should know these secrets!
If you want to learn more, look into the powershell script, the config files and last but not least all the official documentation about the deeper meaning of all this magic: https://github.com/input-output-hk/jormungandr/blob/master/doc/SUMMARY.md, and the testnet repository https://github.com/input-output-hk/shelley-testnet.