Monero Node Administration & Maintenance Guide
1. Checking for Duplicate Files and File Usage
-
Find duplicate files by name (search for specific file names):
find / -type f \( -name "output0.csv" -o -name "output1.csv" \) 2>/dev/null - Check file disk usage (with depth level, e.g., 1 for directory contents):
du -h --max-depth=1 /path/to/dir
2. Open Ports and What Services They Listen To
-
Check for open ports and the services they listen to (view listening ports and active connections):
- Find which services are using specific ports (e.g., port 18080):
lsof -i :18080 - Check if specific ports are open (e.g., 18080 or 22):
netstat -tuln | grep 18080 - List open ports with
ss
(useful alternative tonetstat
):
ss -tuln
3. Checking iptables and UFW Rules
iptables Commands:
-
View iptables rules:
iptables -L -
View specific chain rules (e.g., INPUT chain):
- Show a specific port's status in iptables (e.g., port 22 or 18080):
iptables -L INPUT -n --line-numbers | grep -E '22|18080' - View specific rules in a named chain (e.g.,
ts-input
):
iptables -L ts-input -n --line-numbers - Delete an iptables rule (e.g., delete rule number 3 in the INPUT chain):
iptables -D INPUT 3 -
List all iptables rules including the ones set by UFW:
- ufw (Uncomplicated Firewall):
ufw status - Enable UFW:
ufw enable - Allow incoming traffic on port 18080 (for Monero node):
ufw allow 18080/tcp - Check UFW status and rules:
ufw status verbose - Disable UFW (if necessary):
ufw disable
4. Network and Firewall Troubleshooting
-
Check IP routing or address information:
ip a - Check active connections and the state of the ports:
ss-tuln
5. Commands for Managing Services and Systemd
-
Check the status of a service (e.g., monerod):
systemctl status monerod - Stop a service (e.g., monerod):
systemctl stop monerod -
Start a service (e.g., monerod):
- Enable a service to start on boot (e.g., monerod):
systemctl enable monerod - Disable a service from starting on boot:
systemctl disable monerod
6. Mail Setup (msmtp, Mailutils)
-
Send a test email using msmtp:
echo "Test email" | msmtp --debug user@example.com - Check mail logs for issues (e.g., for msmtp sending failures):
cat /var/log/mail.log - Configure msmtp for sending emails (via SMTP): Edit the
~/.msmtprc
file to include the email credentials and SMTP server details.
7. Directory and File Clean-Up
-
Remove directories and files (e.g., remove
.bitmonero
):
rm -rf /path/to/directory -
Delete unnecessary files (e.g., log files):
8. System Information and Disk Usage
-
Show system disk usage:
- View detailed file sizes in directories:
du -sh /path/to/directory - Show the current system resource usage:
top
9. Miscellaneous Useful Commands
-
Check the current kernel version:
uname -r - Search for a specific string in files:
grep "search_string" /path/to/file - View the contents of a file:
cat /path/to/file
10. File Transfer Commands
-
Transfer files via SCP (e.g., from your Pi to local):
scp root@your_pi_ip:/path/to/file /local/destination - Transfer files via SCP with wildcards:
scp root@your_pi_ip:/path/to/files/* /local/destination/ - Transfer files via SCP from Pi to Mac (Mac uses a similar approach to Linux for SCP):
scp 'root@your_pi_ip:/path/to/file' ~/local/destination
Example:
scp 'root@192.168.1.155:/mnt/monero/wallets/nero*' ~/Downloads/
No comments to display
No comments to display