Requirment Hardware :
Hardware | Specs |
---|---|
CPU | 4 Core+ |
RAM | 8GB+ |
SWAP | 4GB |
Storage | 100GB SSD |
I used Hardware spec
Hardware | Specs |
---|---|
CPU | 8 Core+ |
RAM | 64GB+ |
SWAP | 8GB |
Storage | 1TB NVME |
Check your disk server :
The disk server is simulation, reference how to setup LVM you can check here Lvm - Ubuntu Wiki , if you have new reference please comment
ββmd1 9:1 0 950.6G 0 raid0
ββvg0-root 253:0 0 40G 0 lvm /
ββvg0-swap 253:1 0 8G 0 lvm [SWAP]
ββvg0-home 253:2 0 10G 0 lvm /home
ββvg0-data_testnet 253:3 0 460G 0 lvm /data/testnet
ββvg0-data_docker 253:4 0 30G 0 lvm /data/docker
ββvg0-app_testnet 253:5 0 30G 0 lvm /app/testnet
ββvg0-subspace_01 253:6 0 100G 0 lvm /data/subspace/subspace-farmer-01
ββvg0-subspace_02 253:7 0 100G 0 lvm /data/subspace/subspace-farmer-02
ββvg0-subspace_03 253:8 0 100G 0 lvm /data/subspace/subspace-farmer-03
Create User and mount to disk /data/testnet
:
useradd -m -d /data/testnet/subspace-s /bin/bash subspace
Give password to the new user :
passwd subspace
execute the usermod
to add the user
to the sudo group, as follows:
usermod -aG sudo subspace
Switch to the new user by using the command:
su - subspace
Create new directory, following this command :
mkdir -p ${HOME}/bin
mkdir -p ${HOME}/systemd
Download Node Executable and Farmer Executable :
Version 2 - for older processors since ~2009 and some old VMs
cd $HOME/bin
wget -O subspace-node https://github.com/subspace/subspace/releases/download/gemini-3f-2023-sep-05/subspace-node-ubuntu-x86_64-v2-gemini-3f-2023-sep-05
wget -O subspace-farmer https://github.com/subspace/subspace/releases/download/gemini-3f-2023-sep-05/subspace-farmer-ubuntu-x86_64-v2-gemini-3f-2023-sep-05
Version skylake - For newer processors since ~2015
wget -O subspace-node https://github.com/subspace/subspace/releases/download/gemini-3f-2023-sep-05/subspace-node-ubuntu-x86_64-skylake-gemini-3f-2023-sep-05
wget -O subspace-farmer https://github.com/subspace/subspace/releases/download/gemini-3f-2023-sep-05/subspace-farmer-ubuntu-x86_64-skylake-gemini-3f-2023-sep-05
Create new directori in /app/testnet
LVM :
sudo mkdir -p /app/testnet/subspace
Copy binary node-subspace and farmer-subspace to /app/testnet/subspace
:
sudo cp subscape-node /app/testnet/subspace
sudo cp subspace-farmer /app/testnet/subspace
Create service for start the node using the following command :
cd $HOME/systemd
export USERNAME=$(whoami)
cat > ${HOME}/systemd/subspace-node.service <<EOF
[Unit]
Description=Subspace Node Service
After=network.target
[Service]
User=$USERNAME
ExecStart=/app/testnet/subspace/bin/subspace-node \
--chain gemini-3f \
--execution wasm \
--blocks-pruning 256 \
--state-pruning archive \
--validator \
--name "change_with_your_name_validator"
[Install]
WantedBy=multi-user.target
EOF
Create service for start the farmer using the following command :
cd $HOME/systemd
export USERNAME=$(whoami)
cat > ${HOME}/systemd/subspace-farmer.service <<EOF
[Unit]
Description=Subspace Farmer Service
After=network.target
[Service]
User=$USERNAME
ExecStart=/app/testnet/subspace/bin/subspace-farmer farm --reward-address st8waxxxxxxxxxxxxxxxxxxxx \
path=/data/subspace/subspace-farmer-01,size=100G \
path=/data/subspace/subspace-farmer-02,size=100G \
path=/data/subspace/subspace-farmer-03,size=100G
Restart=on-failure
LimitNOFILE=6553
[Install]
WantedBy=multi-user.target
EOF
Linking to Systemd :
sudo ln -sf ${HOME}/systemd/subspace-node.service /etc/systemd/system/
sudo ln -sf ${HOME}/systemd/subspace-farmer.service /etc/systemd/system/
Reload Daemon :
sudo systemctl daemon-reload
Enable Service when booting :
sudo systemctl enable subspace-node.service
sudo systemctl enable subspace-farmer.service
Start service :
sudo systemctl start subspace-node.service
sudo systemctl start subspace-farmer.service
Check Service :
sudo systemctl status subspace-node.service
sudo journalctl -fu subspace-node.service
sudo systemctl status subspace-farmer.service
sudo journalctl -fu subspace-farmer.service
Log subspace-node and subspace-farmer :
Enjoy