Nodes welcome · NVMe sized for the chain · no KYC. Pay in crypto: BTC, USDT, USDC, ETH, SOL, LTC, XMR
Language: English
Pick a block

Guide · checked 10 November 2026

How to secure a VPS for a crypto node or bot?

A node or a bot server needs a short list of open ports, key-only SSH and automatic security updates. The work takes about half an hour.

Last updated: · 8 min read

Quick answer

How to secure a VPS for a crypto node or bot?

To secure a VPS for a crypto node or bot, log in with an SSH key only, turn off root and password login, set the ufw firewall to deny all inbound traffic except SSH and your node’s peer ports, add fail2ban and turn on automatic updates. A Blockgilt node server needs 4 open ports at most.

In brief
  • Log in with an SSH key only: PasswordAuthentication no, PermitRootLogin no.
  • ufw: deny inbound by default, limit 22/tcp, allow 8333, 9735 and 18080 as needed.
  • RPC and admin ports (8332, 18081, 8080) stay on localhost.
  • Docker published ports go around ufw: bind them to 127.0.0.1.
  • Seeds, channel backups and bot configs live off the server; bot API keys cannot withdraw.

Which ports should a crypto VPS open?

Ports a crypto VPS should open or keep on localhost, by service
ServicePortOpen to the internet?
SSH22/tcpYes, rate-limited by ufw
Bitcoin P2P8333/tcpYes, if you run a Bitcoin node
Lightning P2P9735/tcpYes, if you accept channels
Monero P2P18080/tcpYes, if you run a Monero node
Bitcoin RPC8332/tcpNo: localhost or SSH tunnel only
Monero unrestricted RPC18081/tcpNo: localhost only
Freqtrade web interface8080/tcpNo: localhost and SSH tunnel

Peer ports from the service description of Blockgilt; RPC advice from the Bitcoin Core, Monero and Freqtrade documentation.

What are the steps to secure a crypto VPS?

Do the steps in this order and keep your first SSH session open until the last test passes.

  1. Update the system

    Install pending security updates before anything else runs.

  2. Create a non-root user with sudo

    Give it your public key so you never log in as root again.

  3. Harden sshd

    Turn off password login and root login with a drop-in file, test the configuration, restart the service and open a second session to confirm.

  4. Set the firewall

    Deny inbound traffic by default, rate-limit SSH, then allow only the peer ports of your node.

  5. Keep RPC and admin ports on localhost

    Bitcoin, Monero and bot interfaces must not listen on a public address. Reach them through an SSH tunnel.

  6. Add fail2ban for SSH

    Install it and enable the sshd jail so repeated failures are banned.

  7. Turn on automatic security updates

    Install unattended-upgrades and answer yes to automatic stable updates.

  8. Protect secrets and backups

    Keep seeds off the server, give bots API keys without withdrawal rights and copy channel backups elsewhere.

How do you update the system and create a non-root user?

You run the package update, then create a sudo user and copy your public key to it. You get root over SSH. Paste a public key at checkout and password login stays disabled; leave it blank and the team sets a one-time root password, shown in your dashboard, that you change on first login, so the key you pasted at checkout already works for root; give the same key to a normal user and stop using root.

As root, first login
apt update
apt upgrade
adduser deploy
usermod -aG sudo deploy
install -d -m 700 -o deploy -g deploy /home/deploy/.ssh
cp /root/.ssh/authorized_keys /home/deploy/.ssh/authorized_keys
chown deploy:deploy /home/deploy/.ssh/authorized_keys

Open a second terminal and run ssh [email protected] to check the login and sudo -v to check the rights. Do not continue before both work.

How do you disable password and root login over SSH?

You write a drop-in file with PasswordAuthentication no and PermitRootLogin no, test it, and restart sshd.

/etc/ssh/sshd_config.d/00-hardening.conf
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin no
PubkeyAuthentication yes
AllowUsers deploy
MaxAuthTries 3
Test, then restart
sudo sshd -t
sudo sshd -T | grep -Ei 'passwordauthentication|permitrootlogin|allowusers'
sudo systemctl restart ssh

sshd -t checks the file and -T prints the effective configuration. The service is named ssh on Debian and Ubuntu. Keep your current session open and confirm in a new one that key login still works.

How do you set up the ufw firewall for a node?

You set the default policy to deny inbound traffic, allow SSH with a rate limit, then open the peer ports of the node you run. According to Blockgilt’s sizing of 10 November 2026, a Bullion or Sovereign server running Bitcoin, Lightning and Monero nodes together needs 3 peer ports plus SSH, so 4 inbound rules cover it. Inbound P2P ports stay open, so a node can accept peers: 8333 for Bitcoin, 9735 for Lightning, 18080 for Monero, and any port you open in your own firewall.

The ufw manual says a limit rule denies an address that tries 6 or more connections within 30 seconds, and that enabling ufw may drop existing SSH connections, so allow SSH first.

ufw
sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw limit 22/tcp
sudo ufw allow 8333/tcp
sudo ufw allow 9735/tcp
sudo ufw allow 18080/tcp
sudo ufw enable
sudo ufw status verbose

Keep only the lines for the nodes you run. A node reached over a Tor onion service for your own node needs no inbound peer port. How to run a Bitcoin node on a VPS covers 8333.

Why must RPC and admin ports stay on localhost?

RPC ports give control of the node or the bot, and none of these projects hardens them for the public internet. Bitcoin Core’s documentation says plainly: do not enable RPC connections over the public Internet. Monero’s unrestricted RPC listens on 127.0.0.1 by default because it gives full administrative capabilities, and Freqtrade’s documentation recommends an SSH tunnel or a VPN for its web interface.

