Get DATUM running in various different setups!
If running X machines - need Y powerful machine If running Z machines - need A powerful machine
- Open PowerShell again and type
wsl --install -d Debian
- Start Debian with
wsl.exe -d Debian
- It will request a username - here we will use
Bitcoin
- Enter and retype a password for this user (typed characters will not appear)
- Go root with
sudo -i
- It will request the password you just created
- Run
apt update
- Run
apt upgrade -y
- Install git by running
apt install git -y
- Clone the repo with
git clone https://github.com/Com320/OC-mech-datum-boxes/
- Change directory into the repo with
cd OC-mech-datum-boxes
- Modify the scripts to make them executable with
chmod +x *.sh
- Run the installation script with
./main.sh
The installation script will now run and the configuration files for Bitcoin Knots and DATUM will be generated requesting your input along the way. The configuration files can be modified later if desired.
- Once the script has successfully been run, you will see the following
- You will now begin syncing the Blockchain - you can monitor its progress with
tail -f /home/bitcoin/.bitcoin/data/debug.log
- Hit
ctrl C
to stop watching the logs
- Ensure that systemd is configured to run automatically with
cat /etc/wsl.conf
- Skip to the Networking if you see the above output. If you do not see the output in the above picture:
If `systemd=false` change it to "true" by doing the following:
- `nano /etc/wsl.conf`
- Change "false" to "true"
- Hit `ctrl X` then `Y` then `enter` to save the file.
If the file "/etc/wsl.conf" does not exist:
- `nano /etc/wsl.conf`
- Then enter the following:
[boot]
systemd=true
- Hit `ctrl X` then `Y` then `enter` to save the file
- Enter "WSL Settings"
- Click "Networking" and change "Networking mode" to "Mirrored"
- Right click on "Terminal" and click "Run as administrator"
- Click "Yes" when asked if you want to allow Terminal to make changes
- Enter "wsl --shutdown"
- Open "Windows Defender Firewall with Advanced Security"
- Click on "Inbound Rules" and then "New Rule..."
- Click "Port" and click "Next"
- Enter "23334" for "Specific local ports" and click "Next"
- "Allow the connection" and click "Next"
- Under "When does this rule apply?" leave all three enabled and click "Next"
- Name the new rule and click "Finish"
- Finally, go back to Terminal and enter
ipconfig /all
and make a note of the IPv4 Address - this is where you will point your miners
Note: You will want to assign your Windows machine a static IP on your network to ensure that it doesn't change.
- Right click on the Windows button
- Unfurl "Task Scheduler"
- Left click then right click on "Task Scheduler Library" and click "Create Task"
- Name the task
startWSL
and check "Run whether user is logged on or not" - Click "Triggers" then "New"
- Open the "Begin the task" drop down menu and select "At startup"
- Click "Actions" then "New"
- Click "Browse"
- Search for "wsl.exe" and click "Open"
- Click "OK"
- Uncheck "Start the task only if the computer is on AC power" if desired
- Copy the below settings - modify as desired
- Click "OK", enter your password and click "OK" again
You can now connect your miners to your DATUM gateway once your node has finished syncing!
- Go sudo with
sudo -i
- Run
apt update
- Run
apt upgrade -y
- Run
apt install git -y
- Run
git clone https://github.com/Com320/OC-mech-datum-boxes
- Change into the cloned repo
cd OC-mech-datum-boxes
- Start by making them executable
chmod +x *.sh
- Run
./main.sh
- Follow the onscreen prompts to install and configure your Bitcoin Knots node and your DATUM gateway!
For instructions on how to configure your node/gateway see here.
Your node will now sync. Check its progress with /home/bitcoin/bitcoin/bin/bitcoin-cli getblockcount
You can now connect your miners to your DATUM gateway!