By following this guide, you’ll be able to:
-
Host your own Monero node on Linux Headless Gain full control over your blockchain access, improve privacy, and connect to it from any device on your local network or via VPN. (Also check Wireguard Tutorial)
-
Install a P2Pool node Participate in peer-to-peer mining, contribute to decentralization, and strengthen the network without relying on centralized pools.
-
Install and run XMRig Mine Monero directly from your own machine, efficiently using CPU resources, and connect to your P2Pool node for private, low-overhead mining.
Introduction: Mining for Privacy
Monero has always stood apart as a true financial privacy and digital sovereignty tool. Despite being banned or delisted from most centralized exchanges, Monero is still thriving thanks to a community that values freedom over convenience and transparency on their own terms, not someone else’s.
When you mine Monero, you’re doing more than earning coins. You’re actively strengthening one of the last truly decentralized and censorship-resistant blockchains in existence. Each hash you contribute helps secure the network against surveillance, centralization, and control. It’s a quiet act of digital resistance, a way to help preserve privacy as a public good.
In this guide, we’ll walk through how to set up a lightweight Monero miner using Proxmox, Ubuntu, xmrig, p2pool, and xmrvsbeast. The goal isn’t to maximize profits or compete with industrial farms, it’s to help decentralize the hashrate, support the network’s resilience, and keep the Monero ecosystem healthy.
You don’t need expensive gear, either. Even low-cost mini computers like the GMTK G3 Plus (~$120) or G3S (~$139) are more than capable of running an efficient Monero node and miner inside a Proxmox container. With just a few watts of power and some curiosity, you can help strengthen the network and participate in the broader movement for digital privacy.
Whether you’re running a home lab, experimenting with Proxmox containers, or just curious about privacy tech, this setup lets you contribute to Monero’s mission with minimal overhead and maximum impact.
Please keep in mind that this tutorial might suffer changes and be improved with time.
It’s highly recommended to work on a VM / CT and make use of snapshots, makes it easy to rollback if something breaks.
Download Monero
A single archive contains all you need to start using Monero (the full node and the wallet).
We recommend downloading Monero binaries directly from GitHub:
GUI is a graphical desktop wallet.
CLI is a commandline desktop wallet.
If you need more guidance check download Monero section on Monero website.
It is critical to verify the signature of downloaded archive.
Which version to download?
This tutorial considers you’re using a Linux Machine, in this case running an Ubuntu Server CT within Proxmox. So you would need to download the Linux, 64-bit Version of Monero, CLI Version.
You can use:
wget https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.4.5.tar.bz2
(replace with the latest version)
Then extract the archive:
tar -xjf monero-linux-x64-v0.18.4.5.tar.bz2
After extraction, move and change into the Monero standard directory:
mv monero-x86_64-linux-gnu-v0.18.4.5 /opt/monero
cd /opt/monero
All Monero binaries (including monerod) are located inside this folder.
Starting the Monero Node via CLI
./monerod --rpc-bind-ip 0.0.0.0 --rpc-bind-port 18081 --zmq-rpc-bind-ip 0.0.0.0 --zmq-rpc-bind-port 18083 --confirm-external-bind --detach
Now you should be able to connect and sync your wallet through your node IP Address :18081 locally for enhanced privacy. You can also use a VPN or Reverse Proxy to connect to it remotely.
Important Security Warning about 0.0.0.0
Binding services to 0.0.0.0 makes them listen on all network interfaces. This is required if you want other machines on your LAN to connect, but it also means anyone who can reach the machine can access the service.
Do NOT expose these ports to the public internet. Do NOT open or forward ports on your router. Do NOT rely on NAT as a security measure.
This setup is intended for local networks, VPNs, or SSH tunnels only. If you expose RPC or P2Pool ports publicly, anyone on the internet will be able to interact with your node.
Recommended command for P2Pool:
(Need to Install P2Pool first)
./monerod --rpc-bind-ip 0.0.0.0 \
--rpc-bind-port 18081 \
--zmq-pub tcp://0.0.0.0:18083 \
--out-peers 32 \
--in-peers 64 \
--add-priority-node=p2pmd.xmrvsbeast.com:18080 \
--add-priority-node=nodes.hashvault.pro:18080 \
--enable-dns-blocklist \
--enforce-dns-checkpointing \
--confirm-external-bind \
--detach
--out-peers 32 --in-peers 64 is needed to (1) have many connections to other nodes and (2) limit incoming connection count because it can grow uncontrollably and cause problems when it goes above 1000 (open files limit in Linux). If your network connection’s upload bandwidth is less than 10 Mbit, use --out-peers 8 --in-peers 16 instead.
--add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 is needed to have guaranteed good working nodes in your connected peers.
--enable-dns-blocklist is needed to ban known bad nodes
--enforce-dns-checkpointing is needed to combat the selfish mining attempts by malicious actors
Tweaks
Enable Huge Pages
Edit at the Host (Proxmox):
nano /etc/sysctl.conf
Example 2gb:
sysctl -w vm.nr_hugepages=1200
Recommended: 2 * number_of_CPU_cores ≈ number of 2MB HugePages
This takes up RAM, consider the available RAM on your machine.
Verify:
grep Huge /proc/meminfo
Add a Systemd to persist at boot
Create the service file
nano /etc/systemd/system/hugepages.service
Paste this:
[Unit]
Description=Set HugePages for RandomX
DefaultDependencies=no
Before=multi-user.target
[Service]
Type=oneshot
ExecStart=/sbin/sysctl -w vm.nr_hugepages=1200
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Reload systemd and enable the service
sudo systemctl daemon-reload
sudo systemctl enable hugepages.service
Test it
sudo systemctl start hugepages.service
grep Huge /proc/meminfo
You should see HugePages_Total = 1200.
Also enable on the CT, Options → Features:
keyctl=1
Download P2Pool
(on the same server where Monero Node is installed)
Download Command:
wget https://github.com/SChernykh/p2pool/releases/download/v4.13/p2pool-v4.13-linux-x64.tar.gz
(check for the latest version and replace with the new link)
Extract it:
tar -xzf p2pool-v4.13-linux-x64.tar.gz
Move and change into the P2Pool standard directory::
mv p2pool-v4.13-linux-x64 /opt/p2pool
cd /opt/p2pool
Inspect files (optional but recommended):
ls
Make the P2Pool binary executable:
chmod +x p2pool
Run P2Pool Node
The main wallet address starts with a 4 on mainnet
./p2pool --host 0.0.0.0 --wallet 43eYwDaSxFuNxax7nTJhXpjn6gBPDQTbmAnSf34asCgsUKtijsewhS2LsB2oGd4iT5CRXFnQ8uXyuGTNsQV89T9xUyK1Qik
(replace the wallet with your wallet real main address)
Binding to 0.0.0.0 allows anyone who can reach your server to access your P2Pool node.
Do not forward ports on your router or expose this to the public internet.
Use LAN-only, VPN, or SSH tunnels for safe remote access.
P2Pool Mini (alternative P2Pool mode, lightweight node, uses fewer resources)
./p2pool --host 0.0.0.0 --wallet 43eYwDaSxFuNxax7nTJhXpjn6gBPDQTbmAnSf34asCgsUKtijsewhS2LsB2oGd4iT5CRXFnQ8uXyuGTNsQV89T9xUyK1Qik --mini
(replace the wallet with your wallet real main address)
P2Pool Nano (smallest footprint, mainly for testing or very low-power devices)
./p2pool --host 0.0.0.0 --wallet 43eYwDaSxFuNxax7nTJhXpjn6gBPDQTbmAnSf34asCgsUKtijsewhS2LsB2oGd4iT5CRXFnQ8uXyuGTNsQV89T9xUyK1Qik --nano
(replace the wallet with your wallet real main address)
Download a Wallet Software
https://www.getmonero.org/downloads/
Mining with XMRIG
1. Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install git build-essential cmake libssl-dev libhwloc-dev libuv1-dev -y
2. Download and Build XMRig
cd /opt
sudo git clone https://github.com/xmrig/xmrig.git
cd xmrig
sudo mkdir build && cd build
sudo cmake ..
sudo make -j$(nproc)
3. Mining from a Remote xmrig
Run XMRig with P2Pool
./xmrig -o YOUR_P2POOL_NODE_IP:3333 -u YOUR_MONERO_WALLET_ADDRESS
Systemd Startup
To have your Monero node, P2Pool node, and XMRig miner start automatically at boot, you can create dedicated systemd service files.
1. Monero Service
Create the service file:
sudo nano /etc/systemd/system/monerod.service
Paste:
[Unit]
Description=Monero Full Node
After=network.target
[Service]
ExecStart=/opt/monero/monerod \
--rpc-bind-ip 0.0.0.0 \
--rpc-bind-port 18081 \
--zmq-rpc-bind-ip 0.0.0.0 \
--zmq-rpc-bind-port 18083 \
--out-peers 32 \
--in-peers 64 \
--add-priority-node=p2pmd.xmrvsbeast.com:18080 \
--add-priority-node=nodes.hashvault.pro:18080 \
--enable-dns-blocklist \
--enforce-dns-checkpointing \
--confirm-external-bind \
Restart=on-failure
LimitNOFILE=8192
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable monerod
sudo systemctl start monerod
sudo systemctl status monerod
2. P2Pool Service
Create the service file:
sudo nano /etc/systemd/system/p2pool.service
Paste (replace YOUR_WALLET_ADDRESS with your real address):
[Unit]
Description=Monero P2Pool Node
After=network.target monerod.service
[Service]
ExecStart=/opt/p2pool/p2pool \
--host 0.0.0.0 \
--wallet YOUR_WALLET_ADDRESS \
Restart=on-failure
LimitNOFILE=8192
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable p2pool
sudo systemctl start p2pool
sudo systemctl status p2pool
3. XMRig Miner Service
Create the service file:
sudo nano /etc/systemd/system/xmrig.service
Paste (replace YOUR_P2POOL_NODE_IP and YOUR_WALLET_ADDRESS):
[Unit]
Description=XMRig CPU Miner
After=network.target p2pool.service
[Service]
ExecStart=/opt/xmrig/build/xmrig \
-o YOUR_P2POOL_NODE_IP:3333 \
-u YOUR_WALLET_ADDRESS \
--donate-level 1
Restart=on-failure
Nice=10
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable xmrig
sudo systemctl start xmrig
sudo systemctl status xmrig
4. HugePages Service (Optional)
If you enabled HugePages for RandomX, create a service to persist the setting:
sudo nano /etc/systemd/system/hugepages.service
Paste:
[Unit]
Description=Set HugePages for RandomX
DefaultDependencies=no
Before=multi-user.target
[Service]
Type=oneshot
ExecStart=/sbin/sysctl -w vm.nr_hugepages=1200
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable hugepages
sudo systemctl start hugepages
grep Huge /proc/meminfo
Congratulations!
You’ve just set up a fully headless, self-hosted Monero mining stack on Linux, your ultimate “set it and forget it” solution.
Now you can:
-
Connect your smartphone or other devices on your network to your own Monero node.
-
Run XMRig on additional machines to contribute more hashpower.
-
Support the Monero community and help strengthen the network.
-
And, if you happen to have access to free or low-cost electricity, you might even see a little profit along the way.
Every hash you contribute makes the network stronger and more resilient.