Skip to content

Daemon Configuration

BadgerDaemon is configured through a YAML file at /etc/badger-daemon/config.yaml. After any changes, restart the daemon:

bash
systemctl restart badger-daemon

You can specify a different config path:

bash
badger-daemon --config /path/to/config.yaml

Full Configuration Reference

yaml
# 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

OptionDescriptionDefault
panel.urlFull URL of your BadgerPanel instanceRequired
panel.api_keyAPI key for authentication (from the panel)Required
panel.registration_tokenOne-time token for auto-registration (alternative to api_key)-
panel.timeoutRequest timeout30s
panel.insecure_skip_tlsSkip 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

OptionDescriptionDefault
node.uuidNode UUID (auto-assigned during registration)Auto
node.nameDisplay name for this nodeHostname

Heartbeat

OptionDescriptionDefault
heartbeat.intervalHow often to send heartbeats to the panel30s
heartbeat.timeout_secondsHeartbeat response timeout60

Server Storage

OptionDescriptionDefault
servers.data_dirRoot directory for server files/var/lib/badger-daemon/servers
servers.container_runtimeContainer runtime to usedocker

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

OptionDescriptionDefault
sftp.enabledEnable the built-in SFTP servertrue
sftp.portSFTP listening port2022

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

OptionDescriptionDefault
logging.levelLog level: debug, info, warn, errorinfo
logging.formatOutput format: text or jsontext
logging.fileLog file path (omit for stdout only)-

Only use debug temporarily - it produces high-volume output.

Updates

OptionDescriptionDefault
update.enabledEnable update functionality (required for remote updates)true
update.check_intervalHow often to check for updates1h
update.auto_updateAutomatically install updatesfalse
update.auto_restartRestart daemon after auto-updatefalse

Backup Storage

OptionDescriptionDefault
storage.typeStorage backend: local, minio, or s3-
storage.local_pathPath 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

bash
# 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 err

Or read the log file directly (if configured):

bash
tail -f /var/log/badger-daemon.log

Command-Line Flags

FlagDescription
--configPath to config file (default: /etc/badger-daemon/config.yaml)
--versionPrint version and exit
--debugOverride log level to debug

BadgerPanel Documentation