Upgrading BadgerDaemon
This guide covers how to upgrade the BadgerDaemon binary on your game server nodes. Daemon upgrades are typically required when the panel is updated to ensure protocol compatibility.
Version Compatibility
The panel and daemon should always run compatible versions. After upgrading the panel, check if a daemon upgrade is required. The panel admin area shows each node's daemon version and will indicate when an update is available.
Before You Begin
Check Current Version
badgerdaemon --versionOr check in the admin panel under Admin > Nodes -- each node shows its running daemon version.
Plan for Downtime
Upgrading the daemon requires a brief restart. During the restart:
- Game servers continue running (Docker containers are independent of the daemon process)
- Console streaming and power actions are temporarily unavailable (typically 5-10 seconds)
- SFTP connections are disconnected and must reconnect
Active Installations
If any servers are currently being installed, wait for installation to complete before upgrading. Interrupting an installation may leave the server in a broken state.
Upgrade Process
Option A: Using the Panel's Install Script (Recommended)
The simplest way to upgrade is to re-run the installation command from the panel. It will detect the existing installation and update the binary in place.
- In the panel admin area, navigate to Admin > Nodes
- Click on the node you want to upgrade
- Go to the Installation tab
- Copy the installation command
- Run it on the node:
curl -sSL https://panel.your-domain.com/api/v1/nodes/install/<node-id> | bash -s -- --token <auth-token>The script will:
- Download the latest daemon binary from the panel
- Stop the daemon service
- Replace the binary at
/usr/local/bin/badgerdaemon - Restart the daemon service
- Preserve your existing configuration
Option B: Manual Upgrade
Step 1: Download the New Binary
# Download the latest binary from your panel
curl -o /tmp/badgerdaemon \
"https://panel.your-domain.com/api/v1/daemon/download?arch=amd64"
chmod +x /tmp/badgerdaemonStep 2: Verify the Download
# Check the new version
/tmp/badgerdaemon --versionStep 3: Stop the Daemon
systemctl stop badgerdaemonStep 4: Replace the Binary
# Back up the old binary (optional)
cp /usr/local/bin/badgerdaemon /usr/local/bin/badgerdaemon.bak
# Install the new binary
mv /tmp/badgerdaemon /usr/local/bin/badgerdaemonStep 5: Restart the Daemon
systemctl start badgerdaemonStep 6: Verify
# Check service status
systemctl status badgerdaemon
# Check logs for successful startup
journalctl -u badgerdaemon --tail 20
# Verify version
badgerdaemon --versionPost-Upgrade Verification
After upgrading, verify the following in the panel admin area:
- Node status -- The node should show as online (green indicator)
- Daemon version -- Should reflect the new version
- System stats -- CPU, memory, and disk statistics should be reporting
- Server console -- Open a running server's console and verify output is streaming
- Power actions -- Test start/stop on a non-production server if possible
Upgrading Multiple Nodes
If you have many daemon nodes to upgrade, you can script the process:
#!/bin/bash
# upgrade-daemons.sh
# Run this on each node, or use SSH to execute remotely
PANEL_URL="https://panel.your-domain.com"
ARCH=$(uname -m)
case $ARCH in
x86_64) ARCH="amd64" ;;
aarch64) ARCH="arm64" ;;
armv7l) ARCH="arm" ;;
esac
echo "Downloading latest daemon binary ($ARCH)..."
curl -o /tmp/badgerdaemon "$PANEL_URL/api/v1/daemon/download?arch=$ARCH"
chmod +x /tmp/badgerdaemon
echo "Stopping daemon..."
systemctl stop badgerdaemon
echo "Replacing binary..."
cp /usr/local/bin/badgerdaemon /usr/local/bin/badgerdaemon.bak
mv /tmp/badgerdaemon /usr/local/bin/badgerdaemon
echo "Starting daemon..."
systemctl start badgerdaemon
echo "Verifying..."
systemctl status badgerdaemon --no-pager
badgerdaemon --versionParallel Upgrades
It is safe to upgrade multiple daemon nodes simultaneously since they operate independently. However, stagger upgrades if you want to minimize the window where console/SFTP access is unavailable.
Rolling Back
If the new daemon version causes issues:
# Stop the daemon
systemctl stop badgerdaemon
# Restore the backup
cp /usr/local/bin/badgerdaemon.bak /usr/local/bin/badgerdaemon
# Start with the old version
systemctl start badgerdaemonPanel Compatibility
If you roll back the daemon, ensure the panel version is still compatible with the older daemon version. Check the release notes for minimum required daemon versions.
Troubleshooting Upgrades
Daemon Won't Start After Upgrade
journalctl -u badgerdaemon --tail 50Common causes:
- Configuration format changed -- Check if new configuration options are required. Compare your config with the latest example.
- Permission issues -- Ensure the binary is executable:
chmod +x /usr/local/bin/badgerdaemon - Architecture mismatch -- Verify you downloaded the correct binary for your system:
uname -m
Game Servers Offline After Restart
Game server Docker containers should survive a daemon restart. If servers show as offline:
- Check that Docker containers are still running:
docker ps - The daemon may need a moment to re-discover existing containers
- If containers stopped, start them from the panel using the power button
Next Steps
- Daemon Configuration -- Review configuration options after upgrade
- Troubleshooting -- General troubleshooting guide