Overview
Securing your Viction node is critical to protecting your accounts, funds, and network participation. This guide covers essential security practices for node operators.
Account Security
Private Key Management
Never share your private keys or keystore files. Anyone with access to your private key has complete control over your account and funds.
Best practices:
-
Never expose unencrypted keys
- Always encrypt keys with strong passphrases
- Delete unencrypted key files immediately after import
- Never transmit keys over insecure channels
-
Use strong passphrases
- Minimum 12 characters
- Mix uppercase, lowercase, numbers, and symbols
- Avoid dictionary words and personal information
- Use a password manager
-
Backup securely
- Store backups in multiple secure locations
- Use encrypted storage for backups
- Keep offline/cold storage for critical accounts
- Test backup restoration regularly
Keystore Encryption
Viction uses scrypt-based encryption for keystore files:
Standard encryption (recommended for production):
Lightweight encryption (testing only):
Never use --lightkdf for production accounts. The reduced security makes accounts vulnerable to brute-force attacks.
Account Unlocking
Unlocking accounts exposes decrypted keys in memory:
Only unlock accounts when absolutely necessary. Unlocked accounts are vulnerable if the node is compromised. Never unlock accounts on public-facing nodes.
Safer alternatives:
- Use external signers (hardware wallets, remote signing services)
- Unlock accounts only for specific operations, then re-lock
- Use separate nodes for signing vs. public RPC access
Network Security
Firewall Configuration
Restrict network access to your node:
Required ports:
- 30303: P2P networking (TCP & UDP)
- 8545: HTTP RPC (restrict to trusted IPs)
- 8546: WebSocket RPC (restrict to trusted IPs)
- 30301: IPC (local only)
Firewall rules example (iptables):
RPC Security
Never expose RPC endpoints to the public internet without proper authentication and rate limiting. Unrestricted RPC access can lead to DoS attacks and unauthorized transactions.
Secure RPC configuration:
- Bind to localhost only (if local access sufficient):
- Restrict API modules:
Avoid exposing dangerous APIs:
admin: Node administration
debug: Debugging functions
personal: Account management
miner: Mining control
- Use CORS carefully:
- Virtual hosts whitelist:
P2P Security
Trusted nodes only mode:
Configure static/trusted nodes in <datadir>/static-nodes.json:
Node Security
File System Permissions
Restrict access to node data:
Keystore files should only be readable by the node user. Never set world-readable permissions (chmod 644 or 777) on keystore files.
Process Isolation
Run the node as a dedicated user (not root):
System Updates
Keep your system and node software updated:
Monitoring and Logging
Enable Security Logging
Monitor for Suspicious Activity
Watch for:
- Unauthorized RPC access attempts
- Unusual transaction patterns
- Unexpected account unlock attempts
- Abnormal peer connections
- High resource usage
Log Rotation
Configure log rotation to prevent disk exhaustion:
Disaster Recovery
Backup Strategy
Critical data to backup:
- Keystore files (
<datadir>/keystore/*)
- Node key (
<datadir>/nodekey)
- Configuration files
- Static/trusted nodes configuration
Backup script example:
Recovery Testing
Regularly test backup restoration:
Smart Contract Security
If deploying contracts:
- Audit contracts before deployment
- Use established patterns (OpenZeppelin, etc.)
- Test thoroughly on testnet
- Implement access controls
- Plan for upgrades (proxy patterns)
- Monitor contract activity
Masternode Security
Additional considerations for masternode operators:
Masternode accounts require special protection as they participate in consensus. Compromise of a masternode account can affect network security and result in slashing.
Masternode best practices:
-
Use dedicated infrastructure
- Separate server for masternode
- No other services on masternode server
- Hardened operating system
-
DDoS protection
- Use DDoS mitigation services
- Implement rate limiting
- Have backup nodes ready
-
High availability
- Monitor uptime continuously
- Automated failover procedures
- Redundant network connections
-
Key management
- Consider hardware security modules (HSM)
- Multi-signature setups where possible
- Regular key rotation procedures
Incident Response
If Keys Are Compromised
- Immediately transfer funds to new secure account
- Stop the compromised node
- Investigate breach vector
- Rotate all credentials
- Review logs for unauthorized activity
- Update security measures
If Node Is Compromised
- Isolate the node from network
- Preserve logs and system state for analysis
- Check for unauthorized transactions
- Verify keystore integrity
- Rebuild from clean installation
- Restore from verified backups
- Investigate root cause
Security Checklist
Resources