Installing BadgerDaemon
BadgerDaemon is the node agent that manages Docker containers for game servers. It runs as a single Go binary on each server (bare-metal or VPS) that you want to use for hosting game servers.
Prerequisites
System Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4+ cores (depends on number of game servers) |
| RAM | 2 GB + game server RAM | As much as your servers need |
| Disk | 20 GB SSD + game server storage | NVMe SSD recommended |
| OS | Ubuntu 20.04+ / Debian 11+ / RHEL 8+ | Ubuntu 22.04 LTS |
| Architecture | amd64, arm64, or armv7 | amd64 |
Resource Planning
The daemon itself uses very little resources (< 100 MB RAM, negligible CPU). The majority of resources on the node are consumed by game server containers. Plan your node's RAM and CPU based on how many game servers you intend to host.
Software Requirements
- Docker 24.0+ (required for running game server containers)
- systemd (for running the daemon as a service)
- curl or wget (for the installation script)
Network Requirements
- Outbound HTTPS (443) to your panel URL (for the WebSocket connection)
- Inbound TCP/UDP on the port range you assign for game servers (e.g., 25565-25665)
- Inbound TCP 2022 (default SFTP port, configurable)
Installing Docker
curl -fsSL https://get.docker.com | bash
# Verify Docker is running
systemctl status docker
docker --versionStep 1: Register the Node in the Panel
Before installing the daemon, you need to register the node in your BadgerPanel admin area.
- Log into your panel as an administrator
- Navigate to Admin > Nodes
- Click Create Node
- Fill in the node details:
| Field | Description | Example |
|---|---|---|
| Name | Display name for this node | US-East-1 |
| FQDN | Fully qualified domain name or IP of the node | node1.your-domain.com |
| Memory | Total memory available for game servers (MB) | 16384 |
| Disk | Total disk space available for game servers (MB) | 100000 |
| Memory Overallocate | Percentage to overallocate memory (0 = none) | 0 |
| Disk Overallocate | Percentage to overallocate disk (0 = none) | 0 |
- After creating the node, you will see an Installation tab with a generated installation command
Step 2: Configure Allocations
Allocations are IP:port pairs that game servers can bind to. You need to create allocations before servers can be deployed on this node.
- On the node's detail page, go to the Allocations tab
- Click Create Allocation
- Enter the IP address and port range:
| Field | Description | Example |
|---|---|---|
| IP Address | The public IP of the node | 203.0.113.10 |
| Port Range | Range of ports to allocate | 25565-25665 |
Port Ranges
Create a range large enough for the number of servers you plan to host. Each game server needs at least one allocation. Some games require additional ports (e.g., Minecraft query port, RCON port).
Step 3: Install the Daemon
Option A: One-Command Installation Script
The panel generates a ready-to-run installation command. Copy it from the node's Installation tab in the admin panel:
# Example installation command (your token will be different)
curl -sSL https://panel.your-domain.com/api/v1/nodes/install/<node-id> | bash -s -- --token <auth-token>The installation script will:
- Download the correct daemon binary for your system architecture
- Place it at
/usr/local/bin/badgerdaemon - Create the configuration file at
/etc/badgerdaemon/config.yml - Create a systemd service unit
- Start the daemon and enable it to start on boot
Option B: Manual Installation
If you prefer to install manually:
1. Download the Binary
Download the daemon binary from your panel. The panel compiles daemon binaries for multiple architectures:
# Determine your architecture
uname -m
# x86_64 = amd64, aarch64 = arm64, armv7l = arm
# Download from your panel
curl -o /usr/local/bin/badgerdaemon \
"https://panel.your-domain.com/api/v1/daemon/download?arch=amd64"
chmod +x /usr/local/bin/badgerdaemon2. Create the Configuration
mkdir -p /etc/badgerdaemonCreate /etc/badgerdaemon/config.yml:
# BadgerDaemon Configuration
panel_url: "https://panel.your-domain.com"
token: "your-node-authentication-token"
# Data directory for server files
data_directory: "/var/lib/badgerdaemon/servers"
# SFTP configuration
sftp:
enabled: true
port: 2022
bind_address: "0.0.0.0"
# Docker configuration
docker:
socket: "/var/run/docker.sock"
network: "badgerpanel"
# Logging
log:
level: "info" # debug, info, warn, error
file: "/var/log/badgerdaemon/daemon.log"3. Create Data Directories
mkdir -p /var/lib/badgerdaemon/servers
mkdir -p /var/log/badgerdaemon4. Create the Systemd Service
Create /etc/systemd/system/badgerdaemon.service:
[Unit]
Description=BadgerDaemon - Game Server Node Agent
After=docker.service
Requires=docker.service
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/badgerdaemon --config /etc/badgerdaemon/config.yml
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target5. Start the Service
systemctl daemon-reload
systemctl enable badgerdaemon
systemctl start badgerdaemonStep 4: Verify the Connection
Check the Service Status
systemctl status badgerdaemonYou should see active (running).
Check Daemon Logs
journalctl -u badgerdaemon --tail 20Look for messages indicating a successful connection to the panel.
Verify in the Panel
In the admin dashboard, navigate to Admin > Nodes. Your node should show a green status indicator indicating it is connected and online.
The node detail page will show:
- Connection status (online/offline)
- Daemon version
- System statistics (CPU, memory, disk usage)
- Number of active servers
Step 5: Firewall Configuration
Ensure the following ports are accessible:
# UFW (Ubuntu)
sudo ufw allow 2022/tcp # SFTP
sudo ufw allow 25565:25665/tcp # Game server ports (adjust range)
sudo ufw allow 25565:25665/udp # Some games use UDP
# firewalld (RHEL/CentOS)
sudo firewall-cmd --permanent --add-port=2022/tcp
sudo firewall-cmd --permanent --add-port=25565-25665/tcp
sudo firewall-cmd --permanent --add-port=25565-25665/udp
sudo firewall-cmd --reloadOutbound Connections
The daemon needs outbound HTTPS access to your panel URL. Ensure your firewall allows outbound connections on port 443.
Troubleshooting Installation
Daemon Won't Start
# Check the logs for error details
journalctl -u badgerdaemon --tail 50
# Verify the binary is executable
ls -la /usr/local/bin/badgerdaemon
# Verify the config file exists and is valid
cat /etc/badgerdaemon/config.yml
# Verify Docker is running
systemctl status dockerDaemon Shows Offline in Panel
- Verify the
panel_urlin the config points to your panel's correct URL - Verify the
tokenmatches the one generated by the panel - Check that the daemon node can reach the panel:
curl -I https://panel.your-domain.com - Check for TLS certificate issues:
curl -v https://panel.your-domain.com 2>&1 | grep SSL
Docker Permission Issues
The daemon needs access to the Docker socket. If running as a non-root user, add the user to the docker group:
usermod -aG docker badgerdaemon
systemctl restart badgerdaemonRunning as Root
For simplicity, the daemon is typically run as root since it needs to manage Docker containers and bind to privileged ports. The game server containers themselves run with limited permissions inside Docker.
Next Steps
- Daemon Configuration -- Advanced configuration options
- Upgrading the Daemon -- How to update to newer versions
- Supported Games -- Game server templates available