In this tutorial we're going to take a look at how to setup a monero node on a Ubuntu VM:
first install monero from the repositories:
[ Datura Network ] [ /dev/pts/0 ] [/srv/datura.network]
→ apt install monero -y
create the systemd service
[ Datura Network ] [ /dev/pts/0 ] [/srv/datura.network]
→ vim /etc/systemd/system/moneronode.service
[ Datura Network ] [ /dev/pts/0 ] [/srv/datura.network]
→ 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
Then enable it:
[ Datura Network ] [ /dev/pts/0 ] [/srv/datura.network]
→ systemctl daemon-reload
[ Datura Network ] [ /dev/pts/0 ] [/srv/datura.network]
→ systemctl enable --now moneronode
Created symlink /etc/systemd/system/multi-user.target.wants/moneronode.service → /etc/systemd/system/moneronode.service.
Then wait for it to sync:
[ Datura Network ] [ /dev/pts/0 ] [/srv/datura.network]
→ 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)
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.
First let's setup the required dependencies:
root@XMR:~# sudo ufw allow 18080
Rules updated
Rules updated (v6)
root@XMR:~# wget https://downloads.getmonero.org/linux64
--2021-12-07 17:46:09-- https://downloads.getmonero.org/linux64
Resolving downloads.getmonero.org (downloads.getmonero.org)... 157.185.175.107, 157.185.145.90
Connecting to downloads.getmonero.org (downloads.getmonero.org)|157.185.175.107|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://downloads.getmonero.org/cli/monero-linux-x64-v0.17.3.0.tar.bz2 [following]
--2021-12-07 17:46:10-- https://downloads.getmonero.org/cli/monero-linux-x64-v0.17.3.0.tar.bz2
Reusing existing connection to downloads.getmonero.org:443.
HTTP request sent, awaiting response... 200 OK
Length: 75791408 (72M) [application/octet-stream]
Saving to: 'linux64'
linux64 100%[======================================================================================================================>] 72.28M 505KB/s in 2m 29s
2021-12-07 17:48:39 (497 KB/s) - 'linux64' saved [75791408/75791408]
root@XMR:~# mkdir monero
root@XMR:~# tar -xjvf linux64 -C monero
root@XMR:~# cd monero
root@XMR:~/monero# cd monero-x86_64-linux-gnu-v0.17.3.0/
root@XMR:~/monero/monero-x86_64-linux-gnu-v0.17.3.0# ls -l
total 218860
-rw-r--r-- 1 root root 10083 Nov 30 22:07 ANONYMITY_NETWORKS.md
-rw-r--r-- 1 root root 2730 Nov 30 22:07 LICENSE
-rw-r--r-- 1 root root 44212 Nov 30 22:07 README.md
-rwxr-xr-x 1 root root 13548008 Nov 30 22:07 monero-blockchain-ancestry
-rwxr-xr-x 1 root root 12499760 Nov 30 22:07 monero-blockchain-depth
-rwxr-xr-x 1 root root 12569272 Nov 30 22:07 monero-blockchain-export
-rwxr-xr-x 1 root root 12927888 Nov 30 22:07 monero-blockchain-import
-rwxr-xr-x 1 root root 9722384 Nov 30 22:07 monero-blockchain-mark-spent-outputs
-rwxr-xr-x 1 root root 12529472 Nov 30 22:07 monero-blockchain-prune
-rwxr-xr-x 1 root root 12501264 Nov 30 22:07 monero-blockchain-prune-known-spent-data
-rwxr-xr-x 1 root root 12492048 Nov 30 22:07 monero-blockchain-stats
-rwxr-xr-x 1 root root 12515000 Nov 30 22:07 monero-blockchain-usage
-rwxr-xr-x 1 root root 8721000 Nov 30 22:07 monero-gen-ssl-cert
-rwxr-xr-x 1 root root 25978048 Nov 30 22:07 monero-gen-trusted-multisig
-rwxr-xr-x 1 root root 27279384 Nov 30 22:07 monero-wallet-cli
-rwxr-xr-x 1 root root 27732200 Nov 30 22:07 monero-wallet-rpc
-rwxr-xr-x 1 root root 23004560 Nov 30 22:07 monerod
root@XMR:~/monero/monero-x86_64-linux-gnu-v0.17.3.0# ./monerod
To add the monero commands to your PATH, do the following:
root@anonymity:~/monero/monero-x86_64-linux-gnu-v0.18.2.0# PATH=$PATH:$(pwd)
root@anonymity:~/monero/monero-x86_64-linux-gnu-v0.18.2.0# cd
root@anonymity:~# monerod --version
Monero 'Fluorine Fermi' (v0.18.2.0-release)
Now from here, the monerod daemon will start synchronizing with the network.
root@XMR:~/monero/monero-x86_64-linux-gnu-v0.17.3.0# ./monerod
2021-12-07 17:50:41.765 I Monero 'Oxygen Orion' (v0.17.3.0-release)
2021-12-07 17:50:41.765 I Initializing cryptonote protocol...
2021-12-07 17:50:41.765 I Cryptonote protocol initialized OK
2021-12-07 17:50:41.766 I Initializing core...
2021-12-07 17:50:41.767 I Loading blockchain from folder /root/.bitmonero/lmdb ...
2021-12-07 17:50:41.767 W The blockchain is on a rotating drive: this will be very slow, use an SSD if possible
2021-12-07 17:50:41.918 I Loading checkpoints
2021-12-07 17:50:41.918 I Core initialized OK
2021-12-07 17:50:41.918 I Initializing p2p server...
2021-12-07 17:50:41.919 I p2p server initialized OK
2021-12-07 17:50:41.919 I Initializing core RPC server...
2021-12-07 17:50:41.919 I Binding on 127.0.0.1 (IPv4):18081
2021-12-07 17:50:43.028 I core RPC server initialized OK on port: 18081
2021-12-07 17:50:43.029 I Starting core RPC server...
2021-12-07 17:50:43.029 I core RPC server started ok
2021-12-07 17:50:43.030 I Starting p2p net loop...
2021-12-07 17:50:44.030 I
2021-12-07 17:50:44.030 I **********************************************************************
2021-12-07 17:50:44.031 I The daemon will start synchronizing with the network. This may take a long time to complete.
2021-12-07 17:50:44.031 I
2021-12-07 17:50:44.031 I You can set the level of process detailization through "set_log <level|categories>" command,
2021-12-07 17:50:44.031 I where <level> is between 0 (no details) and 4 (very verbose), or custom category based levels (eg, *:WARNING).
2021-12-07 17:50:44.031 I
2021-12-07 17:50:44.031 I Use the "help" command to see the list of available commands.
2021-12-07 17:50:44.031 I Use "help <command>" to see a command's documentation.
2021-12-07 17:50:44.031 I **********************************************************************
2021-12-07 17:50:46.924 I [217.168.143.169:18080 OUT] Sync data returned a new top block candidate: 1 -> 2509762 [Your node is 2509761 blocks (7.6 years) behind]
2021-12-07 17:50:46.924 I SYNCHRONIZATION started
2021-12-07 17:50:47.704 I Synced 101/2509762 (0%, 2509661 left)
2021-12-07 17:50:48.003 I Synced 201/2509762 (0%, 2509561 left)
2021-12-07 17:50:48.270 I Synced 301/2509762 (0%, 2509461 left)
2021-12-07 17:50:48.489 I Synced 401/2509762 (0%, 2509361 left)
2021-12-07 17:50:48.737 I Synced 501/2509762 (0%, 2509261 left)
2021-12-07 17:50:49.404 I Synced 601/2509762 (0%, 2509161 left)
2021-12-07 17:50:49.747 I Synced 701/2509762 (0%, 2509061 left)
2021-12-07 17:50:50.105 I Synced 801/2509762 (0%, 2508961 left)
2021-12-07 17:50:50.466 I Synced 901/2509762 (0%, 2508861 left)
2021-12-07 17:50:50.812 I Synced 1001/2509762 (0%, 2508761 left)
2021-12-07 17:50:51.142 I Synced 1101/2509762 (0%, 2508661 left)
2021-12-07 17:50:51.478 I Synced 1201/2509762 (0%, 2508561 left)
2021-12-07 17:50:51.798 I Synced 1301/2509762 (0%, 2508461 left)
2021-12-07 17:50:52.106 I Synced 1401/2509762 (0%, 2508361 left)
2021-12-07 17:50:52.311 I Synced 1501/2509762 (0%, 2508261 left)
2021-12-07 17:50:52.486 I Synced 1601/2509762 (0%, 2508161 left)
2021-12-07 17:50:52.705 I Synced 1701/2509762 (0%, 2508061 left)
2021-12-07 17:50:53.052 I Synced 1801/2509762 (0%, 2507961 left)
2021-12-07 17:50:53.301 I Synced 1901/2509762 (0%, 2507861 left)
2021-12-07 17:50:53.486 I Synced 2001/2509762 (0%, 2507761 left)
[...]
2021-12-08 22:43:43.742 I Synced 2510440/2510616 (99%, 176 left, 99% of total synced, estimated 1.4 minutes left)
2021-12-08 22:43:54.585 I Synced 2510460/2510616 (99%, 156 left)
2021-12-08 22:44:05.633 I Synced 2510480/2510616 (99%, 136 left)
2021-12-08 22:44:16.890 I Synced 2510500/2510616 (99%, 116 left)
2021-12-08 22:44:29.678 I Synced 2510520/2510616 (99%, 96 left)
2021-12-08 22:44:38.997 I Synced 2510540/2510616 (99%, 76 left)
2021-12-08 22:44:50.386 I Synced 2510560/2510616 (99%, 56 left)
2021-12-08 22:45:00.147 I Synced 2510580/2510616 (99%, 36 left)
2021-12-08 22:45:10.336 I Synced 2510600/2510616 (99%, 16 left)
2021-12-08 22:45:20.776 I Synced 2510615/2510616 (99%, 1 left)
2021-12-08 22:45:21.325 I Synced 2510616/2510616
2021-12-08 22:46:17.775 I Synced 2510617/2510617
2021-12-08 22:46:17.776 I SYNCHRONIZED OK
2021-12-08 22:46:17.776 I
2021-12-08 22:46:17.776 I **********************************************************************
2021-12-08 22:46:17.776 I You are now synchronized with the network. You may now start monero-wallet-cli.
2021-12-08 22:46:17.776 I
2021-12-08 22:46:17.776 I Use the "help" command to see the list of available commands.
2021-12-08 22:46:17.776 I **********************************************************************
Now from there you can select the monero node's IP from the monero wallet, or simply choose a local node if you have a ssd and CPU:
In order to mine monero, let's use xmrig and the p2pool network:
[ 10.66.66.2/32 ] [ /dev/pts/13 ] [~]
→ yay -S p2pool-git
:: Checking for conflicts...
:: Checking for inner conflicts...
[Repo Make:2] rhash-1.4.2-1 cmake-3.22.1-1
[Aur:1] p2pool-git-1.0.r16.g2a3cd13-1
==> Remove make dependencies after install? [y/N] y
1 p2pool-git (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: PKGBUILD up to date, Skipping (1/0): p2pool-git
1 p2pool-git (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: p2pool-git
resolving dependencies...
looking for conflicting packages...
[ 10.66.66.2/32 ] [ /dev/pts/9 ] [~]
→ monerod --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist
[ 10.66.66.2/32 ] [ /dev/pts/13 ] [~/Documents/Github]
→ p2pool
P2Pool v1.4.0 (built with GCC/11.1.0 on Dec 11 2021)
Usage:
--wallet Wallet address to mine to. Subaddresses and integrated addresses are not supported!
--host IP address of your Monero node, default is 127.0.0.1
--rpc-port monerod RPC API port number, default is 18081
--zmq-port monerod ZMQ pub port number, default is 18083 (same port as in monerod's "--zmq-pub" command line parameter)
--stratum Comma-separated list of IP:port for stratum server to listen on
--p2p Comma-separated list of IP:port for p2p server to listen on
--addpeers Comma-separated list of IP:port of other p2pool nodes to connect to
--light-mode Don't allocate RandomX dataset, saves 2GB of RAM
--loglevel Verbosity of the log, integer number between 0 and 6
--config Name of the p2pool config file
--data-api Path to the p2pool JSON data (use it in tandem with an external web-server)
--stratum-api Enable /local/ path in api path for Stratum Server statistics
--no-cache Disable p2pool.cache
--no-color Disable colors in console output
--no-randomx Disable internal RandomX hasher: p2pool will use RPC calls to monerod to check PoW hashes
--help Show this help message
Example command line:
./p2pool --host 127.0.0.1 --rpc-port 18081 --zmq-port 18083 --wallet YOUR_WALLET_ADDRESS --stratum 0.0.0.0:3333 --p2p 0.0.0.0:37889
2021-12-11 18:54:36.8175 Log started
2021-12-11 18:54:36.8176 Log stopped
[ 10.66.66.2/32 ] [ /dev/pts/13 ] [~/Documents/Github]
→ p2pool --host 127.0.0.1 --wallet 447KnLGYbQrHD4npGPmqdGQ3ARqz9kgLLQfaYY9KDC7eUcyKfnwZtj1JLNSqQHKEudHNyuDeKLBbhWtPdS7SoVM54nWHw1b
2021-12-11 18:56:08.2917 Log started
2021-12-11 18:56:08.2918 P2Pool v1.4.0 (built with GCC/11.1.0 on Dec 11 2021)
2021-12-11 18:56:08.2920 SideChain network type = mainnet
2021-12-11 18:56:08.2920 SideChain using default config
2021-12-11 18:56:08.2920 SideChain pool name = default
2021-12-11 18:56:08.2920 SideChain block time = 10 seconds
2021-12-11 18:56:08.2920 SideChain min diff = 100000
2021-12-11 18:56:08.2921 SideChain PPLNS window = 2160 blocks
2021-12-11 18:56:08.2921 SideChain uncle penalty = 20%
2021-12-11 18:56:08.2921 SideChain generating consensus ID
2021-12-11 18:56:08.2921 SideChain consensus ID = 22af7ee7************************************************4407f918
2021-12-11 18:56:08.2921 RandomX_Hasher couldn't allocate RandomX dataset using large pages
2021-12-11 18:56:08.2921 RandomX_Hasher couldn't allocate RandomX cache using large pages
2021-12-11 18:56:08.2922 RandomX_Hasher couldn't allocate RandomX cache using large pages
2021-12-11 18:56:08.2922 RandomX_Hasher allocated 2592 MB
2021-12-11 18:56:08.2923 ConsoleCommands started
2021-12-11 18:56:08.4697 P2Pool new miner data
---------------------------------------------------------------------------------------------------------------
major_version = 14
height = 2512684
prev_id = 9e12d7a34b225e84a9febe1effcdbee003c956cc77c25cd7f6fb446e5ce2f4c4
seed_hash = 8954432e62d63ad320107fbdae7fdd8667c1d69391660cffd7f99b30d0592147
difficulty = 353157222750
median_weight = 300000
already_generated_coins = 18044465200878847465
transactions = 45
---------------------------------------------------------------------------------------------------------------
2021-12-11 18:56:08.4697 BlockTemplate base reward = 0.767286058102 XMR, 0 transactions, fees = 0.000000000000 XMR, weight = 0
2021-12-11 18:56:08.4697 RandomX_Hasher new seed 8954432e62d63ad320107fbdae7fdd8667c1d69391660cffd7f99b30d0592147
2021-12-11 18:56:08.4699 BlockTemplate final reward = 0.767286058102 XMR, weight = 126, outputs = 1, 0 of 0 transactions included
2021-12-11 18:56:08.4707 RandomX_Hasher old seed 72e85eed124de1b5098f779d89ca07c00ccf7de79f94fcc085e15bc2b45c6c73
2021-12-11 18:56:08.7374 RandomX_Hasher couldn't allocate RandomX light VM using large pages
2021-12-11 18:56:08.7374 RandomX_Hasher cache updated
2021-12-11 18:56:08.7374 RandomX_Hasher running 8 threads to update dataset
2021-12-11 18:56:12.3926 RandomX_Hasher couldn't allocate RandomX VM using large pages
2021-12-11 18:56:12.3927 RandomX_Hasher dataset updated
2021-12-11 18:56:12.6746 RandomX_Hasher couldn't allocate RandomX light VM using large pages
2021-12-11 18:56:12.6747 RandomX_Hasher old cache updated
2021-12-11 18:56:12.7170 StratumServer listening on [::]:3333
2021-12-11 18:56:12.7170 StratumServer listening on 0.0.0.0:3333
2021-12-11 18:56:12.7170 StratumServer event loop started
2021-12-11 18:56:12.7175 ZMQReader connected to tcp://127.0.0.1:18083
2021-12-11 18:56:12.7176 BlockCache loading cached blocks
2021-12-11 18:56:12.7177 ZMQReader connected to tcp://127.0.0.1:37891
2021-12-11 18:56:12.7177 ZMQReader worker thread ready
2021-12-11 18:56:12.7838 BlockCache loaded 0 cached blocks
2021-12-11 18:56:12.8336 P2PServer listening on [::]:37889
2021-12-11 18:56:12.8336 P2PServer listening on 0.0.0.0:37889
2021-12-11 18:56:12.8337 P2PServer event loop started
Now let's install xmrig:
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~]
→ mv Downloads/xmrig-6.16.2-linux-static-x64.tar.gz .
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~]
→ mkdir xmrig
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~]
→ mv xmrig-6.16.2-linux-static-x64.tar.gz xmrig/
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~]
→ cd xmrig
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ tar xvf xmrig-6.16.2-linux-static-x64.tar.gz
xmrig-6.16.2/
xmrig-6.16.2/config.json
xmrig-6.16.2/xmrig
xmrig-6.16.2/SHA256SUMS
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ ls -l
total 2912
drwxr-xr-x 2 nothing nothing 4096 Dec 2 14:05 xmrig-6.16.2
-rw-r--r-- 1 nothing nothing 2974083 Dec 11 19:02 xmrig-6.16.2-linux-static-x64.tar.gz
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ cd xmrig-6.16.2
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig/xmrig-6.16.2]
→ ls -l
total 6892
-rw-r--r-- 1 nothing nothing 2351 Dec 2 14:05 config.json
-rw-r--r-- 1 nothing nothing 150 Dec 2 14:05 SHA256SUMS
-rwxr-xr-x 1 nothing nothing 7047360 Dec 2 14:05 xmrig
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig/xmrig-6.16.2]
→ cd ..
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ mv xmrig-6.16.2/* .
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ ls -l
total 9804
-rw-r--r-- 1 nothing nothing 2351 Dec 2 14:05 config.json
-rw-r--r-- 1 nothing nothing 150 Dec 2 14:05 SHA256SUMS
-rwxr-xr-x 1 nothing nothing 7047360 Dec 2 14:05 xmrig
drwxr-xr-x 2 nothing nothing 4096 Dec 11 19:04 xmrig-6.16.2
-rw-r--r-- 1 nothing nothing 2974083 Dec 11 19:02 xmrig-6.16.2-linux-static-x64.tar.gz
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ rm xmrig-6.16.2-linux-static-x64.tar.gz
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ rm -rf xmrig-6.16.2
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ vim config.json
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ cat config.json
{
"api": {
"id": null,
"worker-id": null
},
"http": {
"enabled": false,
"host": "127.0.0.1",
"port": 0,
"access-token": null,
"restricted": true
},
"autosave": true,
"background": false,
"colors": true,
"title": true,
"randomx": {
"init": -1,
"init-avx2": -1,
"mode": "auto",
"1gb-pages": false,
"rdmsr": true,
"wrmsr": true,
"cache_qos": false,
"numa": true,
"scratchpad_prefetch_mode": 1
},
"cpu": {
"enabled": true,
"huge-pages": true,
"huge-pages-jit": false,
"hw-aes": null,
"priority": null,
"memory-pool": false,
"yield": true,
"max-threads-hint": 100,
"asm": true,
"argon2-impl": null,
"astrobwt-max-size": 550,
"astrobwt-avx2": false,
"cn/0": false,
"cn-lite/0": false
},
"opencl": {
"enabled": false,
"cache": true,
"loader": null,
"platform": "AMD",
"adl": true,
"cn/0": false,
"cn-lite/0": false
},
"cuda": {
"enabled": false,
"loader": null,
"nvml": true,
"cn/0": false,
"cn-lite/0": false
},
"donate-level": 0,
"donate-over-proxy": 1,
"log-file": null,
"pools": [
{
"algo": null,
"coin": null,
"url": "donate.v2.xmrig.com:3333",
"user": "YOUR_WALLET_ADDRESS",
"pass": "x",
"rig-id": null,
"nicehash": false,
"keepalive": false,
"enabled": true,
"tls": false,
"tls-fingerprint": null,
"daemon": false,
"socks5": null,
"self-select": null,
"submit-to-origin": false
}
],
"print-time": 60,
"health-print-time": 60,
"dmi": true,
"retries": 5,
"retry-pause": 5,
"syslog": false,
"tls": {
"enabled": false,
"protocols": null,
"cert": null,
"cert_key": null,
"ciphers": null,
"ciphersuites": null,
"dhparam": null
},
"user-agent": null,
"verbose": 0,
"watch": true,
"pause-on-battery": false,
"pause-on-active": false
}
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ ./xmrig
Now we need to add our wallet address and change the pool to be the p2pool address 127.0.0.1:3333
[ 10.66.66.2/32 ] [ /dev/pts/16 ] [~/xmrig]
→ nmap 127.0.0.1 -p 3333
Starting Nmap 7.92 ( https://nmap.org ) at 2021-12-11 19:10 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000054s latency).
PORT STATE SERVICE
3333/tcp open dec-notes
Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
[ 10.66.66.2/32 ] [ /dev/pts/16 ] [~/xmrig]
→ cat config.json
{
"api": {
"id": null,
"worker-id": null
},
"http": {
"enabled": false,
"host": "127.0.0.1",
"port": 0,
"access-token": null,
"restricted": true
},
"autosave": true,
"background": false,
"colors": true,
"title": true,
"randomx": {
"init": -1,
"init-avx2": -1,
"mode": "auto",
"1gb-pages": false,
"rdmsr": true,
"wrmsr": true,
"cache_qos": false,
"numa": true,
"scratchpad_prefetch_mode": 1
},
"cpu": {
"enabled": true,
"huge-pages": true,
"huge-pages-jit": false,
"hw-aes": null,
"priority": null,
"memory-pool": false,
"yield": true,
"asm": true,
"argon2-impl": null,
"astrobwt-max-size": 550,
"astrobwt-avx2": false,
"argon2": [0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15],
"astrobwt": [0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15],
"cn": [
[1, 0],
[1, 1],
[1, 2],
[1, 3],
[1, 4],
[1, 5],
[1, 6],
[1, 7]
],
"cn-heavy": [
[1, 0],
[1, 1],
[1, 2],
[1, 3]
],
"cn-lite": [
[1, 0],
[1, 8],
[1, 1],
[1, 9],
[1, 2],
[1, 10],
[1, 3],
[1, 11],
[1, 4],
[1, 12],
[1, 5],
[1, 13],
[1, 6],
[1, 14],
[1, 7],
[1, 15]
],
"cn-pico": [
[2, 0],
[2, 8],
[2, 1],
[2, 9],
[2, 2],
[2, 10],
[2, 3],
[2, 11],
[2, 4],
[2, 12],
[2, 5],
[2, 13],
[2, 6],
[2, 14],
[2, 7],
[2, 15]
],
"cn/upx2": [
[2, 0],
[2, 8],
[2, 1],
[2, 9],
[2, 2],
[2, 10],
[2, 3],
[2, 11],
[2, 4],
[2, 12],
[2, 5],
[2, 13],
[2, 6],
[2, 14],
[2, 7],
[2, 15]
],
"ghostrider": [
[8, 0],
[8, 1],
[8, 2],
[8, 3],
[8, 4],
[8, 5],
[8, 6],
[8, 7]
],
"rx": [0, 1, 2, 3, 4, 5, 6, 7],
"rx/wow": [0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15],
"cn-lite/0": false,
"cn/0": false,
"rx/arq": "rx/wow",
"rx/keva": "rx/wow"
},
"log-file": null,
"donate-level": 1,
"donate-over-proxy": 1,
"pools": [
{
"algo": null,
"coin": null,
"url": "127.0.0.1:3333",
"user": "447KnLGYbQrHD4npGPmqdGQ3ARqz9kgLLQfaYY9KDC7eUcyKfnwZtj1JLNSqQHKEudHNyuDeKLBbhWtPdS7SoVM54nWHw1b",
"pass": "x",
"rig-id": null,
"nicehash": false,
"keepalive": false,
"enabled": true,
"tls": false,
"tls-fingerprint": null,
"daemon": false,
"socks5": null,
"self-select": null,
"submit-to-origin": false
}
],
"retries": 5,
"retry-pause": 5,
"print-time": 60,
"dmi": true,
"syslog": false,
"tls": {
"enabled": false,
"protocols": null,
"cert": null,
"cert_key": null,
"ciphers": null,
"ciphersuites": null,
"dhparam": null
},
"dns": {
"ipv6": false,
"ttl": 30
},
"user-agent": null,
"verbose": 0,
"watch": true,
"pause-on-battery": false,
"pause-on-active": false
}
[ 10.66.66.2/32 ] [ /dev/pts/15 ] [~/xmrig]
→ ./xmrig -o 127.0.0.1:3333
[term2]
[ 10.66.66.2/32 ] [ /dev/pts/7 ] [blog/servers/exodus]
→ watch -n 0.1 sensors
And that's it! We managed to start mining on the p2pool using xmrig, by default it is using half of the CPU. To summarize, here's the commands you want to run:
monerod --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist
p2pool --host 127.0.0.1 --wallet 447KnLGYbQrHD4npGPmqdGQ3ARqz9kgLLQfaYY9KDC7eUcyKfnwZtj1JLNSqQHKEudHNyuDeKLBbhWtPdS7SoVM54nWHw1b
sudo ./xmrig -o 127.0.0.1:3333
watch -n 0.1 sensors
htop
EDIT: run xmrig with SUDO privileges, to enable msr support see here. It nearly doubles the hashrate!!!
EDIT: if you want to mine from another location (for example another drive with more space)
monerod --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist --data-dir /mnt/VAULT/XMR
p2pool --host 127.0.0.1 --wallet 447KnLGYbQrHD4npGPmqdGQ3ARqz9kgLLQfaYY9KDC7eUcyKfnwZtj1JLNSqQHKEudHNyuDeKLBbhWtPdS7SoVM54nWHw1b
sudo ./xmrig -o 127.0.0.1:3333
watch -n 0.1 sensors
htop
If you want to make it a tmux session automatically, you can put it in your bashrc/ zshrc like so ((careful i added my custom location /mnt/VAULT/XMR/ in here):
xmr(){
num=$(tmux list-sessions | grep XMR | wc -l)
# set up tmux
#tmux start-server
set -g mouse on
# create a new tmux session, starting vim from a saved session in the new window
#tmux kill-session -t $session 2>/dev/null
#tmux new -d -s $session -n Blog -y 100 -x 200
if [ "$num" -eq "0" ]; then
tmux rename-session XMR
#tmux rename-window -t 0 'BlogDir'
tmux splitw -h -p 50
#second pane : monerod
tmux selectp -t 2
tmux send-keys "cd /mnt/VAULT/XMR/" C-m
tmux send-keys "monerod --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist --data-dir /mnt/VAULT/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" C-m
sleep 2
#after 5 secs, first pane: p2pool
tmux selectp -t 1
tmux send-keys "p2pool --host 127.0.0.1 --wallet 447KnLGYbQrHD4npGPmqdGQ3ARqz9kgLLQfaYY9KDC7eUcyKfnwZtj1JLNSqQHKEudHNyuDeKLBbhWtPdS7SoVM54nWHw1b" C-m
#select 2nd pane, split vertically
tmux selectp -t 2
tmux splitw -v -p 50
tmux send-keys "cd /mnt/VAULT/XMR/xmrig" C-m
tmux send-keys "sudo ./xmrig -o 127.0.0.1:3333 -t 4 --cpu-priority=0 -u x+10000" C-m
#select 3rd pane, split vertically
tmux selectp -t 3
tmux splitw -v -p 50
tmux send-keys "htop" C-m
#select 2nd pane, split horizontally, displaying sensors
tmux selectp -t 2
tmux splitw -h -p 50
tmux send-keys "watch -n0.1 sensors" C-m
#select 2nd pane, split horizontally, displaying sensors
tmux selectp -t 3
tmux splitw -v -p 50
tmux send-keys "watch -n0.1 dfc" C-m
tmux selectp -t 5
#ctrl+b+q to show the tmux pane numbers
else
if [[ $TMUX ]]; then
tmux switch -t XMR
else
tmux attach -t XMR -d
fi
fi
}
If you want to run a simple node on a debian server, you can use the following systemd service (in this example the node is stored in /srv/XMR/:
[ 10.8.0.2/24 ] [ home ] [~]
→ 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
Until there is Nothing left.
Donate XMR: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8
Contact: nihilist@nihilism.network (PGP)