Updates
Keep your Bloqd installation up to date with the latest features and security fixes.
Update Strategy
Version Numbering
Bloqd follows semantic versioning (SemVer):
| Version | Meaning | Example |
|---|---|---|
| Major | Breaking changes | 1.x.x → 2.0.0 |
| Minor | New features, backwards compatible | 1.0.x → 1.1.0 |
| Patch | Bug fixes, security patches | 1.0.0 → 1.0.1 |
Update Channels
| Channel | Tag | Stability |
|---|---|---|
| Stable | latest | Production ready |
| Beta | beta | Feature preview |
| Development | dev | Unstable, testing only |
Updating the Server
Docker (Recommended)
# Navigate to Bloqd directory
cd /opt/bloqd
# Pull latest image
docker compose pull
# Restart with new image
docker compose up -d
# Verify version
docker compose exec bloqd node -e "console.log(require('./package.json').version)"
Zero-Downtime Update
# Pull new image without stopping
docker compose pull
# Recreate container with new image
docker compose up -d --no-deps bloqd
# Watch logs for startup
docker compose logs -f bloqd
Rollback
# Stop current container
docker compose down
# Use specific version
# Edit docker-compose.yml or use command line
docker compose pull clusterzx/bloqd:1.0.0
# Start with previous version
docker compose up -d
Updating Agents
Automatic Updates
Agents can be updated remotely from the dashboard:
- Navigate to Servers → Select server → Agent tab
- Click Update Agent
- Confirm the update
Manual Agent Update
On each managed server:
# Download latest installer
curl -sSL https://your-bloqd-server.com/api/v1/install -o /tmp/install.sh
# Run with update flag
sudo bash /tmp/install.sh --update
Bulk Agent Update
From the dashboard:
- Navigate to Servers
- Select multiple servers (checkbox)
- Click Bulk Actions → Update Agents
- Monitor progress in the command queue
Agent Update via API
# Update single agent
curl -X POST "https://bloqd.example.com/api/v1/servers/{server_id}/agent/update" \
-H "Authorization: Bearer f2b_your_api_key"
# Update all agents
curl -X POST "https://bloqd.example.com/api/v1/servers/agents/update-all" \
-H "Authorization: Bearer f2b_your_api_key"
Pre-Update Checklist
Before Updating Server
- Backup database - See Backup & Restore
- Check changelog - Review breaking changes
- Test in staging - If possible, test update first
- Plan maintenance window - Notify users if needed
- Verify disk space - Ensure space for new images
Before Updating Agents
- Check agent compatibility - Server and agent versions must be compatible
- Update server first - Always update server before agents
- Test on one server - Update a single agent first
- Have SSH access ready - In case of issues
Database Migrations
Database migrations run automatically on startup:
# View migration logs
docker compose logs bloqd | grep -i migration
# Example output
# [INFO] Running migrations...
# [INFO] Migration 001_initial: already applied
# [INFO] Migration 002_add_commands: already applied
# [INFO] Migration 003_add_siem: applying...
# [INFO] Migration 003_add_siem: completed
# [INFO] All migrations complete
Manual Migration
If automatic migration fails:
# Enter container
docker compose exec bloqd sh
# Run migrations manually
npm run migrate
# Check migration status
npm run migrate:status
Troubleshooting Updates
Server Won't Start After Update
# Check logs
docker compose logs bloqd
# Common issues:
# 1. Database migration failed
# 2. Missing environment variable
# 3. Port already in use
Fix migration issues:
# Restore database backup
cp ./backups/bloqd-backup.db ./data/bloqd.db
# Try update again
docker compose up -d
Agent Update Failed
# Check agent logs
journalctl -u bloqd-agent -n 100
# Reinstall agent
curl -sSL https://your-bloqd-server.com/api/v1/install | sudo bash
Version Mismatch
If agent and server versions are incompatible:
# Check versions
# Server
docker compose exec bloqd node -e "console.log(require('./package.json').version)"
# Agent
cat /etc/bloqd/agent.yaml | grep version
Resolution: Always update server first, then agents.
Update Notifications
Email Notifications
Configure update notifications in .env:
# Not yet implemented - check releases manually
Check for Updates
# Check Docker Hub for latest version
curl -s "https://hub.docker.com/v2/repositories/clusterzx/bloqd/tags" | \
jq -r '.results[0].name'
# Compare with current
docker compose exec bloqd node -e "console.log(require('./package.json').version)"
GitHub Releases
Watch the GitHub repository for releases:
Update Schedule Recommendations
| Component | Frequency | Notes |
|---|---|---|
| Patch versions | Weekly | Security fixes |
| Minor versions | Monthly | New features |
| Major versions | As needed | Review breaking changes |
| Agents | After server | Keep in sync with server |
Downgrade Procedure
Warning
Downgrading may cause data loss if migrations are not reversible.
# Stop Bloqd
docker compose down
# Restore database backup from before update
cp ./backups/bloqd-pre-update.db ./data/bloqd.db
# Pull specific older version
docker pull clusterzx/bloqd:1.0.0
# Update docker-compose.yml
# Change: image: clusterzx/bloqd:latest
# To: image: clusterzx/bloqd:1.0.0
# Start with older version
docker compose up -d