Safe Production Updates
March 23, 2026 ยท View on GitHub
Step-by-step guide for updating Cยณ CELERITY on production servers with minimal downtime.
๐ Pre-Update Checklist
Before any update:
-
Create a database backup
# Via panel UI: Dashboard โ Backup โ Download # Or manually via mongodump: docker exec hysteria-mongo mongodump --archive=/data/db/backup.archive --username=hysteria --password --authenticationDatabase=admin docker cp hysteria-mongo:/data/db/backup.archive ./backup-$(date +%Y%m%d-%H%M%S).archive -
Check current version
docker logs hysteria-backend --tail 50 | grep -i version -
Check available disk space
df -h # Minimum 2GB free space for the new image -
Backup your .env file
cp .env .env.backup-$(date +%Y%m%d)
๐ Update (Docker Hub โ recommended)
For production deployments using docker-compose.hub.yml:
1. Navigate to project directory
cd /path/to/hysteria-panel
2. Stop current containers (short downtime)
docker compose -f docker-compose.hub.yml down
Downtime: ~10-30 seconds
3. Pull the new image
docker compose -f docker-compose.hub.yml pull
4. Start updated containers
docker compose -f docker-compose.hub.yml up -d
5. Check status
# All containers should be "running"
docker compose -f docker-compose.hub.yml ps
# Check logs for errors
docker logs hysteria-backend --tail 100 -f
6. Verify accessibility
curl -I https://your-domain/panel
๐ง Update (build from source)
For deployments using docker-compose.yml with local build:
1. Navigate to project directory
cd /path/to/hysteria-panel
2. Get latest changes
git fetch origin
git status # check for uncommitted changes
git pull origin main
3. Stop current containers
docker compose down
4. Rebuild the image
docker compose build --no-cache backend
Time: 2-5 minutes depending on server
5. Start containers
docker compose up -d
6. Check status
docker compose ps
docker logs hysteria-backend --tail 100 -f
๐ Rollback to Previous Version
If problems occur after update:
Option 1: Rollback to specific image version
-
Edit
docker-compose.hub.yml:backend: image: clickdevtech/hysteria-panel:v1.2.3 # specify desired version -
Apply changes:
docker compose -f docker-compose.hub.yml down docker compose -f docker-compose.hub.yml pull docker compose -f docker-compose.hub.yml up -d
Option 2: Rollback to previous git commit
# Find the previous working commit
git log --oneline -10
# Checkout
git checkout <commit-hash>
# Rebuild
docker compose build --no-cache backend
docker compose up -d
Option 3: Database restoration
# Restore from backup
docker cp ./backup.archive hysteria-mongo:/data/db/backup.archive
docker exec hysteria-mongo mongorestore --archive=/data/db/backup.archive --drop --username=hysteria --password --authenticationDatabase=admin
โ After Update
- Check authentication โ login to the panel
- Check nodes โ all nodes should show
onlinestatus - Check subscriptions โ open subscription URL in browser
- Check API โ make a test request with API key
- Monitor logs for 10-15 minutes:
docker logs hysteria-backend -f --tail 50
โ ๏ธ Common Issues
Container won't start
# Check logs
docker logs hysteria-backend
# Common causes:
# - Error in .env file
# - MongoDB connection issue
# - Out of memory
MongoDB connection fails
# Check MongoDB status
docker logs hysteria-mongo --tail 50
# Restart MongoDB
docker compose restart mongo
SSL certificates not working
# Check greenlock.d contents
ls -la greenlock.d/
# Restart with cache clear
docker compose down
docker compose up -d
๐ Recommended Schedule
| Action | Frequency |
|---|---|
| Database backup | Daily (auto) + before updates |
| Check for updates | Weekly |
| Security patches | Within 48 hours |
| Major updates | After staging testing |
๐ก๏ธ Best Practices
- Test on staging โ duplicate environment for update testing
- Update during low-traffic hours โ night/early morning in users' timezone
- Keep backups โ at least 3 recent database backups
- Document changes โ save records of versions and update dates
- Don't update everything at once โ panel first, then nodes if needed
๐ If Something Goes Wrong
- Don't panic โ data is safe in MongoDB
- Check logs:
docker logs hysteria-backend --tail 200 - Rollback to previous version
- Restore database from backup if needed
- Create a GitHub issue with problem description and logs