Vps Openclaw Security Hardening
by @marcusgraetsch
Production-ready security hardening for VPS running OpenClaw AI agents. Includes SSH hardening (custom port), firewall, audit logging, credential management,...
clawhub install vps-openclaw-security-hardeningπ About This Skill
name: vps-openclaw-security-hardening description: Production-ready security hardening for VPS running OpenClaw AI agents. Includes SSH hardening (custom port), firewall, audit logging, credential management, and intelligent alerting. Follows BSI IT-Grundschutz and NIST guidelines with minimal resource overhead. version: 1.0.6 author: OpenClaw Community homepage: https://github.com/MarcusGraetsch/vps-openclaw-security-hardening metadata: openclaw: emoji: π‘οΈ requires: bins: ["ssh", "ufw", "auditd", "systemctl", "apt-get"] optional: ["fail2ban"] os: ["ubuntu", "debian"] tags: ["security", "hardening", "vps", "audit", "monitoring", "firewall", "ssh", "fail2ban"] install: "SSH_PORT=4848 ./scripts/install.sh" verify: "./scripts/verify.sh" warning: "DO NOT use on machines with sensitive personal data. Use dedicated VPS only. Test in VM first."
VPS Security Hardening for OpenClaw
Production-ready security hardening for AI agent deployments on VPS.
β οΈ CRITICAL WARNINGS
DO NOT run OpenClaw on servers/machines with sensitive personal data. Use a dedicated machine (VPS, bare-metal, or on-premise server dedicated to OpenClaw).
Supported OS: Ubuntu 20.04+, Debian 11+. Not for Windows (use WSL2) or macOS.
β οΈ Choose Your SSH Port First
You must choose a custom SSH port (1024-65535) before installing. This makes you conscious of the security decision.
# Choose your port (example: 4848)
export SSH_PORT=4848Install
cd ~/.openclaw/skills/vps-openclaw-security-hardening
sudo ./scripts/install.shVerify
./scripts/verify.shTest SSH (new terminal)
ssh -p ${SSH_PORT} root@your-vps-ip
What It Does
| Layer | Protection | Implementation | |-------|------------|----------------| | Network | Firewall, SSH hardening | UFW, custom port (your choice), key-only | | System | Auto-updates, monitoring | unattended-upgrades, auditd | | Secrets | Credential management | Centralized .env, 600 permissions | | Monitoring | Audit logging, alerting | Kernel-level audit, multi-channel alerts |
Requirements
Security Changes
SSH
Firewall
Services
Monitoring
Resource Usage
| Component | RAM | Disk | |-----------|-----|------| | Auditd | ~2 MB | 40 MB max | | UFW | ~1 MB | Negligible | | Scripts | ~5 MB | Negligible | | Total | <10 MB | <50 MB |
Files
scripts/install.sh - Main installationscripts/verify.sh - Verify installationscripts/rollback-ssh.sh - Emergency rollbackscripts/critical-alert.sh - Telegram alertsscripts/daily-briefing.sh - Daily reportsrules/audit.rules - Audit configurationDocumentation
See README.md for full documentation.
License
MIT - See LICENSE file