URnodes is a deployment and monitoring toolkit for running URnetwork provider nodes on Ubuntu 22.04 LTS servers. It automates setup, adds live Discord webhook reporting, and includes optional egress traffic enforcement (with shutdown) for data-capped environments like AWS.
📦 Ideal for VPS, cloud, or local VM setups — including support for residential deployments.
- 🔌 One-command installation of URnetwork provider scripts
- 📊 Egress traffic monitor using
vnstat
- 🛑 Automatic shutdown when traffic exceeds a configurable monthly limit
⚠️ Warning alerts via Discord when approaching limit- 🕒 Status pings every 2 hours to show current usage
- ✅ Startup webhook notification, including the current URnetwork
client_id
🖥️ Recommended OS: Ubuntu Server 22.04 LTS
💬 Make sure you have two Discord Webhook URLs ready for:
- Status + warning messages
- Shutdown alerts
git clone https://github.com/VKG7125/URnodes.git
cd URnodes
chmod +x bootstrap_node.sh
sudo ./bootstrap_node.sh
You will be prompted to:
- Enter a node number (e.g., 1, 2, etc.)
- Paste your Discord webhook URLs
- Confirm your TX limit and warning threshold (in MiB)
- Provide URnetwork auth code (from the website)
If you ever need to remove URnodes completely:
- Copy
uninstall_node.sh
to your VM and make it executable:chmod +x uninstall_node.sh sudo ./uninstall_node.sh
# Auto-detect your primary interface (e.g., eth0, ens3, ens1)
IFACE=$(ip route | awk '/default/ {print $5; exit}')
# Display monthly stats for that interface
vnstat -i "$IFACE" -m
Note: vnstat records in MiB not MB
sudo /usr/local/bin/egress_notify.sh
File | Description |
---|---|
bootstrap_node.sh |
Main setup script |
/usr/local/bin/shutdown_on_egress.sh |
Monitors usage, shuts down on cap breach, and notifies of impending breaching (e.g., 5 GB away from set cap) / shutdown to Discord |
/usr/local/bin/egress_notify.sh |
Sends status updates to Discord |
/usr/local/bin/startup_notify.sh |
Sends boot and client ID notifications |
- 🧠 Monthly data is tracked by vnstat using TX (egress) traffic on your default network interface (auto‑detected via the scripts)
- ⏱️ Cron jobs handle all regular checks:
- Every 5 min for shutdown checks
- Every 2 hours for status pings
- 🧵 Each node can have its own webhook and unique labeling
- 🔁 Optional: can be configured to reset traffic weekly
- ➕ Considering adding the ability to opt out of any of the three scripts during setup.
- 📶 If my machine has unlimited egress bandwidth, I just type an egregiously large number that will theoretically never be reached for the shutdown and warning caps
No problem! The scripts can also run on local VirtualBox or Docker VMs. Multipass was used in testing and developing this script. If you're not data capped, just ignore the shutdown feature. (Last Note) It’s still useful for logging and monitoring!
Created by VKG7125 for the URnetwork community. Pull requests, suggestions, and issues are welcome!
You can also DM me on Discord!