Docker’s documentation states that ports published by containers are not filtered by your firewall rules, so a ufw deny does not protect a container started with a bare -p 8080:8080. Publish container ports on the loopback address, as the Freqtrade compose file does with 127.0.0.1:8080:8080, and use a tunnel such as ssh -N -L 8080:127.0.0.1:8080 [email protected].

How do you add fail2ban and automatic updates?

You install fail2ban, enable its sshd jail in a local file, and install unattended-upgrades. The fail2ban defaults ban an address for 10 minutes after 5 failures in 10 minutes; customizations go in jail.local, never in jail.conf, and all jails are disabled by default, so enabled = true matters.

fail2ban
sudo apt install fail2ban
sudo tee /etc/fail2ban/jail.local <<'EOF'
[sshd]
enabled = true
EOF
sudo systemctl restart fail2ban
sudo fail2ban-client status sshd
Automatic security updates
sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades

Operations are logged to /var/log/unattended-upgrades/unattended-upgrades.log. Some updates need a reboot, and Reboots and reinstalls are requested from the dashboard and done by the team; a reinstall erases the disk, chain data included, so pick a quiet day for a Lightning node with open channels.

How do you protect seeds, API keys and backups?

Keep seeds off the server, give bots API keys without withdrawal rights and copy backups elsewhere. Blockgilt never holds your coins, seeds or exchange API keys: the node and the wallet on your VPS are yours to run, and nobody on the team will ask for a seed phrase or a private key. No plan includes backups. Keep your wallet seeds, Lightning channel backups and bot configs somewhere other than the VPS.

Channel backups are in how to back up a Lightning node, the bot install in how to install Freqtrade on a VPS, and server options in the best VPS for a crypto node.

Which plan for a secured node or bot server?

Term

Leaf

2 vCPU · 4 GB RAM · 80 GB NVMe

$7

$21 for 3 months

6 months $33.60 (−20%)1 year $42 (−50%)

  • 2 vCPU, 4 GB RAM, 80 GB NVMe
  • Trading bots, a pruned Bitcoin node with Lightning
  • 4 TB traffic at 1 Gbit/s, 1 IPv4 + IPv6 /64
  • $3.50 a month on the 12-month term ($42.00 a year)
  • HostBrr Value 8GB: $4.67 a month for 2 vCPU / 8 GB / 80 GB NVMe (10 November 2026)
Order this VPS

Gilt

4 vCPU · 8 GB RAM · 250 GB NVMe

$25.22

3 months $75.666 months $121.05 (−20%)1 year $151.32 (−50%)

  • 4 vCPU, 8 GB RAM, 250 GB NVMe
  • BTCPay Server with Lightning, pruned Bitcoin and Monero
  • 8 TB traffic at 1 Gbit/s, 1 IPv4 + IPv6 /64
  • $12.61 a month on the 12-month term ($151.32 a year)
  • HostBrr Value 32GB: $16.82 a month for 8 vCPU / 32 GB / 320 GB NVMe (10 November 2026)
Order this VPS

In every plan: NVMe sized for the chain · Inbound P2P ports open · Nodes welcome, mining banned · IPv4 + IPv6 /64 · Root over SSH · No KYC

Verdict
  • A Blockgilt VPS is the better choice if you harden it yourself: root over SSH, open P2P ports and Leaf from $3.50 a month on 12 months.
  • A managed node service is the better choice if you do not want to run ufw, fail2ban and updates on your own server.
Sources (11)
  1. sshd_config(5) manual — OpenBSD project (OpenSSH) (checked 2026-11-10)
  2. sshd(8) manual — OpenBSD project (OpenSSH) (checked 2026-11-10)
  3. ufw(8) manual page — Debian (checked 2026-11-10)
  4. Firewalls (ufw) — Ubuntu Server documentation (checked 2026-11-10)
  5. fail2ban jail.conf — Fail2Ban project (checked 2026-11-10)
  6. UnattendedUpgrades — Debian Wiki (checked 2026-11-10)
  7. unattended-upgrade(8) manual page — Debian (checked 2026-11-10)
  8. JSON-RPC interface — Bitcoin Core (checked 2026-11-10)
  9. Install Docker Engine on Debian — Docker (checked 2026-11-10)
  10. Freqtrade REST API — Freqtrade (checked 2026-11-10)
  11. monerod reference — Monero project (checked 2026-11-10)

VPS security questions

Should I change the SSH port?

It is optional. A different port cuts log noise but does not replace key-only login, a firewall and fail2ban. If you change it, allow the new port in ufw before you restart sshd.

Which ports does a Bitcoin and Lightning node need open?

8333/tcp for Bitcoin peers and 9735/tcp for Lightning peers, plus SSH. The Bitcoin RPC port stays on localhost.

Does ufw protect Docker containers?

Not for published ports. Docker’s documentation says published ports are not filtered by your firewall rules, so bind container ports to 127.0.0.1 and use a tunnel.

Do I need fail2ban if SSH accepts only keys?

It is not required, but it cuts the log noise and the load of repeated attempts. With password login off, a brute-force guess cannot succeed.

Does Blockgilt keep my keys or seeds?

No. Blockgilt never holds your coins, seeds or exchange API keys: the node and the wallet on your VPS are yours to run, and nobody on the team will ask for a seed phrase or a private key.

Order a server and lock it down

Root access over SSH on every plan, from $3.50 a month on 12 months.

From $3.50/month · no KYC

Pick a block