Security Checklist

A comprehensive security checklist for deploying Moltbot in production.

Security Checklist

Before deploying Moltbot to production, review this security checklist to ensure your setup is secure.

Pre-Deployment Checklist

Authentication & Access

  • Use strong, unique passwords for all accounts
  • Enable SSH key authentication and disable password login
  • Set up firewall rules to only allow necessary ports
  • Configure rate limiting to prevent abuse
  • Implement user authorization if the bot is public

API Keys & Secrets

  • Use environment variables for all secrets (never hardcode)
  • Create separate API keys for development and production
  • Set spending limits on AI provider accounts
  • Rotate API keys regularly (at least quarterly)
  • Never commit .env files to version control

Agent Permissions

  • Apply principle of least privilege - only enable needed skills
  • Use read-only tokens where possible
  • Sandbox file system access to specific directories
  • Disable skills that aren't needed
  • Review skill permissions before enabling new ones

Network Security

  • Use HTTPS everywhere with valid SSL certificates
  • Keep software updated (OS, Docker, dependencies)
  • Configure webhooks with secrets for verification
  • Block unused ports in firewall
  • Use a reverse proxy (Nginx/Caddy) instead of exposing directly

Monitoring & Logging

  • Enable audit logging for all agent actions
  • Set up alerts for unusual activity
  • Monitor API usage for unexpected spikes
  • Review logs regularly for security incidents
  • Keep backups of configuration and logs

Minimum Viable Security

If you're in a hurry, at minimum do these:

  1. Environment variables for secrets - Never hardcode API keys
  2. HTTPS with valid certificate - Required for webhooks
  3. Firewall enabled - Block all unnecessary ports
  4. Separate dev/prod keys - Limit blast radius of key leaks
  5. Spending limits - Set caps on AI provider accounts

Security Architecture

┌─────────────────────────────────────────────────────────────┐
│                     Your Server                             │
│  ┌─────────────────┐    ┌─────────────────────────────────┐│
│  │  Reverse Proxy  │    │           Moltbot               ││
│  │  (Nginx/Caddy)  │───▶│  ┌─────────────────────────┐    ││
│  │  - HTTPS        │    │  │    Sandboxed Skills     │    ││
│  │  - Rate Limit   │    │  │  - Limited file access  │    ││
│  │  - WAF (opt)    │    │  │  - Restricted network   │    ││
│  └─────────────────┘    │  └─────────────────────────┘    ││
│          │              │            │                     ││
│          │              │            ▼                     ││
│          │              │  ┌─────────────────────────┐    ││
│          │              │  │     Audit Logging       │    ││
│          │              │  └─────────────────────────┘    ││
│          │              └─────────────────────────────────┘│
└──────────┼──────────────────────────────────────────────────┘

           ▼ HTTPS Only
    ┌──────────────┐
    │   Internet   │
    └──────────────┘

Common Security Mistakes

Don't: Give your agent access to production databases with write permissions.

Do: Use read-only database users or separate staging environments.

Don't: Store API keys in configuration files committed to Git.

Do: Use environment variables loaded from a .env file (gitignored).

Don't: Allow the agent to execute arbitrary shell commands.

Do: Use specific, audited skills with defined capabilities.

Incident Response

If you suspect a security incident:

  1. Rotate all API keys immediately
  2. Review audit logs for unauthorized actions
  3. Check for unauthorized changes to files/configurations
  4. Revoke bot tokens for messaging platforms
  5. Document the incident for future prevention