Migration
This guide covers moving your BadgerPanel installation from one server to another. Follow these steps carefully to avoid data loss.
Prerequisites
Before starting, make sure the new server meets the following requirements:
| Requirement | Details |
|---|---|
| Operating System | Ubuntu 22.04 LTS |
| Docker | 24.0 or newer installed |
| Domain | The same domain name you currently use for the panel |
| Ports | 80 and 443 open and not in use |
Install Docker on the new server if needed:
curl -fsSL https://get.docker.com | bashStep 1 - Back Up the Database
On your current panel server, export the database:
cd ~/badgerpanel
docker compose exec mysql mysqldump -u root -p badgerpanel > ~/badgerpanel-backup.sqlEnter the MySQL root password when prompted. You can find it in your .credentials file.
Verify the backup file is not empty:
ls -lh ~/badgerpanel-backup.sqlStep 2 - Copy the Installation Directory
Copy the full installation directory from the old server to the new server. This includes configuration files, environment settings, and any custom SSL certificates.
From the new server:
scp -r user@old-server:~/badgerpanel ~/badgerpanelOr use your preferred file transfer method. Make sure the entire ~/badgerpanel directory is transferred.
Step 3 - Copy the Credentials File
The .credentials file is critical for maintaining your installation identity. Verify it was included in the directory copy:
cat ~/badgerpanel/.credentialsIf the file is missing, copy it separately from the old server:
scp user@old-server:~/badgerpanel/.credentials ~/badgerpanel/.credentialsStep 4 - Copy the Database Backup
If you did not already transfer it as part of the directory copy, move the database backup to the new server:
scp user@old-server:~/badgerpanel-backup.sql ~/badgerpanel-backup.sqlStep 5 - Update DNS
Update your panel domain's DNS A record to point to the new server's IP address. The exact steps depend on your DNS provider.
After updating, wait for DNS propagation. You can check with:
dig panel.example.comThe result should show the new server's IP address.
Step 6 - Run the Installer on the New Server
Run the installer on the new server with your license key:
curl -fsSL https://activate.badgerpanel.com/setup | bash -s -- YOUR_LICENSE_KEYThe installer will detect the existing configuration files and set up the services accordingly.
Step 7 - Restore the Database
Once the panel services are running on the new server, import your database backup:
cd ~/badgerpanel
docker compose exec -T mysql mysql -u root -p badgerpanel < ~/badgerpanel-backup.sqlRestart the panel services after restoring the database:
docker compose down
docker compose up -dStep 8 - Verify Daemon Connections
After the panel is running on the new server:
- Log in to the panel and go to Admin > Nodes
- Check that all nodes show as connected
- Daemons connect outbound to the panel URL, so they should reconnect automatically once DNS has propagated
If a node remains offline:
- Restart the daemon on that node:
systemctl restart badger-daemon - Verify the node can resolve and reach the panel domain:
curl -I https://panel.example.com - Check daemon logs:
journalctl -u badger-daemon --tail 50
Post-Migration Checklist
| Task | Status |
|---|---|
| Panel accessible at your domain | |
| Admin login works with existing credentials | |
| All nodes show as connected | |
| Game servers visible and manageable | |
| Server console and start/stop controls work | |
| SSL certificate valid (no browser warnings) | |
| Old server shut down or decommissioned |
Once everything is verified on the new server, you can safely decommission the old server. Keep the database backup file stored somewhere safe as an additional precaution.
