blog-contributions/opsec/monero2024/node.html

265 lines
10 KiB
HTML
Raw Normal View History

2024-07-25 12:23:36 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../../../../../assets/img/favicon.png">
<title>Monero Node Setup</title>
<!-- Bootstrap core CSS -->
<link href="../../assets/css/bootstrap.css" rel="stylesheet">
<link href="../../assets/css/xt256.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="../../assets/css/main.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Static navbar -->
<div class="navbar navbar-inverse-anon navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand-anon" href="\index.html">nihilist`s Blog</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="/about.html">About</a></li>
<li><a href="/blog.html">Categories</a></li>
2024-08-12 23:22:38 +02:00
<li><a href="https://blog.nowhere.moe/donate.html">Donate</a></li>
2024-07-25 12:23:36 +02:00
<li><a href="/contact.html">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<!-- +++++ Posts Lists +++++ -->
<!-- +++++ First Post +++++ -->
<div id="anon2">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
2024-08-18 22:50:34 +02:00
<a href="../index.html">Previous Page</a></br></br><p><img src="../../assets/img/user.png" width="50px" height="50px"> <ba>nihilist@mainpc - 2024-01-31</ba></p>
2024-07-25 12:23:36 +02:00
<h1>Monero Node Setup </h1>
<img src="0.png" style="width:250px">
<p>In this tutorial we're going to take a look at how to setup a monero node </p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /grey -->
<!-- +++++ Second Post +++++ -->
<div id="anon3">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Initial Setup </b></h2>
<p>First install monero from the repositories:</p>
<pre><code class="nim">
2024-08-12 23:22:38 +02:00
[ nowhere.moe ] [ /dev/pts/0 ] [/srv/nowhere.moe]
2024-07-25 12:23:36 +02:00
→ apt install monero -y
2024-08-12 23:22:38 +02:00
[ nowhere.moe ] [ /dev/pts/0 ] [/srv/nowhere.moe]
2024-07-25 12:23:36 +02:00
→ vim /etc/systemd/system/moneronode.service
2024-08-12 23:22:38 +02:00
[ nowhere.moe ] [ /dev/pts/0 ] [/srv/nowhere.moe]
2024-07-25 12:23:36 +02:00
→ cat /etc/systemd/system/moneronode.service
[Unit]
Description=monerod
After=network.target
Wants=network.target
[Service]
ExecStart=/usr/bin/monerod --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist --data-dir /srv/XMR --block-sync-size=50 --out-peers 100 --prep-blocks-threads=128 --prune-blockchain --sync-pruned-blocks --rpc-bind-port=18081 --rpc-bind-ip=0.0.0.0 --p2p-bind-ip=0.0.0.0 --p2p-bind-port=18080 --confirm-external-bind --non-interactive
Restart=on-failure
RestartSec=10s
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
</code></pre>
<p>If you want to have a local-only monero node to use over tor, you can use this config instead:</p>
<pre><code class="nim">
[ Wonderland ] [ /dev/pts/9 ] [/mnt/md3]
→ cat /etc/systemd/system/moneronode.service
[Unit]
Description=monerod
After=network.target
Wants=network.target
[Service]
ExecStart=/usr/bin/monerod --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist --data-dir /mnt/md3/XMR --block-sync-size=50 --out-peers 100 --prep-blocks-threads=128 --prune-blockchain --sync-pruned-blocks --rpc-bind-port=18081 --rpc-bind-ip=127.0.0.1 --p2p-bind-ip=127.0.0.1 --p2p-bind-port=18080 --non-interactive
Restart=on-failure
RestartSec=10s
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
</pre></code>
<p>Then wait for it to sync after enabling the systemd service:</p>
<pre><code class="nim">
2024-08-12 23:22:38 +02:00
[ nowhere.moe ] [ /dev/pts/0 ] [/srv/nowhere.moe]
2024-07-25 12:23:36 +02:00
→ systemctl daemon-reload
2024-08-12 23:22:38 +02:00
[ nowhere.moe ] [ /dev/pts/0 ] [/srv/nowhere.moe]
2024-07-25 12:23:36 +02:00
→ systemctl enable --now moneronode
Created symlink /etc/systemd/system/multi-user.target.wants/moneronode.service → /etc/systemd/system/moneronode.service.
2024-08-12 23:22:38 +02:00
[ nowhere.moe ] [ /dev/pts/0 ] [/srv/nowhere.moe]
2024-07-25 12:23:36 +02:00
→ systemctl status moneronode
● moneronode.service - monerod
Loaded: loaded (/etc/systemd/system/moneronode.service; enabled; preset: enabled)
Active: active (running) since Sun 2023-07-09 15:36:44 CEST; 2min 22s ago
Main PID: 8410 (monerod)
Tasks: 30 (limit: 77000)
Memory: 1.7G
CPU: 1min 53.681s
CGroup: /system.slice/moneronode.service
└─8410 /usr/bin/monerod --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist --data-dir /srv/XMR --block-sync-size=50 --out-peers 100 --prep-blocks-threads=128 --prune-blockchain --sync-pruned-blocks --rpc-bind-port=18081 --rpc-bind-ip=0.0.0.0 ->
Jul 09 15:39:06 Datura monerod[8410]: 2023-07-09 13:39:06.055 I Synced 88702/2925934 (3%, 2837232 left)
Jul 09 15:39:06 Datura monerod[8410]: 2023-07-09 13:39:06.188 I Synced 88752/2925934 (3%, 2837182 left)
Jul 09 15:39:06 Datura monerod[8410]: 2023-07-09 13:39:06.310 I Synced 88802/2925934 (3%, 2837132 left)
Jul 09 15:39:06 Datura monerod[8410]: 2023-07-09 13:39:06.452 I Synced 88852/2925934 (3%, 2837082 left)
Jul 09 15:39:06 Datura monerod[8410]: 2023-07-09 13:39:06.576 I Synced 88902/2925934 (3%, 2837032 left)
Jul 09 15:39:06 Datura monerod[8410]: 2023-07-09 13:39:06.756 I Synced 88952/2925934 (3%, 2836982 left)
Jul 09 15:39:06 Datura monerod[8410]: 2023-07-09 13:39:06.890 I Synced 89002/2925934 (3%, 2836932 left)
Jul 09 15:39:07 Datura monerod[8410]: 2023-07-09 13:39:07.060 I Synced 89052/2925934 (3%, 2836882 left)
Jul 09 15:39:07 Datura monerod[8410]: 2023-07-09 13:39:07.182 I Synced 89088/2925934 (3%, 2836846 left)
Jul 09 15:39:07 Datura monerod[8410]: 2023-07-09 13:39:07.376 I Synced 89138/2925934 (3%, 2836796 left)
</code></pre>
<p>On a SSD it may take 1 day, and weigh approximately 60 gigs as of writing this tutorial. The synchronisation is a very disk-intensive process, and so it is required to do it on a nvme disk or ssd at least. If you try to do that on a HDD it will take much, much longer. If you don't have a choice, sync it on a nvme somewhere and then rsync it to a server that has only HDDs.</p>
<img src="1.png" class="imgRz">
<p>Then allow the ports you want from ufw:</p>
<pre><code class="nim">
root@XMR:~# sudo ufw allow 18080
Rules updated
Rules updated (v6)
root@XMR:~# sudo ufw allow 18081
Rules updated
Rules updated (v6)
</code></pre>
2024-08-12 23:22:38 +02:00
<p>Once you've finished setting up your monero instance, make sure you have it listed on <a href="https://monero.fail">https://monero.fail</a> or on <a href="https://xmr.nowhere.moe">https://xmr.nowhere.moe</a>.</p>
2024-07-25 12:23:36 +02:00
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<div id="anon2">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h1>Onion Setup</h1>
<p>Once your monero node is synchronized, you can allow tor users to access it via a .onion link like so:</p>
<pre><code class="nim">
[ Wonderland ] [ /dev/pts/9 ] [~]
→ apt install tor
[ Wonderland ] [ /dev/pts/9 ] [~]
→ cat /etc/tor/torrc
HiddenServiceDir /var/lib/tor/monero-service/
HiddenServicePort 18080 127.0.0.1:18080
HiddenServicePort 18081 127.0.0.1:18081
[ Wonderland ] [ /dev/pts/9 ] [~]
→ systemctl restart tor@default
</pre></code>
<p>Then find your onion link right here:</p>
<pre><code class="nim">
[ Wonderland ] [ /dev/pts/9 ] [~]
→ cat /var/lib/tor/monero-service/hostname
uyjehlovjudh2wlvkp5a2seme5vgqc4o463atkv2ulsovloqrqw2icyd.onion
</pre></code>
<p>And then you can use it to connect to it via your monero wallet. as shown <a href="index.html">here</a></p>
<pre><code class="nim">
apt install monero -y
monero-wallet-cli
#follow the instructions to create your wallet
#synchronize it with this command:
set_daemon http://uyjehlovjudh2wlvkp5a2seme5vgqc4o463atkv2ulsovloqrqw2icyd.onion:18081 trusted
#then wait for the daemon to finish synchronizing, and type "refresh" regularly to make sure that it synchronizes with the node, expect to type that command a few times as tor connections are unstable at times.
refresh
status
</pre></code>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<!-- +++++ Footer Section +++++ -->
<div id="anonb">
<div class="container">
<div class="row">
<div class="col-lg-4">
<h4>Nihilism</h4>
<p>
Until there is Nothing left.
</p>
</div><!-- /col-lg-4 -->
<div class="col-lg-4">
<h4>My Links</h4>
<p>
2024-08-15 14:43:58 +02:00
<a target="_blank" rel="noopener noreferrer" href="http://blog.nowhere.moe/rss/feed.xml">RSS Feed</a><br/><a target="_blank" rel="noopener noreferrer" href="https://matrix.to/#/#nowheremoe:nowhere.moe">Matrix Chat</a><br/>
2024-07-25 12:23:36 +02:00
</p>
</div><!-- /col-lg-4 -->
<div class="col-lg-4">
<h4>About nihilist</h4>
2024-08-28 20:13:19 +02:00
<p style="word-wrap: break-word;"><u>Donate XMR:</u> 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8</p></br><p><u>Contact:</u> nihilist@contact.nowhere.moe (<a href="https://nowhere.moe/nihilist.pubkey">PGP</a>)</p>
2024-07-25 12:23:36 +02:00
</div><!-- /col-lg-4 -->
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
</body>
</html>