Skip to content

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:

RequirementDetails
Operating SystemUbuntu 22.04 LTS
Docker24.0 or newer installed
DomainThe same domain name you currently use for the panel
Ports80 and 443 open and not in use

Install Docker on the new server if needed:

bash
curl -fsSL https://get.docker.com | bash

Step 1 - Back Up the Database

On your current panel server, export the database:

bash
cd ~/badgerpanel
docker compose exec mysql mysqldump -u root -p badgerpanel > ~/badgerpanel-backup.sql

Enter the MySQL root password when prompted. You can find it in your .credentials file.

Verify the backup file is not empty:

bash
ls -lh ~/badgerpanel-backup.sql

Step 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:

bash
scp -r user@old-server:~/badgerpanel ~/badgerpanel

Or 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:

bash
cat ~/badgerpanel/.credentials

If the file is missing, copy it separately from the old server:

bash
scp user@old-server:~/badgerpanel/.credentials ~/badgerpanel/.credentials

Step 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:

bash
scp user@old-server:~/badgerpanel-backup.sql ~/badgerpanel-backup.sql

Step 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:

bash
dig panel.example.com

The 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:

bash
curl -fsSL https://activate.badgerpanel.com/setup | bash -s -- YOUR_LICENSE_KEY

The 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:

bash
cd ~/badgerpanel
docker compose exec -T mysql mysql -u root -p badgerpanel < ~/badgerpanel-backup.sql

Restart the panel services after restoring the database:

bash
docker compose down
docker compose up -d

Step 8 - Verify Daemon Connections

After the panel is running on the new server:

  1. Log in to the panel and go to Admin > Nodes
  2. Check that all nodes show as connected
  3. 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

TaskStatus
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.

BadgerPanel Documentation