How to set Up a Hive Witness in Windows 10 Home - Using WSL 2 & Docker Desktop for Windows

9854B1C9EFB24732AC90BAA13B0AA9D6.jpeg

I've been wanting to set up a Hive node on my main server PC for years, but the problem is that it runs Windows 10 Home, which I need for other reasons.

Until recently this was basically impossible - I spent many hours trying.

Windows home didn't support the virtualisation software needed for Docker and the existing Windows Subsystem for Linux (WSL 1) used an emulator which had poor I/O performance - bad news for a Hive node.

New Developments - Two Hive Posts provide a way forward

A couple of months ago I read a post about the new Windows Subsystem for Linux 2.0 by @themarkymark. I read that WSL 2.0 runs a native Linux kernel and is said to have almost equivalent performance to running Linux natively.

Intrigued as to the possibilities, I researched whether it worked on Windows 10 Home.
There was little information out there.
Serious Devs don't use Windows Home versions - Windows Home is for peasants!

But I seemed to be able to update my Windows version to the 2004 build version required - I know that seems 16 years out of date but that's how Microsoft does their version numbers!

A couple of days ago I saw an excellent instruction post on setting up Hive in a Box (HIAB) by @rish556. It was the first time I've seen up to date instruction on this. The Github readme for HIAB is out of date.

So I decided to take these two posts and see if I could make it work.

Installing WSL 2.0

I followed @themarkymark's instructions and was able to get basic Ubuntu 20.04 running fairly quickly.

But if you want to run a Hive node easily you need Docker so STOP before "Install a Linux Distribution" in his instructions.

Install Docker Desktop

Before installing a Linux distro you need to install Docker Desktop.

But before you do this you need to remove Docker Toolbox and Oracle Virtual Box (if you have them) as they will stuff things up - I found out about this the hard way!

Check in Docker Desktop Settings Resources to ensure you have "Network" and "WSL Integration" showing.

Install Ubuntu 20.04

With Docker Desktop installed you can then go to the Windows Store and download and install Ubuntu 20.04.
It feels quite weird installing Linux from the Windows Store, sort of like buying a PC at an Apple Store.

Ensure Docker is using Ubuntu 20.04 on WSL 2

When I installed Ubuntu 20.04 for some strange reason it was installed on WSL 1 and thus didn't show up in Docker Settings Resources WSL Integration.

If that happens you need to follow these easy instructions to move your Ubuntu 20.04 to WSL 2.

Once this is done you should see your Ubuntu 20.04 distro showing up in in Docker Settings Resources WSL Integration.
Like this.

Increase the size of WSL 2's Virtual Hard Disk (VHD)

A little documented fact about WSL 2 is that it establishes a virtual hard disk with a maximum size of 256 Gb.

If you want to run a Hive node that's not enough. You need at least 350 Gb and more is advisable as the blockchain grows.

In order to expand the size you need to follow the instructions at the bottom of this page from Microsoft.

If you have trouble with "Get-AppxPackage -Name "" | Select PackageFamilyName" as I did just use "Get-AppxPackage - AllUsers" and scroll until you find your Unbuntu 20.04 package. Its probably the last one.

Install HIAB

You can now follow @rish556's instruction on setting up HIAB and it should work.

Why is this important - why not just rent a Linux Server from Privex?

@someguy123's Privex is great - but too many Hive witnesses and nodes are already using it.
It has become a major single point of failure for Hive.

Rented "cloud" servers are also great. But they cost money every month and many people start Hive nodes and then drop out because the monthly costs exceed their returns, especially when Hive prices are in the toilet as they are now.

If we really want Hive to be as robust, censorship resistant and decentralised as possible we need to be able to run Hive nodes on mass consumer hardware - that means home PCs with Windows Home!

The Hive open sourced development team has done an amazing job with HF24 in reducing resource requirements.
Now with a pretty basic machine - 4 thread CPU, 16 Gb RAM and 500 Gb SSD you can run a witness node.

Most people have computers which meet that spec, but most are running Windows Home, not Ubuntu.

This is Hive by the masses for the masses.

Full API Node is in the works

The machine I'm using is actually a lot more powerful than this.

Its a beast - Intel i7 6800k 4.0 Ghz CPU with 6/12 cores and 96 Gb RAM & 500Gb NVME, 500GB SATA & 1 TB HDD.
I'm planning to upgrade to 2 x 1 TB NVME in RAID 0 so that I can run an API node on this machine and transfer the witness to a second, less powerful machine.

I've got a whole lot of ex-mining PCs that I want to re-purpose for Hive nodes (in diverse locations for redundancy).

Vote for my witness

My main gig is with @jpbliberty. We are suing Facebook & Google for banning the ads of the cryptocurrency industry in early 2018 and causing the crypto winter (if you don't believe me have a look at my recent posts with heaps of data and evidence proving this).

This should hopefully provide a big payout to everyone on Hive. Imagine $6 Hive, or $100 Hive!

I'm also a regular blogger, Splinterlands player, Exode player and involved in Hive in many ways.

As the only lawyer active on Hive (cue hisses) I've contributed my legal knowledge and experience to the Hive community in dealing with a range of issues including Justin Sun and the Hive Hard fork.

I am now contributing in a technical capacity as a witness.

Please vote for my witness. (KeyChain or HiveSigner)

Witness Vote using direct Hivesigner

Join the conversion now