Running the cardano-node on windows, howto?

Hi all,
i have been struggling to get the cardano-node to run on windows.
I downloaded the executables like mentioned here,GitHub - input-output-hk/cardano-node: The core component that is used to participate in a Cardano decentralised blockchain.
i played with the command line given to point at the correct files but the furthest i got is an error saying.
cardano-node.exe: Aeson exception:
Error in $: Missing required field, either ByronGenesisFile or GenesisFile

I can find quite a few extensive linux guides but none related to the windows executable.
“To run the node with cardano-node run you need to reference a few files and directories as arguments. These can be copied from the cardano-node repo into the executables directory.”
This text is a bit vaguely and isnt really self-explanatory :frowning:

what i would like it to get a relay node running on windows (windows is what i got, dont have linux and dockers is giving a hard time as well)
hope some one can point me in the right direction.
thanks

I understand your pain. Windows/Docker can work but it is highly dependent upon Hyper-V. I was running Oracle VirtualBox long before Hyper-V was a viable virtualization choice. VirtualBox and Hyper-V don’t play together well if at all on Windows. So anything using Hyper-V on Windows, I do not attempt to use because it breaks VirtualBox.

What I’ve done on my Windows 10 system is created Ubuntu virtual machine using VirtualBox. I’ve run the relay node on the Ubuntu. On Ubuntu, I’m taking a different tack and using PowerShell core on Ubuntu to automate the execution of cardano-cli commands. So far PowerShell has been doing the job and I can mix execution of native linux commands along with core PowerShell cdmlets.

The same Windows 10 system is hosting a second linux system using PureOS and it will be setup to function as the producer node. I’m just using PureOS because it was already installed and I was too lazy to build another linux VM.

One just needs enough memory on the Windows host to pull this off. The Windows host I’m running has 32GB of memory. With all 4 servers running on the same hardware, I’m consuming about 21GB of memory.

If this sounds like an option you want to use, I have a bunch of Cardano PowerShell scripts that I’m willing to share. Eventually, the collection of scripts will be roled into a PowerShell module. But I’m not there yet.

2 Likes

Cheers! just the path i was taking as well, installed a fresh ubuntu on VirtualBox and have the relay node running.
Didnt think about using the powershell actually for running the scripts, good idea…intended to do everything from within the ubuntu vm.
My server also runs with 32gb so that is good to know. I dont think i will be running a full node, just a relay node and work through the cli. but i am certainly interested to see what you can do with the powershellscripts.

1 Like

Hi!

This is the official guide how to setup a cardano-node:
https://docs.cardano.org/projects/cardano-node/en/latest/stake-pool-operations/getConfigFiles_AND_Connect.html

So basically, I’m following the official guide on how to setup a cardano-node that @laplasz has referenced. All of the commands presented in the guide have a PowerShell command equivalent. This includes building and updating the cardano-node software.

Just to be clear PowerShell (core) is installed on the Ubuntu vm. For securing the keys on the vm, a VeraCrypt container has been created. Any command requiring any of the key files requires mounting the veracrypt container which in turn requires authentication.

All of the PowerShell stuff is very rough at this point and I use it on testnet only. I’ve been programming since 1983 and using powershell since 2006.

Create-RawTranaction.ps1 is likely the most useful because it will determine the correct number of UTXOs (ins and outs) required for the transaction and calculates any of the needed fees or deposits.

Create-RawTransaction.ps1 [[-FromAddrFile] <string>] [[-ToAddrFile] <string>] [[-ada] <decimal>] [-stake] [-pool] [-prompt]

Here are a list of powershell functions that I’ve created so far.
Build-CardanoNode.ps1 Create-PaymentKeys.ps1 Create-StakeKeys.ps1 Get-Protocol.ps1 Install-CardanoNode.ps1 Update-CardanoNode.ps1
Create-ColdKeys.ps1 Create-PoolRegCertificate.ps1 Create-VRFKeys.ps1 Get-PublicIP.ps1
Create-DelegationCertificate.ps1 Create-RawTransaction.ps1 Get-AdaFee.ps1 Get-StakePoolID.ps1 Start-CardanoNode.ps1
Create-KESKeys.ps1 Create-RegistrationCert.ps1 Get-AdaTip.ps1 Get-Test.ps1
Create-OpCertificate.ps1 Create-SignedTransaction.ps1 Get-KesPeriod.ps1 Get-UTXO.ps1 Start-ProtonVPN.ps1
Create-PaymentAddress.ps1 Create-StakeAddress.ps1 Get-PaymentAddress.ps1 Submit-Transaction.ps1

