{"id":250,"date":"2025-11-22T10:13:25","date_gmt":"2025-11-22T10:13:25","guid":{"rendered":"https:\/\/haco.club\/?p=250"},"modified":"2025-11-22T10:13:25","modified_gmt":"2025-11-22T10:13:25","slug":"how-to-reset-zerotier-moon-node","status":"publish","type":"post","link":"https:\/\/haco.club\/?p=250","title":{"rendered":"How to reset ZeroTier moon node"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">ZeroTier Installation<\/h2>\n\n\n\n<p>ZeroTier provides a script that detects your OS, adds the correct GPG keys and repositories, and installs the package for you.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Install curl (if missing):\nsudo apt update &amp;&amp; sudo apt install curl -y\n# Run the install script:\ncurl -s https:\/\/install.zerotier.com | sudo bash\n# Check Status:\nsudo zerotier-cli status\n# Enable on Boot:\nsudo systemctl enable zerotier-one<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Deorbit obsolete Moon Node<\/h2>\n\n\n\n<p>To check if your client is connected to a Moon node and to remove it (&#8220;de-orbit&#8221;), follow these steps.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo zerotier-cli listpeers<\/code><\/pre>\n\n\n\n<p><strong>What to look for:<\/strong><br>Scan the&nbsp;<strong>Role<\/strong>&nbsp;column in the output.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PLANET: These are the official ZeroTier root servers.<\/li>\n\n\n\n<li>LEAF: These are regular peers (other computers in your network).<\/li>\n\n\n\n<li>MOON:\u00a0<strong>This is your Moon node.<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Run the deorbit command:\n# (Replace deadbeef00 with the 10-character ID you saw in the check step above)\nsudo zerotier-cli deorbit deadbeef00\n\n# Verify\n# (The Role for that ID should either disappear from the list entirely or change from MOON back to LEAF (if it is also a regular member of your network)\nsudo zerotier-cli listpeers<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up Moon Node<\/h2>\n\n\n\n<p>Setting up a ZeroTier &#8220;Moon&#8221; node allows you to create your own user-defined root server. This helps reduce latency and adds redundancy if your connection to the official ZeroTier root servers is slow or unstable.<\/p>\n\n\n\n<p>Here is the step-by-step guide to setting up a Moon node on a Linux server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A Linux server (Ubuntu, Debian, CentOS, etc.)<\/li>\n\n\n\n<li>A\u00a0<strong>static IP address<\/strong>\u00a0(publicly accessible if your clients are over the internet; internal if strictly for LAN).<\/li>\n\n\n\n<li>Port\u00a0<strong>9993\/UDP<\/strong>\u00a0allowed through your server&#8217;s firewall.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Firewall Rules<\/h3>\n\n\n\n<p>Ensure your cloud provider (AWS, DigitalOcean, etc.) and your OS firewall (ufw&nbsp;or&nbsp;iptables) allow traffic on&nbsp;<strong>UDP port 9993<\/strong>. If this port is blocked, clients will not be able to orbit the moon.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Generate the Moon Configuration<\/h3>\n\n\n\n<p>SSH into your server and switch to the ZeroTier directory.<\/p>\n\n\n\n<p>1\u3001<strong>Navigate to the ZeroTier home directory:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/lib\/zerotier-one<\/code><\/pre>\n\n\n\n<p>2\u3001<strong>Generate the configuration file:<\/strong><br>Use your node&#8217;s current identity to create a template JSON file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo zerotier-idtool initmoon identity.public >> moon.json<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Edit the Configuration<\/h3>\n\n\n\n<p>You must tell the Moon node what its own valid IP address is so other clients can find it.<\/p>\n\n\n\n<p>1\u3001<strong>Open\u00a0moon.json<\/strong>\u00a0with a text editor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vim moon.json<\/code><\/pre>\n\n\n\n<p>2\u3001<strong>Find the\u00a0stableEndpoints\u00a0section.<\/strong><br>It will likely look like\u00a0&#8220;stableEndpoints&#8221;: []. Change it to include your server&#8217;s IP address and the ZeroTier port (default is 9993).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Example: (Replace 203.0.113.10 with your server's actual static IP).\n\"roots\": &#91;\n  {\n    \"identity\": \"YOUR_IDENTITY_STRING_HERE\",\n    \"stableEndpoints\": &#91; \"203.0.113.10:9993\" ]\n  }\n],<\/code><\/pre>\n\n\n\n<p>3\u3001<strong>Save and exit<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Sign and Create the Moon File<\/h3>\n\n\n\n<p>Now you need to cryptographically sign the configuration to create the actual&nbsp;.moon&nbsp;file.<\/p>\n\n\n\n<p>1\u3001<strong>Run the generation command:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo zerotier-idtool genmoon moon.json<\/code><\/pre>\n\n\n\n<p>2\u3001<strong>Identify the new file:<\/strong><br>This will create a file named something like\u00a0000000deadbeef00.moon.<\/p>\n\n\n\n<p>The\u00a0deadbeef00\u00a0part (the last 10 characters) is your\u00a0<strong>Moon ID<\/strong>.<\/p>\n\n\n\n<p><strong>Write this ID down<\/strong>, you will need it to connect clients.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Install the Moon on the Server<\/h3>\n\n\n\n<p>For the server to act as a Moon, it must &#8220;install&#8221; this file into its own configuration folder.<\/p>\n\n\n\n<p>1\u3001<strong>Create the moons directory:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir moons.d<\/code><\/pre>\n\n\n\n<p>2\u3001<strong>Move the signed file:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mv 000000*.moon moons.d\/<\/code><\/pre>\n\n\n\n<p>3\u3001<strong>Restart the ZeroTier service:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart zerotier-one<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Connect Clients (Orbit)<\/h2>\n\n\n\n<p>To use this Moon node, your other devices (clients) need to &#8220;orbit&#8221; it.<\/p>\n\n\n\n<p>Run the following command on your client devices:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo zerotier-cli orbit &lt;Moon_ID> &lt;Moon_ID><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Note:<\/strong>\u00a0You usually type the ID twice. The first argument is the &#8220;World ID&#8221; (the moon), and the second is the &#8220;Root ID&#8221; (the specific server acting as the moon). In a single-server setup, these are identical.<\/li>\n\n\n\n<li><strong>Example:<\/strong>\u00a0If your file was\u00a0000000deadbeef00.moon, the ID is\u00a0deadbeef00.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo zerotier-cli orbit deadbeef00 deadbeef00<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Verification<\/h3>\n\n\n\n<p>To verify that your client is using the Moon node:<\/p>\n\n\n\n<p>Run the list peers command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo zerotier-cli listpeers<\/code><\/pre>\n\n\n\n<p>Look for your Moon&#8217;s ID in the list. Under the\u00a0<strong>&#8220;Role&#8221;<\/strong>\u00a0column, it should say\u00a0MOON\u00a0instead of\u00a0LEAF.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ZeroTier Installation ZeroTier provides a script that detects your OS, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[36,24],"class_list":["post-250","post","type-post","status-publish","format-standard","hentry","category-tutotial","tag-moonnode","tag-zerotier"],"_links":{"self":[{"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haco.club\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=250"}],"version-history":[{"count":1,"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":251,"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/posts\/250\/revisions\/251"}],"wp:attachment":[{"href":"https:\/\/haco.club\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haco.club\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haco.club\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}