Skip to main content

Updates

Keep your Bloqd installation up to date with the latest features and security fixes.

Update Strategy​

Version Numbering​

Bloqd follows semantic versioning (SemVer):

VersionMeaningExample
MajorBreaking changes1.x.x → 2.0.0
MinorNew features, backwards compatible1.0.x → 1.1.0
PatchBug fixes, security patches1.0.0 → 1.0.1

Update Channels​

ChannelTagStability
StablelatestProduction ready
BetabetaFeature preview
DevelopmentdevUnstable, testing only

Updating the Server​

# 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 bloqd/bloqd-server:1.0.0

# Start with previous version
docker compose up -d

Updating Agents​

Automatic Updates​

Agents can be updated remotely from the dashboard:

  1. Navigate to Servers → Select server → Agent tab
  2. Click Update Agent
  3. 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:

  1. Navigate to Servers
  2. Select multiple servers (checkbox)
  3. Click Bulk Actions → Update Agents
  4. 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/bloqd/bloqd-server/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​

ComponentFrequencyNotes
Patch versionsWeeklySecurity fixes
Minor versionsMonthlyNew features
Major versionsAs neededReview breaking changes
AgentsAfter serverKeep 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 bloqd/bloqd-server:1.0.0

# Update docker-compose.yml
# Change: image: bloqd/bloqd-server:latest
# To: image: bloqd/bloqd-server:1.0.0

# Start with older version
docker compose up -d