Hi!

There are many useful scripts already available implemented by community members…
for example:

IMO running a pool on windows is a bad idea. There are several reasons for that:

  1. You need to reboot it on a regular basis to install security updates (block producing nodes will not produce blocks during reboots).
  2. Still your computer is vulnerable to cyber attacks (you don’t want to risk your pledge to criminals).
  3. You’re on your own when it comes to monitoring and firewall configuration (MS firewall won’t do it, i.e. you’ll have to buy an extra firewall system).
  4. Accessory software won’t be available for Windows (like leaderlog computation).

Sure I fully agree, it was more the idea of a relay node for development purposes through the cli.
And they took the effort to make a windows version, right?

1 Like

Thanks for the reference.

In combination with understanding Cardano, I’m on a quest to validate that PowerShell core is a viable tool to use in the Linux world.

For development we should of course be able to run a cardano node on windows. Just like you can run any bitcoin clone, ethereum and solano nodes on windows.

Too much talk from Charles and too little dev support.

The quality of what IOHK does for Windows devs are below any other blockchain standard. It doesn’t work and the frustrations I have with Cardano development is huge.

For ethereum, bitcoin (and clones) and solana it didn’t take me long time to get everything running.

BUT Cardano is another story. The documentation have zillions of tools and headlines with how easy it is, but the reality is that it’s not documented for practical use. That’s also why this forum exits. Right?

Of course it is possible to run a node on Windows. Every Daedalus wallet does exactly that.

But what’s the point of running a pool on Windows, when there’s massive risk in loosing control over your node because of the big security holes that MS has given up to fix.

1 Like

In opposition to some other coins, Cardano software is available on github. If you are developer and not happy with Windows support - feel free to submit patches to fix that.

What’s your problem with using Linux instead of Windows? There’s even WSL in case you don’t want to install it directly.

1 Like

Deadalus is a wallet (yes and a node). I should have been clear since I am talking about running a Cardano Node for development. If you download the latest binaries 1.34 then it simply can’t even start. I find that embarrassing for IOHK. They should NOT provide binaries without testing them first. 1.33 seem to work.

Yes, that random Joe can commit is why we see low quality software and zillions of solutions for Cardano. It’s not necessarily an advantage.

For production I use Linux but for development I prefer staying on Windows.

I wonder why IOHK does not have an official NPM package for wallet interactions. Both eth and sol has that.

Any details on can’t start?

Yes, missing dll.

That is your hint then. Check the dll if you have it and if the exe can find it.
From the command line run set or path commands and potentially add path to dll to your path variable.

Hello @cbreum

Node 1.34.0 doesn’t support Windows yet due to multiple Windows bugs causing synchronization issues that are not resolved yet. It was listed under “Know Issues” in release documents with note saying that
Quote:
" Future releases will address this issue which is specific to Windows."
Source: Release Cardano Node 1.34.0 · input-output-hk/cardano-node · GitHub

When Windows releases the patch for that bug, I’m sure they will add support for Windows again.
According to Microsoft docs one of these bugs affects
Quote:
“Windows Server 2012 R2, Windows 10 - all editions, Windows 7 Service Pack 1”
and they offer a workaround for some cases, but no patch yet. There is another bug that causes synchronization to fail, but I think this one is the major issue at the moment.
Microsoft did confirm it’s issue on their end in status section:
MSFTBug

Source: Time service does not correct the time - Windows Server | Microsoft Docs

Until the patch/fix all Windows users should only use Node 1.33 since it’s still fully supported.

1 Like

Strange that v. 1.33 can run on Windows, but v. 1.34 can not because of a bug in Windows. I don’t use a windows server for development and is certainly not convinced that Windows is the problem since it seems to be so simple as IOHK “forgot” to add at least one dll to the zip repo.

That’s what is says in official release page. Not once, but it warns about not upgrading to 1.34 for Windows users twice:


then further down it warns again:

KnownIss2

I left the link for official release of 1.34 in post above. :point_up: