Deploy Holesail on a RamNode VPS
Encrypted peer-to-peer tunneling built on Hypercore DHT. Expose any local port to the internet without opening firewall rules, configuring port forwarding, or maintaining a static IP.
What Is Holesail?
Holesail is a peer-to-peer reverse proxy and network tunneling tool that lets you expose any local port to the internet without touching firewall rules, configuring port forwarding, or maintaining a static IP. It works over an encrypted P2P connection built on the Hypercore DHT, which means once it is running on your VPS, anyone with the connection key can reach your tunneled service from anywhere in the world.
Prerequisites
- A RamNode VPS running Ubuntu 22.04 LTS or Debian 12 (any plan with at least 512 MB RAM)
- Root or sudo access
- A non-root user is recommended for running Holesail as a service
- Basic familiarity with SSH and the Linux command line
Update the System
Log in as root or a sudo user and run a full package update before installing anything:
apt update && apt upgrade -yInstall Node.js via NVM
Holesail requires Node.js 16 or newer. The recommended approach is NVM (Node Version Manager).
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bashexport NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"Confirm NVM is in your ~/.bashrc:
grep -n "NVM_DIR" ~/.bashrcnvm install 20
nvm use 20
nvm alias default 20node -v
npm -vv20.x.x
10.x.xInstall Holesail
sudo npm i holesail -gholesail --helpNote: On some systems, sudo npm may not find the NVM-managed Node binary. If you get a command not found error, run npm i holesail -g without sudo, then add the global npm bin directory to your PATH.
Start a Holesail Tunnel
Private Mode (Default)
Private mode generates a connection key that is not discoverable on the DHT. Only someone with the exact key can connect.
holesail --live 3000hs://s000a19f5778ccf3b7471fd45205758ad44a572aec1e7cdf76864613db0e63b8a49cKeep this key secure. Anyone with it can connect to your tunneled port.
Public Mode
Announces the tunnel on the DHT with a shorter, shareable key:
holesail --live 3000 --publicCustom Connection Key
holesail --live 3000 --key "my-custom-key-string"If the key is shorter than 32 characters, pass the --force flag:
holesail --live 3000 --key "short-key" --forceBinding to a Specific Host
By default, Holesail binds to 127.0.0.1. To expose a different interface:
holesail --live 3000 --host 192.168.1.100Run Holesail as a Persistent systemd Service
For production use, run Holesail as a systemd service so it survives reboots and reconnects automatically.
which holesail/root/.nvm/versions/node/v20.19.0/bin/holesailCreate the systemd unit file. Replace <PORT> with the port you want to expose and update ExecStart with the full path from above:
[Unit]
Description=Holesail P2P Tunnel
After=network.target
[Service]
Type=simple
User=root
ExecStart=/root/.nvm/versions/node/v20.19.0/bin/holesail --live <PORT>
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.targetsystemctl daemon-reload
systemctl enable holesail
systemctl start holesailsystemctl status holesail
journalctl -u holesail -n 50 --no-pagerStable key across reboots: Without a --key flag, a VPS reboot will produce a new connection string. Add a fixed key to your ExecStart:
ExecStart=/root/.nvm/versions/node/v20.19.0/bin/holesail --live <PORT> --key "your-stable-key-32chars-minimum"Connect from a Client
On the machine that needs to reach your VPS service, install Holesail the same way (Node.js + npm). Then run:
holesail hs://s000a19f5778ccf3b7471fd45205758ad44a572aec1e7cdf76864613db0e63b8a49cThis binds a local port (default 8989) on the client machine that proxies through to the exposed port on your VPS. Access the service at 127.0.0.1:8989.
holesail <KEY> --port 8080holesail <KEY> --port 8080 --host 0.0.0.0Practical Examples
SSH Tunneling
Expose SSH (port 22) from your VPS through Holesail and access it from anywhere, even if port 22 is blocked by the client's network:
On the VPS:
holesail --live 22 --key "my-ssh-tunnel"On the client:
holesail "my-ssh-tunnel" --port 2222
ssh -p 2222 user@127.0.0.1Exposing a Web App
Share a web app running on port 8080 temporarily with a colleague:
holesail --live 8080 --publicThey run holesail <KEY> on their machine and hit http://127.0.0.1:8989 in their browser.
Firewall Notes
Holesail does not require any inbound ports to be open. Outbound UDP traffic is used for DHT peer discovery, and all tunnel traffic is encrypted end-to-end.
If your VPS has a UFW ruleset that blocks all outbound traffic by default (uncommon but possible), allow outbound UDP:
ufw allow out proto udp to anyFor most RamNode VPS configurations with default UFW settings, Holesail works without any additional firewall changes.
Security Considerations
- Keep connection keys private. Anyone with a private-mode connection key can reach the tunneled port. Treat these like passwords.
- Holesail does not replace application-level auth. If the service behind the tunnel has no authentication of its own, restrict access at the application layer before sharing the key.
- Public mode is more discoverable. Prefer private mode (the default) for sensitive services.
- Rotate keys periodically for long-lived tunnels by restarting the service with a new
--keyvalue. - Use a dedicated non-root user for the systemd service when running in production.
Troubleshooting
Holesail starts but the client cannot connect
Check that the service is actually running and that the correct connection string is being used:
systemctl status holesail
journalctl -u holesail -n 100"holesail: command not found" after install
The NVM bin directory may not be in the PATH for the current session. Source your bashrc:
source ~/.bashrcConnection key changes on every restart
Add a --key flag to the ExecStart in your unit file and reload the service.
High CPU or memory use
Check for multiple service instances running simultaneously:
ps aux | grep holesail