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
Service
Port
Open to the internet?
SSH
22/tcp
Yes, rate-limited by ufw
Bitcoin P2P
8333/tcp
Yes, if you run a Bitcoin node
Lightning P2P
9735/tcp
Yes, if you accept channels
Monero P2P
18080/tcp
Yes, if you run a Monero node
Bitcoin RPC
8332/tcp
No: localhost or SSH tunnel only
Monero unrestricted RPC
18081/tcp
No: localhost only
Freqtrade web interface
8080/tcp
No: 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.
Update the system
Install pending security updates before anything else runs.
Create a non-root user with sudo
Give it your public key so you never log in as root again.
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.
Set the firewall
Deny inbound traffic by default, rate-limit SSH, then allow only the peer ports of your node.
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.
Add fail2ban for SSH
Install it and enable the sshd jail so repeated failures are banned.
Turn on automatic security updates
Install unattended-upgrades and answer yes to automatic stable updates.
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.
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.
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.
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.
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.