Description
WuKongIM’s version numbering follows themajor.minor.patch format, for example 1.0.0. When the patch number increases, it indicates bug fixes or minor feature updates; when the minor version increases, it indicates new features; when the major version increases, it indicates incompatible API changes.
Therefore, as long as you don’t upgrade major versions, the upgrade process is smooth.
Version Compatibility:
- Patch updates (e.g., 2.0.1 → 2.0.2): Always safe, includes bug fixes and minor improvements
- Minor updates (e.g., 2.0.x → 2.1.x): Generally safe, includes new features with backward compatibility
- Major updates (e.g., 2.x.x → 3.x.x): May include breaking changes, requires careful planning
Upgrade Steps
1. Check Current Version
First, check your current WuKongIM version:2. Backup Data (Recommended)
Before upgrading, it’s recommended to backup your data:3. Update Docker Compose Configuration
Modify theimage field of the wukongim service in docker-compose.yml to the new version.
For example:
4. Pull New Image
Use the following command to get the latest image:5. Restart Services
6. Verify Upgrade
After restart, verify the upgrade was successful:Rolling Upgrade for Clusters
For cluster deployments, perform rolling upgrades to maintain service availability:1. Upgrade One Node at a Time
2. Verify Cluster Health
Upgrade Strategies
Blue-Green Deployment
For critical production environments, consider blue-green deployment:- Prepare Green Environment: Set up a new environment with the new version
- Data Sync: Ensure data is synchronized between blue and green environments
- Switch Traffic: Update load balancer to point to green environment
- Verify: Confirm everything works correctly
- Cleanup: Remove blue environment after successful verification
Canary Deployment
For gradual rollout:- Deploy to Subset: Upgrade only a portion of nodes
- Monitor: Watch metrics and logs for issues
- Gradual Rollout: Progressively upgrade more nodes
- Full Deployment: Complete upgrade once confident
Rollback Procedures
If issues occur during upgrade, you can rollback:1. Quick Rollback
2. Data Rollback (if needed)
Upgrade Checklist
Pre-Upgrade
- Check current version and target version compatibility
- Review release notes for breaking changes
- Create data backup
- Plan maintenance window
- Notify users of potential downtime
- Prepare rollback plan
During Upgrade
- Monitor system resources
- Watch application logs
- Verify service health endpoints
- Test critical functionality
- Monitor cluster status (for multi-node)
Post-Upgrade
- Verify version upgrade successful
- Test all major features
- Monitor performance metrics
- Check data integrity
- Update documentation
- Clean up old backups (after verification period)
Troubleshooting
Common Issues
Container fails to start after upgrade:Recovery Steps
- Stop services:
docker-compose stop - Restore backup: Restore from backup created before upgrade
- Revert configuration: Use previous docker-compose.yml
- Restart:
docker-compose up -d - Verify: Confirm system is working correctly
Best Practices
Planning
- Test in staging: Always test upgrades in a staging environment first
- Read release notes: Understand what changes are included
- Schedule maintenance: Plan upgrades during low-traffic periods
- Communicate: Inform stakeholders about planned maintenance
Execution
- Monitor closely: Watch logs and metrics during upgrade
- Upgrade gradually: For clusters, upgrade one node at a time
- Verify thoroughly: Test all critical functionality after upgrade
- Keep backups: Maintain backups until upgrade is fully verified

