Hummingbot implements robust security measures to protect your API keys, secrets, and other sensitive data through password-based encryption.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hummingbot/hummingbot/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The security system uses Ethereum keyfile encryption (AES-128-CTR) to protect sensitive configuration values. All API credentials are encrypted before being stored on disk.Password Protection
Setting Your Password
When you first run Hummingbot, you’ll be prompted to create a password:Your password is never stored anywhere. Hummingbot stores an encrypted verification word to validate your password on subsequent logins.
Password Verification
Hummingbot validates your password using an encrypted verification file:Password Requirements
Password Strength Recommendations
Password Strength Recommendations
- Minimum 8 characters
- Mix of uppercase and lowercase letters
- Include numbers and special characters
- Avoid common words or patterns
- Don’t reuse passwords from other services
Password Storage
Password Storage
Hummingbot stores an encrypted verification word at:This file contains the word “HummingBot” encrypted with your password to verify login attempts.
Encryption System
Encryption Algorithm
Hummingbot uses ETH Keyfile encryption (same as Ethereum wallets):- Algorithm: AES-128-CTR
- Key Derivation: PBKDF2 or Scrypt
- Key Length: 32 bytes (256 bits)
- MAC: Keccak-256 for integrity verification
What Gets Encrypted
Hummingbot automatically encrypts fields marked asis_secure=True:
Security Manager
TheSecurity class manages all encryption and decryption operations:
Login Process
Decryption Process
When you log in, Hummingbot automatically:- Validates your password against
.password_verification - Scans all connector config files in
conf/connectors/ - Decrypts each connector’s API credentials
- Loads the decrypted values into memory
Accessing Decrypted Values
Connector Configuration Security
Encrypted Storage Format
Encrypted connector configs are stored as YAML files:conf/connectors/binance.yml
Adding/Updating Credentials
When you connect to an exchange, credentials are automatically encrypted:Best Practices
Strong Password
Use a unique, strong password you’ll remember
Secure Backups
Backup your
conf/ directory to a secure locationLimited API Permissions
Only grant necessary permissions (trading, reading - no withdrawals)
IP Whitelisting
Enable IP whitelisting on exchange API keys when possible
Exchange API Key Setup
Security Considerations
File System Security
File System Security
Encrypted files are stored in plaintext on disk (just encrypted). Ensure:
- Use full-disk encryption on your system
- Restrict file permissions:
chmod 600 conf/connectors/* - Don’t store configs in shared/public directories
Memory Security
Memory Security
Once decrypted, API keys exist in memory:
- Ensure your system has adequate security (firewall, anti-malware)
- Avoid running untrusted code on the same machine
- Use dedicated servers for production trading
Network Security
Network Security
- Use VPN when trading on public networks
- Enable firewall rules to restrict inbound connections
- Keep your system and Hummingbot updated
Troubleshooting
Forgot Password
Forgot Password
If you forgot your password:
- Stop Hummingbot
- Delete
.password_verificationand all files inconf/connectors/ - Restart Hummingbot and create a new password
- Reconnect to all exchanges using the
connectcommand
Invalid Password Error
Invalid Password Error
If you’re certain your password is correct:
- Check for typos (passwords are case-sensitive)
- Verify
.password_verificationfile exists inconf/ - If corrupted, follow the “Forgot Password” steps above
Decryption Failed
Decryption Failed
If connector configs fail to decrypt:
- Verify the connector YAML file isn’t corrupted
- Check file permissions (must be readable)
- Re-connect to the exchange to regenerate the config
Related Resources
Config Files
Learn about configuration file structure
Exchange Setup
Connect to exchanges securely