Daemon Configuration
BadgerDaemon is configured through a YAML file at /etc/badger-daemon/config.yaml. After any changes, restart the daemon:
systemctl restart badger-daemonYou can specify a different config path:
badger-daemon --config /path/to/config.yamlFull Configuration Reference
# Panel connection
panel:
url: "https://panel.your-domain.com"
api_key: "your-api-key-here"
# OR use registration token for first-time setup:
# registration_token: "your-registration-token"
timeout: "30s"
# insecure_skip_tls: false
# Node identity
node:
# uuid: "auto-assigned"
# name: "node-1" # defaults to hostname
# Heartbeat
heartbeat:
interval: "30s"
timeout_seconds: 60
# Logging
logging:
level: "info"
format: "text"
# file: "/var/log/badger-daemon.log"
# Server storage
servers:
data_dir: "/var/lib/badger-daemon/servers"
container_runtime: "docker"
# SFTP server
sftp:
enabled: true
port: 2022
# Remote updates
update:
enabled: true
check_interval: "1h"
auto_update: false
auto_restart: false
# Backup storage (optional)
# storage:
# type: "local" # local, minio, s3
# local_path: "/var/lib/badger-daemon/backups"Panel Connection
| Option | Description | Default |
|---|---|---|
panel.url | Full URL of your BadgerPanel instance | Required |
panel.api_key | API key for authentication (from the panel) | Required |
panel.registration_token | One-time token for auto-registration (alternative to api_key) | - |
panel.timeout | Request timeout | 30s |
panel.insecure_skip_tls | Skip TLS verification (not recommended) | false |
The panel.url must be reachable over HTTPS from the daemon node. The API key is generated when you create the node in the panel. If using registration_token, the daemon registers itself on first start and replaces the token with an api_key automatically.
Security: The API key provides full control over the daemon. Keep it secret and never share it. If compromised, regenerate it from the panel.
Node Identity
| Option | Description | Default |
|---|---|---|
node.uuid | Node UUID (auto-assigned during registration) | Auto |
node.name | Display name for this node | Hostname |
Heartbeat
| Option | Description | Default |
|---|---|---|
heartbeat.interval | How often to send heartbeats to the panel | 30s |
heartbeat.timeout_seconds | Heartbeat response timeout | 60 |
Server Storage
| Option | Description | Default |
|---|---|---|
servers.data_dir | Root directory for server files | /var/lib/badger-daemon/servers |
servers.container_runtime | Container runtime to use | docker |
Each server's files are stored in a subdirectory named by UUID:
/var/lib/badger-daemon/servers/
├── a1b2c3d4-e5f6-7890-abcd-ef1234567890/
│ ├── server.jar
│ ├── server.properties
│ └── world/Use fast SSD storage for best performance.
SFTP
| Option | Description | Default |
|---|---|---|
sftp.enabled | Enable the built-in SFTP server | true |
sftp.port | SFTP listening port | 2022 |
Users connect with their panel credentials. Each user is scoped to their own server's directory.
Connection details:
- Host: Node IP or FQDN
- Port: 2022 (or your configured port)
- Username: Panel email address
- Password: Panel password
Logging
| Option | Description | Default |
|---|---|---|
logging.level | Log level: debug, info, warn, error | info |
logging.format | Output format: text or json | text |
logging.file | Log file path (omit for stdout only) | - |
Only use
debugtemporarily - it produces high-volume output.
Updates
| Option | Description | Default |
|---|---|---|
update.enabled | Enable update functionality (required for remote updates) | true |
update.check_interval | How often to check for updates | 1h |
update.auto_update | Automatically install updates | false |
update.auto_restart | Restart daemon after auto-update | false |
Backup Storage
| Option | Description | Default |
|---|---|---|
storage.type | Storage backend: local, minio, or s3 | - |
storage.local_path | Path for local backup storage | - |
Windows-Specific Options
Windows daemons support multi-drive configuration, allowing you to spread servers across multiple disks. Configure drives in the panel under the node's settings. Each drive has a path, max disk allocation, and label.
Viewing Logs
# Live logs
journalctl -u badger-daemon -f
# Last 100 lines
journalctl -u badger-daemon --tail 100
# Logs from the last hour
journalctl -u badger-daemon --since "1 hour ago"
# Errors only
journalctl -u badger-daemon -p errOr read the log file directly (if configured):
tail -f /var/log/badger-daemon.logCommand-Line Flags
| Flag | Description |
|---|---|
--config | Path to config file (default: /etc/badger-daemon/config.yaml) |
--version | Print version and exit |
--debug | Override log level to debug |
