Troubleshooting VPS Setup
Our documentation often refer to syntax annotated in <>
brackets. We use this expression for variables that are unique to each user (like path, local moniker, versions etcetra).
Any syntax in <>
brackets needs to be substituted with your correct name or version, without the <>
brackets. If you are unsure, please check our table of essential parameters and variables (opens in a new tab).
IPv6 troubleshooting
To monitor connectivity of your Exit Gateway, use results of probe testing displayed in harbourmaster.nymtech.net (opens in a new tab).
Incorrect Gateway Network Check
Nym operators community is working on a Nym version of tors good bad ISP table (opens in a new tab). There is no one solution fits all when it comes to connectivity setup. The operation of nym-node
will vary depending on your ISP and chosen system/distribution. While few machines will work out of the box, most will work after uisng our connectivity configuration guide, some need more adjustments.
Begin with the steps listed in Connectivity Test and Configuration chapter of the VPS setup page. If you still have a problem with the IPv6 connectivity try:
-
Nym operators community started an ISP table called Where to host your nym node?, check it out and add your findings!
-
Tor community created a helpful table of ISPs (opens in a new tab). Make sure your one is listed there as a "good ISP". If not, consider migrating!
-
Checkout your VPS dashboard and make sure your IPv6-public enabled.
-
If you are able to add IPv6 address
/64
range, do it.
- Search or ask your ISP for additional documentation related to IPv6 routing and ask them to provide you with
IPv6 IP address
andIPv6 IP gateway address
- For example Digital Ocean setup isn't the most straight forward, but it's well documented (opens in a new tab) and it works.
- Search for guides regarding your particular system and distribution. For Debian based distributions using
systemd
, some generic guides such as this one (opens in a new tab) or this one (opens in a new tab) work as well.
Network configuration
On modern Debian based Linux distributions, the network is configured by either Netplan (opens in a new tab) or ifup/ifdown (opens in a new tab) utilities. It is very easy to check which one you have.
- If you have the following folder
/etc/netplan
which has got a YAML file - you are likely to have Netplan. - If you have the following folder
/etc/network
and it is not empty - you are likely to have ifup/down.
Most contemporary Ubuntu/Debian distributions come with Netplan, however it is possible that your hosting provider is using a custom version of ISO. For example, Debian 12 (latest version as of June 2024) may come with ifup/down.
Nym operator community members have tested a VPS with Netplan and where in some cases nym-node --mode exit-gateway
was not routing IP packets properly even after running network_tunnel_manager.sh
script. We are working on a guide to setup Netplan configuration manually for such cases.
Configuration of ifup/ifdown is a bit simpler. If the network_tunnel_manager.sh
script doesn't do the job, open /etc/network/interfaces
file (research if your system uses a different naming for it) and configure it similarly to this:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address <YOUR_IPV4_ADDRESS>
netmask NETMASK
gateway <ISP_IPV4_GATEWAY>
iface eth0 inet6 static
accept_ra 0
address <YOUR_IPV6_ADDRESS>
netmask 64
gateway <ISP_IPV6_GATEWAY>
post-up /sbin/ip -r route add <YOUR_IPV6_GATEWAY> dev eth0
post-up /sbin/ip -r route add default via <YOUR_IPV6_GATEWAY>
Last two lines are particularly important as they enable IPv6 routing. You can find YOUR_IPV6_GATEWAY using your server's control panel. There is no single way to find the gateway, so please access your control panel to find yours or open a support ticket. Here is an example of how it looks on OVH (opens in a new tab).
Be extra careful editing this file since you may lock yourself out of the server. If it happens, you can always access the server via the hoster's VNC panel.
Once finished, save the file and reboot the server. Now, running ip a
command should return correct IPv4 and IPv6 addresses.
Finally re-run network_tunnel_manager.sh
script, following the steps in node IPv6 configuration chapter.
Other VPS troubleshooting
Virtual IPs and hosting via Google & AWS
For true internet decentralization we encourage operators to use diverse VPS providers instead of the largest companies offering such services. If for some reasons you have already running AWS or Google and want to setup a <NODE>
there, please read the following.
On some services (AWS, Google, etc) the machine's available bind address is not the same as the public IP address. In this case, bind --host
to the local machine address returned by $(curl -4 https://ifconfig.me)
, but that may not the public IP address to bond your <NODE>
in the wallet.
You can run ifconfig
command. For example, on a Google machine, you may see the following output:
ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460
inet 10.126.5.7 netmask 255.255.255.255 broadcast 0.0.0.0
...
The ens4
interface has the IP 10.126.5.7
. But this isn't the public IP of the machine, it's the IP of the machine on Google's internal network. Google uses virtual routing, so the public IP of this machine is something else, maybe 36.68.243.18
.
To find the right IP configuration, contact your VPS provider for support to find the right public IP and use it to bond your <NODE>
with the nym-api
via Nym wallet.
Self-hosted nodes
On self-hosted machine it's a bit more tricky. In that case as an operator you must be sure that your ISP allows for public IPv4 and IPv6 and then it may be a bit of playing around to find the right configuration. One way may be to bind your binary with the --host
flag to local address 127.0.0.1
and run echo "$(curl -4 https://ifconfig.me)"
to get a public address which you use to bond your Mix Node to nym-api
via Nym wallet.
It's up to you as a node operator to ensure that your public and private IPs match up properly.
Pruning Logs
Running a nym-node
as a standalone process or wrapped in a service can produce gigabytes of logs. Eventually your operation can malfunction due to the logs chewing up too much disk space or memory. Below are two scripts that can help you clean this up.
rm
is a powerful tool, without an easy way of revoking. If you need to extract or backup anything, do it now. Make sure you understand what you removing before you execute these commands.
1. See what's eating all your diskspace
sudo find /var -type f -printf "%s\t%p\n" | sort -n -r | head -n 20 | ls -lh
sudo find /var -type f -exec ls -lh {} + 2>/dev/null | sort -k 5 -n -r | head -n 20
sudo du -h --max-depth=1 /var
sudo du -h /var/log
2. Prune those logs
sudo rm -f /var/log/syslog.1
sudo rm -f /var/log/syslog
journalctl --disk-usage
sudo journalctl --vacuum-time=3d
sudo journalctl --vacuum-size=50M
3.Enforce log rotation
sudo logrotate --force /etc/logrotate.conf
sudo service rsyslog restart
4. Remove all old packages
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update
for snap in $(sudo snap list --all | awk '/disabled/{print $1, $3}'); do
sudo snap remove $snap
done