Hermes Agent + Tailscale = Bulletproof VPS Security (Step-by-Step Tutorial)

Learn how to run Hermes Agent on your own server without exposing it to the public internet. This setup is one of the easiest and safest ways to do it.

In this guide, you'll install Hermes Agent on a VPS and secure it using Tailscale. No complicated DevOps. Just a clean, working setup.

Watch the Full Tutorial

Full video walkthrough on YouTube: https://youtu.be/7ay5-hneN2c

Why Use Tailscale?

Most VPS setups expose your app directly to the internet. That's risky.

With Tailscale, you:

Bottom line: Your VPS stays private, but still accessible to you from any device on your Tailnet.

What You Need

Step 1 - Set Up Your VPS

Start with a clean VPS. Connect via SSH using the IP your provider assigned:

ssh root@VPSIPHERE

Now your server is ready for the next steps.

Step 2 - Create a New User

Don't run things as root. Create a regular user and add them to the sudo group:

adduser --gecos "" username
adduser username sudo

Step 3 - Create an SSH Key

On your local machine, generate a modern Ed25519 key. Give it a name and a strong passphrase when prompted:

ssh-keygen -t ed25519

Copy the public key to your VPS:

ssh-copy-id -i keyname.pub username@VPSIPHERE

Then disable password authentication. Open the SSH config:

nano /etc/ssh/sshd_config.d/50-cloud-init.conf

Set PasswordAuthentication no. Press Ctrl+X, then Y, then Enter to save and exit. Restart SSH:

service ssh restart

Always keep your existing SSH session open while testing the new key in a second terminal. If anything is wrong, you still have a way back in.

Connect with the new SSH key:

ssh -i ./keyname 'username@VPSIPHERE'

Step 4 - Set Up Tailscale

Download Tailscale to your local computer first: tailscale.com/download

Then install Tailscale on the VPS:

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
tailscale status
sudo tailscale set --operator=username

Firewall rule: Make sure UDP 41641 is allowed outbound on your VPS so Tailscale can establish its WireGuard tunnels. You do not need to expose it publicly.

Once Tailscale is up, connect to your VPS over the private Tailscale IP instead of the public one:

ssh -i ./keyname 'username@TAILSCALEIPHERE'

Step 5 - Install Hermes Agent

Follow the official setup at github.com/nousresearch/hermes-agent. Run the install script:

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

After installation, reload your shell so the hermes command is on your PATH:

source ~/.bashrc   # or: source ~/.zshrc

Configure Hermes Agent

Run the one-time setup wizard:

hermes setup

Privacy-Focused Communication

Start Chatting

Run this command to start a chat session with your self-hosted Hermes Agent:

hermes

Step 6 - Checklist for Your Server

For extra security, take a final pass over the server.

VPS hardening checklist:

Now you're running a proper, locked-down setup.

Final Thoughts

This setup gives you full control over your AI agent and the data it sees, secure access via Tailscale with no public-facing services, and no platform lock-in - you own the box. Once you try it, it's hard to go back.

Want to go deeper into AI tools, automation, and building real systems? Visit prolevelaiacademy.com and become a Pro Level AI Builder in 28 days.