Skip to content

Panel migration

Move your whole panel to another server.

Follow the steps in the order given, so nothing is lost on the way.

This page is the panel itself. To move a game server between nodes, read Server migration.

Before you start

Make sure that the new server meets these requirements:

RequirementDetails
Operating systemUbuntu 22.04 LTS, or another modern Linux with systemd.
Architecturex86_64 (amd64) or arm64.
DomainThe same domain name that the panel uses now.
PortsPort 80 and port 443 open and not in use.
AccessRoot access.

You do not need to install Docker. The installer installs it if it is missing.

Plan for a short outage. The panel is down between the DNS change and the end of the database restore. Your game servers keep running during this time, because they run on your nodes.

Step 1 - read your database name

The installer gives each installation a database name and a database user with a random suffix. You need the exact name.

On the current panel server:

bash
cd ~/badgerpanel
grep -E '^DB_NAME|^DB_ROOT_PASSWORD' .env

Write down the value of DB_NAME. The next commands use it.

Step 2 - back up the database

On the current panel server:

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

Replace YOUR_DB_NAME with the value from step 1. At the prompt, enter the value of DB_ROOT_PASSWORD.

Make sure that the file is not empty:

bash
ls -lh ~/badgerpanel-backup.sql

Step 3 - copy the installation directory

Copy the whole installation directory to the new server. It holds the .env file, the .credentials file, the Docker Compose file, and any certificates that you added.

From the new server:

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

Make sure that the hidden files came across:

bash
ls -la ~/badgerpanel/.env ~/badgerpanel/.credentials

WARNING

Without .env, the panel cannot read its own encrypted data. Do not continue until both files are on the new server.

Step 4 - free the license

A license key activates one time. The key is active on the old server, so the installer stops on the new server.

Reset the activation from your license dashboard before you continue.

Step 5 - stop the old panel

On the old server:

bash
cd ~/badgerpanel
docker compose down

This step stops two panels from writing to the same nodes.

Step 6 - update DNS

Point the A record of your panel domain at the IP address of the new server. The exact steps depend on your DNS provider.

Wait for the change to spread, then check it:

bash
dig +short panel.example.com

The answer must be the IP address of the new server.

Step 7 - run the installer on the new server

Run the installer with your license key:

bash
curl -sSL https://activate.badgerpanel.com/activate/BP-XXXX-XXXX-XXXX-XXXX | bash

The installer finds the .env file that you copied and asks whether to overwrite it. Answer N. The installer then keeps your database name, your passwords, and your keys.

Give the panel 30 to 60 seconds to answer for the first time.

Step 8 - restore the database

On the new server:

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

Restart the services:

bash
docker compose down
docker compose up -d

Step 9 - check the nodes

  1. Sign in to the panel and go to Admin > Nodes.
  2. Make sure that every node shows as Online.

Each daemon connects outward to your panel address, so a daemon reconnects on its own after the DNS change.

If a node stays offline, work on that node:

bash
# Restart the daemon
systemctl restart badger-daemon

# Make sure that the node can reach the panel
curl -I https://panel.example.com

# Read the daemon log
tail -n 50 /var/log/badger-daemon/daemon.log

On a Windows node:

powershell
Restart-Service BadgerDaemon
Get-Content C:\BadgerDaemon\logs\daemon.log -Tail 50

Checklist

Work through this list before you shut down the old server:

TaskDone
The panel answers at your domain
The certificate is valid, with no browser warning
Your administrator account signs in
Every node shows as Online
The game servers are visible in the panel
The console and the power controls work on a test server
Email from the panel arrives
Billing and support pages open

After every check passes, you can decommission the old server. Keep the database backup file in a safe place.

Next steps

BadgerPanel Documentation