Home / Guides / Monero node setup guide
Guide

Run a Monero node on a VPS.

Your own Monero node lets your wallet check transactions without trusting a remote node. This guide installs monerod on Ubuntu 24.04, as a pruned node or a full node, and runs it as a service.

What you need

  • A VECTOR plan or larger. A pruned node uses roughly 70 to 100 GB.
  • Choose Monero Node in the configurator and pick the pruned or full type. The right plan is selected for you.
  • Minimum plans are indicative. Check Monero's current requirements before ordering.
  • A pruned node validates everything and keeps about a third of the chain. Pruning cannot be undone without a full resync.

1. Update the server and create a user

Log in as root over SSH or the in-browser console, then update the system and create an unprivileged user for daily work. The node itself will run under its own service account, never as root.

Update and create an admin user
apt update && apt full-upgrade -y
adduser admin
usermod -aG sudo admin
rsync --archive --chown=admin:admin ~/.ssh /home/admin
# log out, then log back in as admin

2. Open only the port the node needs

Allow SSH and the Monero peer-to-peer port. Keep the RPC and API ports closed to the internet: they are not meant to face the public network.

Firewall
sudo apt install -y ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw allow 18080/tcp
sudo ufw enable
sudo ufw status

3. Add swap on small plans

Add swap (recommended on 4 GB plans)
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
free -h

4. Create the service account

Account, data and log directories
sudo useradd --system --create-home --home-dir /var/lib/monero --shell /usr/sbin/nologin monero
sudo install -d -o monero -g monero -m 750 /var/lib/monero /var/log/monero

5. Download and verify monerod

Download the command-line tools from getmonero.org. The project publishes a signed hash list; check the hash of your download against it, and verify the signature of that list using the signing key explained on the site.

Download
cd /tmp
wget -O monero.tar.bz2 https://downloads.getmonero.org/cli/linux64
wget https://www.getmonero.org/downloads/hashes.txt
Verify the hash (the line for linux64 must match)
sha256sum monero.tar.bz2
grep -i linux64 hashes.txt
Install
mkdir monero-bin && tar -xjf monero.tar.bz2 -C monero-bin --strip-components=1
sudo install -m 0755 -o root -g root -t /usr/local/bin monero-bin/monerod monero-bin/monero-wallet-cli
monerod --version

6. Configure

Peers connect on 18080. The RPC port 18081 listens on localhost only, and restricted-rpc limits what the RPC can do. For a full node, delete the prune-blockchain line.

/etc/monerod.conf (pruned)
sudo tee /etc/monerod.conf >/dev/null <<'EOF'
data-dir=/var/lib/monero
log-file=/var/log/monero/monerod.log
max-log-file-size=10485760
prune-blockchain=1
sync-pruned-blocks=1
p2p-bind-ip=0.0.0.0
p2p-bind-port=18080
rpc-bind-ip=127.0.0.1
rpc-bind-port=18081
restricted-rpc=1
out-peers=32
in-peers=64
limit-rate-up=2048
EOF

7. Run it with systemd

/etc/systemd/system/monerod.service
sudo tee /etc/systemd/system/monerod.service >/dev/null <<'EOF'
[Unit]
Description=Monero daemon
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/local/bin/monerod --config-file=/etc/monerod.conf --non-interactive
User=monero
Group=monero
Type=simple
Restart=on-failure
TimeoutStopSec=120
PrivateTmp=true
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now monerod
sudo systemctl status monerod --no-pager

8. Check sync

The node is synced when synchronized is true.

Status
curl -s http://127.0.0.1:18081/get_info | grep -E '"height"|"target_height"|"synchronized"|"database_size"|"outgoing_connections_count"'
tail -n 20 /var/log/monero/monerod.log

9. Connect your wallet

  • In a wallet that supports a custom node, add 127.0.0.1:18081 through an SSH tunnel: ssh -L 18081:127.0.0.1:18081 admin@YOUR-SERVER-IP.
  • Keep wallet keys on your own device. The node does not need them.
  • Do not open port 18081 to the internet unless you intend to run a public remote node and understand the exposure.

Running a full node instead

Remove prune-blockchain=1 and sync-pruned-blocks=1 from the config before the first start, and order a TITAN plan. A full node can serve complete history to other peers.

FAQ

Common questions

Pruned or full: which should I choose?

Pruned for your own wallets. Full if you want to serve complete history to other peers and have the disk for it.

Can I switch from pruned to full later?

Not in place. Pruning is irreversible without resyncing from scratch.

Which ports are used?

18080/tcp for peers. 18081 is RPC and stays on localhost.

Is the node anonymous?

Running your own node stops you leaking which transactions you look up. Your server's IP address is still visible to peers, so consider Tor if that matters.

How much bandwidth does it use?

The first sync downloads the chain once. Afterwards, expect modest ongoing traffic, which you can limit with limit-rate-up.

Keep reading

Related pages

Blockchain node setup guide

How to run your own blockchain node on a VPS from scratch: choose a plan, secure the server, verify downloads, run a systemd service and check sync.

Read more →

Pay for hosting with Monero: a practical guide

How to pay a VPS invoice with Monero: getting XMR, sending the exact amount, confirmations and common mistakes.

Read more →

VPS hardening checklist: secure a new Linux server in 15 minutes

A practical checklist for a new Linux VPS: SSH keys, a non-root user, firewall, automatic updates and backups, with the commands.

Read more →

Encrypt a VPS with LUKS and unlock it remotely over SSH

Step-by-step: full-disk encryption on a Debian or Ubuntu VPS with LUKS and dropbear in the initramfs for remote unlock.

Read more →

Order a server with the right plan preselected.

Open the configurator