Get DATUM running in various different setups!
The Bitcoin node itself should have at least 16GB of ram.
You will need an additional 1GB of ram per 1000 miners.
- 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 Cto 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 /alland 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
startWSLand 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!
Important: This is designed to work on a brand new installation of Debian. Do not attempt to run this on a machine you've already been using for other stuff, especially if it's already been running a Bitcoin node.
Note: If you make a mistake with the folllowing steps, start over with a fresh install of Debian.
- Go root with
su - - 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
Make sure you are still root! If not - do it again with su -
- Run
./main.sh - Follow the onscreen prompts to install and configure your Bitcoin Knots node and your DATUM gateway!
For instructions on how to answer the questions and configure your node/gateway see here.
Your node will now sync. Check its progress with bitcoin-cli getblockcount Note: You will need to do this as the bitcoin user - or whatever you called the user created when running the script. su - bitcoin to switch to that user.
You can follow along with tail -f /var/lib/bitcoind/debug.log also.
Once your node has finished syncing you will be able to connect your miners to your DATUM gateway!
Typically you can just type ip a and find the local IP of the Debian machine that way and point your miner to stratum+tcp://your_local_ip:23334






