Monero Mining on a VPS: Is It Profitable or Even Allowed?
Can you mine Monero on a VPS? RandomX hashrate math per vCPU, why it rarely covers the server cost, host rules, and better ways to support XMR.
In almost every case, mining Monero on a rented VPS loses money. A few virtual CPU cores produce a tiny share of the network's hashrate, so a month of mining usually earns a small fraction of what the server costs. Many hosts also ban sustained mining in their terms of service. The rest of this article shows the numbers so you can check them yourself, explains what changes when RandomX runs inside a virtual machine, and covers more useful things a VPS can do for Monero.
Why people try it
The idea makes sense at first. Monero's proof-of-work algorithm, RandomX, was built to favour general-purpose CPUs over GPUs and ASICs. A VPS is a CPU you can rent and pay for in XMR. So it seems like you could pay for the server with Monero, mine Monero back, and keep the difference.
The problem is the size of that difference, and the sign is usually negative.
How RandomX behaves inside a virtual machine
RandomX is sensitive to the hardware it runs on, and a VPS guest gets some of that hardware secondhand.
RAM decides which mode you can use. In "fast mode", RandomX uses a dataset of about 2 GB plus a 256 MB cache. With less memory than that, miners such as XMRig fall back to "light mode". Light mode needs only the cache but hashes several times slower. A 2 GB VPS is therefore still stuck in light mode before you even look at CPU speed.
L3 cache matters as much as core count. Each RandomX thread works best with about 2 MB of L3 cache. A vCPU is often one hyperthread of a physical core, and its cache is shared with the host and with other guests. A VPS with eight vCPUs does not mine like an eight-core desktop.
Some tuning isn't available to a guest. You can enable 2 MB huge pages inside a KVM guest with root access (vm.nr_hugepages), and that helps. 1 GB huge pages are often not exposed to guests. XMRig's MSR modification, which changes CPU prefetcher registers on bare metal, generally does not work in a VM because the hypervisor doesn't let guests write those registers.
Steal time counts. If the host node is busy, your vCPUs wait, and the wait shows up as lost hashrate. Our guide to measuring CPU steal time and oversold nodes shows how to see this happening.
You don't have to guess your hashrate. XMRig has an offline benchmark mode (xmrig --bench=1M) that runs a fixed amount of work and reports the result without connecting to a pool. Ask your host before running even that (see below).
The revenue math you can check yourself
Monero now has tail emission. Since mid-2022 each block pays a fixed 0.6 XMR plus transaction fees, and the target is one block every two minutes. That works out to about 720 blocks and about 432 XMR of new coins per day across the whole network.
Your expected share is simple:
XMR per day ≈ (your hashrate ÷ network hashrate) × 432
Network hashrate changes all the time. In recent years it has usually been in the single-digit GH/s range, so check a current block explorer or pool statistics page before you rely on any number here. The worked example below uses an assumed 5 GH/s network and an assumed 400–800 H/s per vCPU. These are illustrative assumptions, not measurements, and real vCPU performance varies a lot with the underlying hardware.
With those assumptions, every 1,000 H/s earns about 0.0026 XMR per month before pool fees.
| Plan (price) | vCPU / RAM | Mining mode | Assumed hashrate | Approx. XMR/month |
|---|---|---|---|---|
| €7.99/mo | 1 / 2 GB | Light mode only | Far below 400 H/s | Negligible |
| €14.99/mo | 2 / 4 GB | Fast mode fits | 800–1,600 H/s | 0.002–0.004 |
| €29.99/mo | 4 / 8 GB | Fast mode | 1,600–3,200 H/s | 0.004–0.008 |
| €59.99/mo | 8 / 16 GB | Fast mode | 3,200–6,400 H/s | 0.008–0.017 |
Multiply the right-hand column by the current XMR price. At a hypothetical €300 per XMR, the €59.99 plan earns roughly €2.50–€5 a month in the best case. To break even at the top of that range, XMR would need to trade at about €2,400. The smaller plans do worse.
Your server also stops running everything else. A VPS at 100% CPU around the clock has nothing left for the website, node or VPN you rented it for.
Will your host even allow it?
Check this before you check profitability. A lot of VPS providers ban cryptocurrency mining outright. Others ban "sustained 100% CPU usage", which has the same effect. There are good reasons: on shared infrastructure, one guest pinning its cores can slow down its neighbours, and mining processes are a common sign that a server has been compromised.
Don't assume a host that accepts crypto payments also allows crypto mining. Those are separate questions. Read the terms of service. If they don't mention mining, ask support directly and keep the answer. If you skip this step, the likely result is a suspended server, and with prepaid crypto billing you may not get a refund. It belongs on the same list as the other points in our guide on vetting a no-KYC VPS provider before you pay.
If you didn't start a miner, treat it as an incident
Unauthorized Monero miners are among the most common payloads dropped on hacked Linux servers. Attackers like them for the same reason legitimate miners do: RandomX runs well on ordinary CPUs and pays out in a private coin.
If you see a process you don't recognise holding your CPU near 100%, especially one with a generic name, outbound connections to mining pool ports, or new cron jobs and systemd units, assume the server is compromised. Killing the process is not enough. Follow a proper procedure like the one in how to detect, contain and rebuild a compromised VPS. Usually that means rebuilding from a clean image and rotating every credential the server held.
A note on mining privacy
Paying for a VPS anonymously does not make mining from it anonymous.
- Centralised pools see your server's IP address and your payout address, and they usually keep both.
- P2Pool, the decentralised pool, has no operator to trust. However, your wallet address is visible on its sidechain. P2Pool's own documentation recommends using a separate wallet for mining.
- Coinbase outputs behave differently from normal Monero transactions. Their amounts are not hidden, which gives an observer a bit more information about mining income.
None of this is a reason to panic. It just means "mined with Monero on a no-KYC server" is not the same as "untraceable".
Better ways to use a VPS for Monero
If your goal is to support the network or to use Monero more privately, these options work much better on a VPS than mining does:
Run a full node. A monerod node on a VPS gives your wallet a node you control instead of a public remote node that can see your connection's timing and IP address. It also adds a reachable peer to the network. The full setup, including firewall rules and private wallet access over WireGuard or Tor, is in our guide to running your own Monero node on a VPS. Storage is the main limit: a full unpruned blockchain needs more disk than small plans offer, so pruning is usually necessary.
Host P2Pool for your own hardware. If you mine at home on a desktop with good cooling and cheap electricity, the VPS can run monerod with P2Pool alongside it while your home machines point their miners at it. The hashing happens on hardware you already own, and the VPS does the always-on networking work it suits. Keep in mind that your home IP connects to that VPS, so this setup doesn't hide where the mining happens.
Benchmark and walk away. If you're curious, ask the host, run xmrig --bench=1M once, plug your result into the formula above, and you'll have your answer in about five minutes. That costs nothing, unlike a month of mining at a loss.
The short answer
Mining Monero on a VPS can work technically, but it is rarely worth the money and is often against the rules. RandomX does run inside a VM, but light mode on small plans, shared L3 cache, and the lack of MSR tuning keep vCPU hashrates low. At typical network hashrates, even the largest plan here earns a fraction of its price.
If you want a server that helps you use Monero, such as a private node, a P2Pool backend for your own miners, or just infrastructure you can pay for in XMR without an account tied to your identity, a VPS is a good fit for that. IronBalkans offers no-KYC KVM servers in Romania with full root access and billing in XMR, BTC or LTC. Size the plan for the node or service you actually want to run, not for hashrate.
