Skip to content

Linux Node Setup

This guide walks you through adding a Linux node to BadgerPanel. A node is a server that hosts your game servers - the daemon runs on each node and communicates with the panel to manage game server processes.


Prerequisites

Before installing a Linux node, ensure your server has:

  • Docker installed and running
  • systemd as the init system (most modern distros)
  • curl available
  • A supported Linux distribution (Ubuntu 20.04+, Debian 11+, CentOS 8+, Rocky 8+, AlmaLinux 8+)
  • Root or sudo access
  • Network connectivity to your panel URL (HTTPS)

Creating the Node in the Panel

  1. Navigate to Admin > Nodes and click Add Node.
  2. Fill in the node details:
FieldDescription
NameA friendly name for this node (e.g., "US East 1")
DescriptionOptional description for your reference
FQDNThe fully qualified domain name or IP address of the server
OSSelect Linux
MemoryTotal memory available for game servers (in MB)
DiskTotal disk space available for game servers (in MB)
Memory OverallocationPercentage of memory overallocation allowed (0 = none)
Disk OverallocationPercentage of disk overallocation allowed (0 = none)
  1. Click Create. The panel generates a one-line install command.

Running the Install Command

Copy the install command from the panel and run it on your Linux server:

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

Replace the URL with the actual command shown in your panel. The command includes a unique registration token.

What the Install Script Does

  1. Detects your OS - identifies your Linux distribution and version
  2. Downloads the daemon binary - fetches the correct binary for your architecture
  3. Creates the configuration - writes the config file to /etc/badger-daemon/config.yaml
  4. Registers with the panel - uses the token to authenticate and register the node
  5. Installs a systemd service - creates and enables the badger-daemon service
  6. Starts the daemon - the daemon begins communicating with the panel immediately

Token Validity

The registration token in the install command is:

  • Valid for 1 hour from creation
  • One-time use - it cannot be reused after a successful installation

If the token expires or is already used, delete the node in the panel and create a new one to generate a fresh token.


Verifying the Connection

After running the install script, return to the panel and check the node's status in Admin > Nodes.

StatusMeaning
OnlineThe daemon is connected and communicating normally
OfflineThe daemon is not sending heartbeats - check if the service is running
PendingThe node was created but the daemon has not connected yet
ErrorThe daemon reported an error - check the daemon logs for details

The node should show as Online within a few seconds of completing the installation.


Service Management

The daemon runs as a systemd service called badger-daemon. Use standard systemctl commands to manage it:

bash
# Check the service status
systemctl status badger-daemon

# Stop the daemon
systemctl stop badger-daemon

# Start the daemon
systemctl start badger-daemon

# Restart the daemon
systemctl restart badger-daemon

# Disable the daemon from starting on boot
systemctl disable badger-daemon

# Re-enable starting on boot
systemctl enable badger-daemon

Viewing Logs

Use journalctl to view daemon logs:

bash
# Follow live logs
journalctl -u badger-daemon -f

# View the last 100 lines
journalctl -u badger-daemon --tail 100

# View logs from the last hour
journalctl -u badger-daemon --since "1 hour ago"

# View errors only
journalctl -u badger-daemon -p err

Resource Limits

Resource limits control how much of the node's hardware is available for game servers.

Memory

Set the total memory available in the node settings. Game servers cannot be created if the node's allocated memory would exceed the limit. Use memory overallocation to allow allocating more memory than physically available - useful when not all servers run at peak usage simultaneously.

Disk

Set the total disk space available in the node settings. Similar to memory, disk overallocation allows allocating more disk space than physically available.

Overallocation

Overallocation is expressed as a percentage:

  • 0% - no overallocation. If the node has 16 GB of memory, you can allocate exactly 16 GB across all servers.
  • 50% - allows allocating 150% of the physical resource. A 16 GB node could have 24 GB allocated across servers.
  • -1 - unlimited overallocation (no enforcement).

Use overallocation carefully. If all servers consume their full allocation at the same time, the node may run out of resources.


Removing a Node

Before removing a node, you must first delete or transfer all servers hosted on it.

  1. In the panel, go to Admin > Nodes, select the node, and click Delete.
  2. On the Linux server, stop and remove the daemon:
bash
# Stop and disable the service
systemctl stop badger-daemon
systemctl disable badger-daemon

# Remove the service file
rm /etc/systemd/system/badger-daemon.service
systemctl daemon-reload

# Remove the daemon binary and configuration
rm -rf /etc/badger-daemon
rm /usr/local/bin/badger-daemon

# Optionally remove server data (WARNING: deletes all game server files)
rm -rf /var/lib/badger-daemon

BadgerPanel Documentation