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 →Updated 2026-11-11 · Published by AnonVPS
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.
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 adminAllow 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.
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 statussudo 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 -hsudo 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/moneroDownload 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.
cd /tmp
wget -O monero.tar.bz2 https://downloads.getmonero.org/cli/linux64
wget https://www.getmonero.org/downloads/hashes.txtsha256sum monero.tar.bz2
grep -i linux64 hashes.txtmkdir 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 --versionPeers 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.
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
EOFsudo 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-pagerThe node is synced when synchronized is true.
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.log127.0.0.1:18081 through an SSH tunnel: ssh -L 18081:127.0.0.1:18081 admin@YOUR-SERVER-IP.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.
Pruned for your own wallets. Full if you want to serve complete history to other peers and have the disk for it.
Not in place. Pruning is irreversible without resyncing from scratch.
18080/tcp for peers. 18081 is RPC and stays on localhost.
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.
The first sync downloads the chain once. Afterwards, expect modest ongoing traffic, which you can limit with limit-rate-up.
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 →How to pay a VPS invoice with Monero: getting XMR, sending the exact amount, confirmations and common mistakes.
Read more →A practical checklist for a new Linux VPS: SSH keys, a non-root user, firewall, automatic updates and backups, with the commands.
Read more →Step-by-step: full-disk encryption on a Debian or Ubuntu VPS with LUKS and dropbear in the initramfs for remote unlock.
Read more →