Creating an Easy-to-Use Lite Node Interface on Linux CLI (Ubuntu 24.04)
Setting up a lite node interface on Linux CLI is a straightforward process, especially on Ubuntu 24.04. This guide will walk you through the steps to create and secure your node, as well as set up some useful aliases for monitoring.
Initial Setup
- SSH Access:
- Connect to your VM using SSH:
ssh root@your-vm-ip
- Initial password:
mypassword
- Security Measures:
- Secure your encryption key
- Disable password authentication
- Create a new user named ‘my new user’
Useful Aliases
Some helpful aliases have been pre-configured for you:
- rejoin: This alias provides a quick way to rejoin your background tmux session and three-split window setup, its a time saver:
- Left window: Diode node logs
- Top right: Nethogs for bandwidth monitoring
- Bottom right: Htop for process monitoringUsage:
rejoin
- logs: This alias shows the Diode node logs in real-time:
logs
run tmux or install it with sudo apt install tmux
do a ctrl b " ctrl b % and ctrl b %
this will set your windows, if your new to tmux click here for the cheat sheet and run the alias in each window where you want them. if you don’t have it install nethogs with sudo apt install nethogs for monitoring bandwidth with your lite node VM or LXC.
you may also want to check that your lite node is set to your public IP by running
All configuration parameters which can be listed using
snap get diode-node
and set using snap set diode-node <key>=<value>
for example
snap get diode-node host=public ip address
Alias Definitions
These aliases are defined as follows:
bash
Copy code into .bashrc or .zshrc depending on which shell your using
alias logs='snap logs diode-node -f'
alias rejoin='if [[ -z $(tmux ls) ]]; then tmux; else tmux a; fi'
after editing the .bashrc file run source ~/.bashrc to enable the alias
Firewall Configuration
Ensure that your VM is added to the firewall group with the necessary ports open for the Diode node to function correctly.
for example
edge2-port 41046,443,993,1723,10000
host 139.162.191.153
peer2-port 51055
private 0
rpc-port 8545
rpcs-port 8443
IP Configuration
When deploying the Diode node, make sure to use the public IP address of your VM.
By following these steps and utilising the provided aliases, you can easily manage and monitor your lite node interface on Ubuntu 24.04. This setup provides a user-friendly way to keep track of your node’s performance and logs directly from the Linux CLI. You should have a screen like below.