Skip to content

Linux nodes

Add a Linux machine to your panel so it can host game servers.

A node is a machine that hosts game servers. The daemon runs on it and talks to your panel.

What the machine needs

  • A supported Linux distribution: Ubuntu 20.04 or later, Debian 11 or later, or CentOS 8 or later.
  • systemd as the init system.
  • Root access.
  • curl on the machine.
  • Outbound HTTPS access from the machine to your panel.

You do not need Docker in advance. If the machine has no Docker, the install script installs it.

Create the node in the panel

  1. Navigate to Admin > Nodes and click Add Node.
  2. Fill in the form:
FieldDescription
Node NameA name for this node, for example us-east-1.
DescriptionOptional text for your own reference.
FQDN / IP AddressThe domain name or the IP address of the machine. Leave it empty to let the panel find it.
Operating SystemSelect Linux.
Memory Limit (MB)Memory available for game servers. Leave it empty or at 0 to let the daemon report it.
Disk Limit (MB)Disk space available for game servers. Leave it empty or at 0 to let the daemon report it.
  1. Click Create Node. The panel shows the install command.

Run the install command

Copy the command from the panel. Run it on the Linux machine as root:

bash
curl -sSL "https://panel.example.com/api/nodes/install/TOKEN" | sudo bash

Use the command from your panel. It holds your panel address and your token.

What the installer does

  1. Reads the processor architecture. The script supports amd64, arm64, and arm.
  2. Installs Docker if the machine has none.
  3. Downloads the daemon to /usr/local/bin/badger-daemon.
  4. Writes the configuration to /etc/badger-daemon/config.yaml.
  5. Creates /var/lib/badger-daemon/servers for the game server files and /var/log/badger-daemon for the logs.
  6. Installs and starts the badger-daemon system service.
  7. Installs a watchdog timer that restarts the daemon if it stops.

The daemon registers itself with the panel at the first start.

How long the token lasts

The registration token in the install command is valid for 24 hours.

If the token expires, or if you need a new command, open the node in Admin > Nodes and click Regenerate Token. You do not need to delete the node.

To read the command again for a node that has not connected yet, click Install Script.

Check the node is online

Look at the status of the node in Admin > Nodes. The node shows as Online a few seconds after the installation is complete.

StatusMeaning
OnlineThe daemon is connected and sends heartbeats.
PendingYou created the node, but the daemon has not registered yet.
OfflineThe daemon sends no heartbeats. Make sure that the service runs.
MaintenanceAn administrator turned on maintenance mode. The panel places no new servers here.
ErrorThe daemon reported an error. Read the daemon log.

Looking after the service

bash
# Status of the service
systemctl status badger-daemon

# Stop, start, and restart
systemctl stop badger-daemon
systemctl start badger-daemon
systemctl restart badger-daemon

# Status of the watchdog
systemctl status badger-watchdog.timer

Reading the logs

The daemon writes its log to a file. journalctl shows almost nothing, so read the file:

bash
# Follow the log
tail -f /var/log/badger-daemon/daemon.log

# Last 100 lines
tail -n 100 /var/log/badger-daemon/daemon.log

The watchdog writes to /var/log/badger-watchdog.log.

Changing the node settings

Open the node from Admin > Nodes. The Configuration card has these fields:

FieldDescription
NameThe name of the node.
FQDN / IP AddressThe address that the panel and the players use.
Memory Total (GB)Total memory available for game servers.
Disk Total (GB)Total disk space available for game servers.
Memory Overallocate (%)How much more memory than the total you can assign.
Disk Overallocate (%)How much more disk space than the total you can assign.
DescriptionOptional text for your own reference.

Click Save Changes.

Overallocation

Overallocation lets you assign more of a resource than the node has. It works because the game servers do not all run at peak usage at the same time.

ValueEffect
0No overallocation. On a 16 GB node, you can assign 16 GB in total.
5050% more. On a 16 GB node, you can assign 24 GB in total.
-1No limit. The panel does not check this resource.

WARNING

Use overallocation with care. If all servers reach their full assignment at the same time, the node runs out of the resource.

The other settings

The node page has more cards below the configuration:

  • Resource Usage and Connection Status show what the node reports.
  • System Information shows the hostname, the operating system, the kernel, and the Docker version.
  • Storage Pools adds more disks or a fileshare for the server data. Read Node Storage.
  • Docker Daemon Configuration changes /etc/docker/daemon.json from the panel. Docker reads that file at start only, so click Save Config and then Restart Docker.
  • Host Tuning changes kernel settings for network and processor performance. Auto-Tune picks sensible values.
  • Command Signing (HMAC) sets how strict the panel is about signed commands. Leave it at Auto (recommended).
  • Danger Zone finds and removes containers that no longer belong to a server. The node must be online.

Removing a node

Before you remove a node, delete the servers on it or move them to another node. Read Server Migration.

  1. In Admin > Nodes, open the actions menu of the node and click Delete. The dialog lists the servers and the allocations that the panel removes.
  2. On the Linux machine, remove the daemon:
bash
# Stop the services
systemctl stop badger-daemon badger-watchdog.timer
systemctl disable badger-daemon badger-watchdog.timer

# Remove the service files
rm -f /etc/systemd/system/badger-daemon.service
rm -f /etc/systemd/system/badger-watchdog.service
rm -f /etc/systemd/system/badger-watchdog.timer
systemctl daemon-reload

# Remove the program and the configuration
rm -f /usr/local/bin/badger-daemon
rm -f /usr/local/bin/badger-watchdog.sh
rm -rf /etc/badger-daemon

WARNING

The next command deletes every game server file on the node. Make sure that you have the backups that you need.

bash
rm -rf /var/lib/badger-daemon

Next steps

BadgerPanel Documentation