Skip to content

windows users WSL2 and msys64 instuctions for stacks-node (these instructions also work on Debian linux)

Compare
Choose a tag to compare
@bitnet-io bitnet-io released this 09 Mar 19:33
· 13 commits to master since this release
fb120ca

these instructions also work on Debian linux except for the msys64 and wsl2 install part

ports 20443 and 20444 must be open to your network WAN in your firewall for TCP/UDP so the miner can communicate with peers

install msys64

download msys64 and install it

https://github.com/msys2/msys2-installer/releases/download/2024-01-13/msys2-x86_64-20240113.exe

open msys64 command prompt

pacman -Sy wget nano curl

then install nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

then close msys64 and completely and reopen it

once msys64 shell is open run the following

nvm install 21

wget https://github.com/bitnet-io/stacks.js/releases/download/patched-for-bitnet/stacks.js-02-23-2024.tar.gz

tar -xvf stacks.js-02-23-2024.tar.gz

cd stacks.js

./packages/cli/bin.js make_keychain


save this output to a file and keep it safe

./packages/cli/bin.js make_keychain

step 2 install wsl2

open a command prompt as administrator cmd.exe

wsl --install -d Debian

set a username and password

sudo -i
apt update
apt install wget -y

wget https://github.com/bitnet-io/bitnet-core/releases/download/linux-windows-wallet/bitnet-linux-shared-03-01-2024.tar.gz
tar -xvf bitnet-linux-shared-03-01-2024.tar.gz
cp -rf bitnet-linux-shared-03-01-2024/bin/* /usr/bin/
mkdir -p /root/.bitnet
wget  https://github.com/bitnet-io/stacks-core-bitnet/releases/download/03-01-2024-genesis/bitnet.conf
mv bitnet.conf /root/.bitnet/
bitnetd 

bitnet-cli createwallet "stacks-blockchain" false false "" false false true

THEN use your WIF key from the keychain that you made in step 1


bitnet-cli -rpcwallet=stacks-blockchain importprivkey "YOUR_PRIVATE_KEY_WIF_HERE"

check the progress of bitnetd sync

bitnet-cli getblockchaininfo

get Config.toml file

wget https://github.com/bitnet-io/stacks-core-bitnet/releases/download/03-01-2024-genesis/Config.toml

edit Config.toml file and use your "privatekey" string from the keychain you created in step 1 for both seed and local_peer_seed

crtl-X and Y to save the file when done

nano Config.toml


now to install stacks-core node

wget https://github.com/bitnet-io/stacks-core-bitnet/releases/download/03-01-2024-genesis/stacks-core-node_linux_v2.0.1.x86_64.deb

dpkg -i stacks-core-node_linux_v2.0.1.x86_64.deb

now to fund your bitnet depost address you made with the keychain labeled as "btcaddress"
deposit a small amount of BIT like 100 BIT or 1000 BIT to that address

then check it has "UTXOs" once the wallet has 1 confirmation on the deposit

this should return output

bitnet-cli -rpcwallet=stacks-blockchain listunspent

then its time to fire up the stacks-core node miner

should start to sync headers....

stacks-node start --config Config.toml

once the headers are synced you should see that it has detected UTXOs and will start as a miner node

s1

at this point you can check the progress of syncing by opening a browser and going to and checking

http://127.0.0.1:20443/v2/info

and also

https://explorer.bitnft.io

for the current block height...
.takes about 20-30 minutes for node to completely sync even though it will start mining for STX blocks

at this point its recommended to install BitOrdinals wallet to manage your STX tokens that you mine

https://github.com/bitnet-io/BitOrdinals/releases/tag/firefox-chrome

it takes 10 block confirmations for STX tokens to be spendable once you discover a STX block

use your mnemonic phrase from the keychain as the passphrase when you setup BitOrdinals and it will be the same linked STX and BIT address from your keychain

keep your passphrase and keychain safe this controls your wallet funds like a regular private key inventory