How to install ETCMC Node on Headless Debian

Install ETCMC Client on Debian Headless
- Difficulty Level: Hard
- Hardware Requirements / Energy Consumption: Lowest
Warning: This guide is intended for users with a higher level of technical expertise. Proceed with caution, as it involves tasks that may require advanced knowledge of Linux systems and command-line operations. If you are unfamiliar with these concepts, it is recommended to seek assistance from someone experienced or consult additional resources before proceeding.
Step 1: Download Debian
- Navigate to the Debian download page here
- Click on the link to download the Debian ISO file ( debian-12.9.0-amd64-DVD-1.iso ).
- Once the download is complete, proceed to the next step.
Step 2: Burn Debian ISO to USB
- Insert a USB stick into your computer's USB port.
- Download and install Rufus or a similar tool for burning ISO files to USB.
- Open Rufus and select your USB stick from the device list.
- Click on the "Select" button and choose the Debian ISO file you downloaded earlier.
- Ensure that the partition scheme is set to "MBR" and the file system to "FAT32".
- Click on "Start" to begin burning the Debian ISO to the USB stick.
- Once the process is complete, you now have a bootable Debian USB drive ready for installation. Your Debian installation media is now prepared and ready for use. Download Link: http://debian.inf.tu-dresden.de/debian-cd/12.5.0/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso
Step 3: Choose Graphical Install
- Boot your computer from the Debian USB drive.
- When prompted, select "Graphical Install" by pressing the Enter key.
Step 4: Select Language and Keyboard Settings
Step 5: Configure Network, Set Hostname, Set Root Password, and Create User
Step 6: Select your Timezone
Step 7: Partition Disk
- Choose "Guided - use entire disk" option.
- Select your SSD from the list.
- Choose "All files in one partition" option.
- Confirm by selecting "Finish partitioning and write changes to disk".
- When asked to write changes to disk, select "Yes".
Step 8: Configure Package Manager
- Choose "No" for scanning extra installation media.
- Select "Yes" to use a network mirror.
- Choose the United States as the mirror country.
- For Debian archive mirror, select "deb.debian.org".
- Leave HTTP proxy blank.
- Opt out of the package usage survey by selecting "No".
Step 9: Select Software
- Choose "Debian headless" for minimal hardware requirements.
- Tick the box next to "SSH Server" to enable remote access.
- Tick the box next to "Standard system utilities" for essential system tools.
Step 10: Install GRUB Bootloader
- Choose "Yes" for installing GRUB on the primary drive.
- Select "/dev/sda" as the primary drive.
- Proceed by clicking "Continue" to reboot.
Step 11: Login and Deactivate DVD from Sources List
- Log in with the root account using the password set during installation.
- Open the sources list file by typing: nano /etc/apt/sources.list
- Locate the first line in the file, which corresponds to the DVD mirror.
- Add a "#" at the beginning of the line to comment it out and deactivate it.
- Save the changes by pressing Ctrl + O, then press Enter.
- Exit the nano editor by pressing Ctrl + X. By deactivating the DVD mirror in the sources list, you ensure that the system does not attempt to use it for package installation or updates.
Step 12: Download and Extract Zip File, Set Permissions, and Open Directory
- Move to home directory by typing: cd /home
- Create a folder named ETCMC: mkdir ETCMC
- Download the zip file from the provided link using wget: wget https://github.com/Nowalski/ETCMC_Software/releases/download/Setup%2FWindows/ETCMC_Linux.zip
- Download and install Unzip with command: apt install zip unzip
- Extract the zip file contents into the current directory: unzip ETCMC_Linux.zip -d ETCMC
- Set permissions for the folder and files inside to 777: chmod -R 777 ETCMC
- Open the folder to access its contents: cd ETCMC
Step 13: Run Installation Script
- Type: ./install_script.sh
- Wait for „Installation complete.“ By executing this command, the installation script (install_script.sh) will initiate, installing all required packages automatically.
If you encounter an error like "cannot execute: required file not found" try this:
- Type: apt-get install dos2unix
- Type: dos2unix install_script.sh
- Run ./install_script.sh again
Step 14: Find IP Address
- Run: ip address
- Look under your "ens" network card.
- Find the IP address listed under "inet".
Step 15: Run Software and Open Web Interface
- Type: python3 Linux.py start --port 5000
- Access the web interface on a different computer in your home network using your IP address followed by ":5000"
- Default Login is: admin // password
Step 16: Add Systemd Autostart on Restart
- Open Text Editor Nano and add a file, type: nano /etc/systemd/system/etcmc.service
- Add the following text:
[Unit] Description=ETCMC After=network.target
[Service] User=root Group=root ExecStartPre=/bin/sleep 20 ExecStart=/usr/bin/python3 /home/ETCMC/Linux.py start --port 5000 WorkingDirectory=/home/ETCMC StandardOutput=append:/var/log/etcmcscript.log StandardError=append:/var/log/etcmcscript.log Environment=PATH=/usr/local/bin:/usr/bin:/bin RemainAfterExit=true
[Install] WantedBy=multi-user.target
- Save and Exit the Editor
- Add the File to Autostart by this commands: systemctl daemon-reload && systemctl enable etcmc.service
Step 17 Optional: Backup Balance file every 6h
If you're experiencing frequent power cuts and are worried about balance loss, here's a simple step to back up your balance file every 6 hours using a cron job.
- Open Cronjob with this command: crontab -e
- Add the following line at the end of the crontab file:
0 */6 * * * cp /home/ETCMC/etcpow_balance_backup.txt.enc.bak /home/
Congratulations! You've completed the installation process.
If you have any suggestions for improvements, please let me know - ETCMC - Exodus