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
.envfiles 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:
- Environment variables for secrets - Never hardcode API keys
- HTTPS with valid certificate - Required for webhooks
- Firewall enabled - Block all unnecessary ports
- Separate dev/prod keys - Limit blast radius of key leaks
- 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:
- Rotate all API keys immediately
- Review audit logs for unauthorized actions
- Check for unauthorized changes to files/configurations
- Revoke bot tokens for messaging platforms
- Document the incident for future prevention