Moltbot Remote Access Setup: Secure macOS Guide with Taval VPN
Last updated: January 28, 2026
Introduction
Moltbot (formerly ClawdBot) is an open-source AI assistant that runs on your own machine and connects to messaging apps like Telegram, WhatsApp, or Discord. You text it, it texts back. It can read your emails, manage files, run shell commands, and act on your behalf.
This is obviously dangerous. You're giving an AI shell access to your Mac, API tokens to your email and calendar, and an interface anyone can potentially message. Many setup guides focus on getting it running locally. This one shows you how to securely access your Moltbot instance remotely from anywhere using Taval VPN, ensuring your Mac and all its sensitive data remain protected.
Why Use Taval VPN for Remote Access?
Instead of exposing your Moltbot gateway directly to the internet (a major security risk), Taval VPN creates a secure, encrypted tunnel between your devices. Your Mac running Moltbot stays behind a firewall, accessible only through your private VPN network.
Key Security Benefits
- Zero public exposure: No ports open to the internet
- Encrypted communication: All traffic encrypted with WireGuard's modern cryptography
- Access control: Only devices on your VPN can reach your Mac
- Managed infrastructure: Taval handles all server setup and maintenance
- Easy setup: Download config, connect, done
Prerequisites
Before you begin, ensure you have:
- macOS (macOS 14+ recommended)
- Moltbot installed and running locally on your Mac
- Taval Account with an active WireGuard VPN server (Start free trial)
- Homebrew installed (if not:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)") - Basic Terminal knowledge
Step 1: Enable SSH
Ensure SSH is enabled and accessible for remote access.
Enable Remote Login in System Settings:
- Open System Settings → General → Sharing
- Enable Remote Login
- Optionally configure who can access (all users or specific users)
Or via command line:
sudo systemsetup -setremotelogin onVerify SSH is running:
sudo launchctl list | grep sshStep 2: Configure macOS Firewall
Block everything incoming by default, allow only what's needed.
# Enable firewall
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
# Set to block all incoming connections by default
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setblockall on
# Allow SSH (we'll restrict this to VPN only later)
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/sbin/sshd
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp /usr/sbin/sshd
# Verify firewall is enabled
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstateStep 3: Install WireGuard on macOS
Option 1: Using Homebrew (Recommended)
brew install wireguard-toolsOption 2: Using WireGuard App
Download the WireGuard app from the Mac App Store or wireguard.com. The app provides a GUI for easier management.
Step 4: Get Your Taval VPN Configuration
Getting Your Configuration File
- Log in to your Taval dashboard at portal.taval.net
- Navigate to your WireGuard server and click "Add Peer" or "Create Client"
- Name your device (e.g., "MacBook-Pro-Moltbot")
- Download the configuration file - Taval will generate a WireGuard config file for you
Step 5: Configure WireGuard on macOS
Using WireGuard App (Easiest)
- Open the WireGuard app
- Click the "+" button or "Import tunnel(s) from file..."
- Select the configuration file you downloaded from Taval
- Name the tunnel (e.g., "Taval VPN")
- Click "Activate" to connect
Using Command Line (Advanced)
Save the configuration file:
# Create WireGuard directory
sudo mkdir -p /usr/local/etc/wireguard
# Copy your config file
sudo cp ~/Downloads/wg0.conf /usr/local/etc/wireguard/wg0.conf
# Set proper permissions
sudo chmod 600 /usr/local/etc/wireguard/wg0.confStart WireGuard:
# Start WireGuard
sudo wg-quick up wg0
# Check status
sudo wg showEnable auto-start on boot by creating a launch daemon. See the full guide for details.
Step 6: Restrict SSH to VPN Only
No more public SSH exposure. Only accessible via VPN.
First, verify your VPN IP address:
# Check your VPN IP
ifconfig | grep -A 5 utun
# Or if using WireGuard app, check the interface name (usually utun0, utun1, etc.)Find your VPN interface name, then restrict SSH:
# Get your VPN IP range from Taval config (e.g., 10.0.0.0/24)
# Restrict SSH to VPN network only using pfctl
# Create pfctl rules file
sudo nano /etc/pf.anchors/vpn-sshAdd this content (adjust VPN network range as needed):
# Allow SSH only from VPN network
pass in quick on utun0 inet proto tcp from 10.0.0.0/24 to any port 22
block in quick proto tcp to any port 22Load the rules:
# Add to pf.conf
echo 'anchor "vpn-ssh"' | sudo tee -a /etc/pf.conf
echo 'load anchor "vpn-ssh" from "/etc/pf.anchors/vpn-ssh"' | sudo tee -a /etc/pf.conf
# Enable packet filter
sudo pfctl -e
# Load rules
sudo pfctl -f /etc/pf.confStep 7: Restrict Moltbot Gateway to VPN Only
Moltbot gateway only accessible from your devices.
If Moltbot runs a web gateway (typically on port 443 or 8080), restrict it to VPN access only:
# Add to /etc/pf.anchors/vpn-ssh (or create new anchor)
sudo nano /etc/pf.anchors/vpn-moltbotAdd rules for Moltbot ports (adjust ports as needed):
# Allow Moltbot gateway only from VPN network
pass in quick on utun0 inet proto tcp from 10.0.0.0/24 to any port 443
pass in quick on utun0 inet proto tcp from 10.0.0.0/24 to any port 8080
block in quick proto tcp to any port 443
block in quick proto tcp to any port 8080Update pf.conf:
echo 'anchor "vpn-moltbot" from "/etc/pf.anchors/vpn-moltbot"' | sudo tee -a /etc/pf.conf
sudo pfctl -f /etc/pf.confStep 8: Verify VPN Connection
Check if WireGuard is running and connected:
# Using command line
sudo wg show
# Using WireGuard app
# Check the app interface - should show "Connected" with transfer statsYou should see:
- Interface name (utun0, utun1, etc.)
- Your public key
- Endpoint (your Taval server)
- Latest handshake timestamp
- Transfer statistics
Check your VPN IP:
ifconfig | grep -A 5 utun
# Look for "inet 10.0.0.x" - this is your VPN IPStep 9: Connect from Remote Device
Now that your Mac is secured behind Taval VPN, connect from your phone or another computer:
On iPhone/iPad
- Download WireGuard app from App Store
- In Taval dashboard, create a new peer for your iPhone
- Download the config file
- Open WireGuard app, tap "+", scan QR code or import file
- Connect to VPN
On Another Mac/Windows/Linux
- Install WireGuard client
- In Taval dashboard, create a new peer for the device
- Download and import the config file
- Connect to VPN
Access Your Mac Remotely
Once connected to VPN from your remote device:
# SSH to your Mac using VPN IP
ssh your-username@10.0.0.5
# Access Moltbot gateway (if web interface)
# Open browser: https://10.0.0.5:443
# Or whatever port Moltbot usesA Note on Prompt Injection
Someone in the Moltbot community tested this. They sent an email from a random address to an account Moltbot had access to. The email contained hidden instructions. Moltbot followed them and deleted all emails. Including the trash folder.
This wasn't theoretical. It happened.
Claude Opus 4.5 is specifically recommended because Anthropic trained it to resist prompt injection (internal testing shows ~99% resistance). That helps, but VPN-only access provides an important security layer by ensuring your Moltbot instance is not exposed to the public internet.
Troubleshooting
"WireGuard not connecting"
- Verify config file is correct
- Check Taval dashboard - peer should show as connected
- Ensure macOS firewall isn't blocking WireGuard
- Try restarting WireGuard:
sudo wg-quick down wg0 && sudo wg-quick up wg0
"Cannot SSH to Mac via VPN"
- Verify VPN is connected:
sudo wg show - Check VPN IP:
ifconfig | grep utun - Verify pfctl rules are loaded:
sudo pfctl -s rules - Check SSH is running:
sudo launchctl list | grep ssh
"Moltbot not responding"
- Check Moltbot is running:
clawdbot doctor - Verify pairing is approved:
clawdbot pairing list telegram - Check VPN connection from remote device
- Verify firewall rules allow Moltbot ports
Best Practices
Regular Maintenance
- Update regularly: Keep macOS, Moltbot, and WireGuard updated
- Rotate keys: Periodically regenerate WireGuard keys in Taval dashboard
- Monitor logs: Check Moltbot and system logs regularly
- Review access: Periodically review who has VPN access
Additional Security Measures
- Use strong passwords: For any remaining password-based access
- Enable FileVault: Encrypt your Mac's disk
- Use 2FA: Wherever possible for accounts Moltbot accesses
- Regular backups: Backup your Moltbot config and credentials
- Monitor activity: Watch for unusual Moltbot behavior
Resources
- Moltbot Docs: https://docs.clawd.bot
- Moltbot Security Guide: https://docs.clawd.bot/gateway/security
- Taval Dashboard: https://portal.taval.net
- WireGuard macOS Guide: https://www.wireguard.com/install/
- Moltbot GitHub: https://github.com/moltbot/moltbot
The security docs are worth reading. Your Mac has access to your entire digital life - protect it accordingly.
Ready to Secure Your Moltbot Setup?
Start your 7-day free trial with Taval and get a managed WireGuard VPN server in minutes. No complex setup, no server management - just secure, encrypted remote access to your AI assistant.
Start Your Free Trial →