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)
Would be cool to setup a seed node over there in Australia, many nodes are located in the EU/US region, and probably none in the Asia Pacific region. I'm also looking into opening up a seed node on my home internet connection here in Malaysia, but will have to think about DDoS protection before opening any ports.
How are the block time offsets over there?
Actually I'm in Israel.
I'm from Australia originally.
This is so true.
For some digital nomad (I don’t own house) like myself Privex server is really helpful
Good read and not all lawyers are bad, those that fight to the letter of the law and those that for spirit of the law.
A !hivebits for you. We need more people to read and study the laws.
What I am looking at in the U.S is the U.C.C, the U.S.C, and the C.F.R along with trust law and a few others.
Success! You mined .9 HBIT & the user you replied to received .1 HBIT on your behalf. mine | wallet | market | tools | discord | community | <><
Are you running this from home or an office location? I would be interested in your network bandwidth usage running your witness.
Its running from my home office but I have a very fast direct fibre internet connection.
Until Windows forces and update and reboots your node.
Yes, this is something I've been thinking about.
I think there are still some ways to stop automatic updates.
The other option is to take local snapshots and then do planned Windows updates.
I plan to have a backup / seed witness soon.
Probably the best thing would be to teach everyone how to create a multi-boot system, starting from an already installed Windows system.
Excellent post, info and how-to!
Thanks.
I think the best approach is to just manually update Windows to latest versions on a planned schedule.
Then one can stop the witness node, dumpsnapshot and reboot and then load snapshot and restart in a short amount of time.
Yeah, it's a challenge to create the multi-boot with Windows pre-installed, but without a doubt, it's the best option. It's just very difficult, and you need to have everything backed up just in case, etc., etc.
Better yet, with older machines that you don't use, a stand alone Ubuntu install!
That's good manual for running witness. thanks for sharing your experience. maybe I should try? But I have win7 machine...
You need Windows 10 updated to a pretty recent version (2004) in order to have the WSL 2 that is needed to do this.
I don't think you need ubuntu to run a witness. Well, at least I didn't need to install any extra operating systems on WSL when I was running resteem bots. Please include a link to vote.
Here is a link to vote for my witness
just voted
Thanks
Too much work for a non computer type like myself.
Very interesting. I would not have thought it was possible. Thank you for the really very good explanation.
Greetings Michael
!invest_vote
!jeenger
@mima2606 denkt du hast ein Vote durch @investinthefutur verdient!
@mima2606 thinks you have earned a vote of @investinthefutur !
Your contribution was curated manually by @mima2606
Keep up the good work!
Congratulations