Upgrading FoxCloud
This guide explains how to upgrade your FoxCloud deployment to newer versions.
Before You Upgrade
Check Release Notes
Always check the CHANGELOG.md for:
- Breaking changes
- New features
- Bug fixes
- Upgrade instructions
Backup Configuration
Before upgrading, backup your:
- Environment variables (UUIDs, PROXY_IPs)
- Custom domain configurations
- Any custom modifications
Upgrade Methods
Method 1: Pre-built Worker (Recommended for Production)
- Download the latest
worker.js
from Releases
- Redeploy to Cloudflare Workers:
wrangler deploy worker.js
- Verify functionality after deployment
Method 2: Source Build
- Pull the latest changes:
- Install/update dependencies:
- Build the project:
- Deploy to Cloudflare Workers:
Method 3: GitHub Actions
- Pull the latest changes or merge upstream changes
- Push to your repository to trigger automatic deployment
- Monitor the deployment process in GitHub Actions
Version-Specific Upgrade Notes
Upgrading to 1.x.x from 0.x.x
Major version upgrades may include breaking changes. Always:
- Read the migration guide in the release notes
- Test in a staging environment first
- Schedule upgrades during maintenance windows
- Have a rollback plan ready
Post-Upgrade Verification
Functionality Testing
- Test the main landing page
- Verify subscription page generation
- Test VLESS configuration generation
- Confirm WebSocket connections work
- Verify all configured UUIDs work
- Monitor response times
- Check for increased error rates
- Verify resource usage is within expected limits
- Confirm all proxy servers are accessible
User Communication
If users might be affected:
- Announce maintenance windows in advance
- Communicate any breaking changes
- Provide updated client configuration if needed
- Offer support during the transition
Rollback Procedure
If issues are discovered after upgrading:
For Pre-built Worker
- Download the previous version’s
worker.js
- Redeploy the previous version:
wrangler deploy worker.js
For Source Build
- Revert to the previous commit:
git checkout v0.x.x # Previous version tag
- Rebuild and redeploy:
npm run build
npm run deploy
For GitHub Actions
- Revert the commit in your repository
- Push to trigger redeployment of the previous version
Troubleshooting Upgrade Issues
Deployment Failures
- Check Cloudflare credentials and permissions
- Verify environment variables are still configured
- Review build logs for errors
- Check Cloudflare Worker limits
Functionality Issues
- Verify environment variables are correctly set
- Check for breaking changes in the release notes
- Review recent code modifications
- Consult the documentation for updated configuration
- Compare with previous version performance
- Check for new dependencies or code changes
- Monitor Cloudflare Worker metrics
- Verify proxy server performance
Best Practices for Upgrades
Testing Strategy
- Always test in a staging environment first
- Use a separate Worker for testing
- Test with a subset of users if possible
- Monitor closely after deployment
Scheduling
- Schedule upgrades during low-usage periods
- Allow sufficient time for testing
- Have team members available for issues
- Plan for rollback if needed
Communication
- Notify users of maintenance windows
- Document any user-facing changes
- Provide updated documentation
- Offer support channels for issues
By following this guide, you can ensure smooth upgrades of your FoxCloud deployment with minimal disruption to users.