Skip to content

Daemon settings

Read the state of a node, and change the settings the panel does not cover.

The installer writes a settings file on every node, and most nodes never need it touched. Start with the node page in the panel, and come back here for the rest.

What the node page shows

Open Admin > Nodes and click a node.

Connection status gives the status, the daemon version, the uptime and when the node was last seen. A node that has fallen over shows its last error here.

System information gives the hostname, the operating system, the architecture and the kernel. A Linux node adds its container runtime and Docker version, and a Windows node says it runs games directly. Both add the public and private addresses, and Linux adds the load average.

Those details arrive when the daemon connects, so an offline node that has never checked in shows a note instead.

Daemon status repeats the version, the uptime and the platform. Daemon updates below it tells you when a newer daemon is out, and marks the update required when it is. Update from there rather than from the node itself.

Where the settings file lives

SystemPath
Linux/etc/badger-daemon/config.yaml
WindowsC:\BadgerDaemon\config.yaml

After any change, restart the daemon.

bash
systemctl restart badger-daemon
powershell
Restart-Service BadgerDaemon

What you can change from the panel

Most settings live in the file alone. The panel changes two of them over its connection to the daemon, which writes them into the file itself.

  • The storage drives of a Windows node, from the Storage Drives card.
  • The command signing setting, from the Command Signing (HMAC) card.

The panel also changes /etc/docker/daemon.json and the kernel settings of a Linux node, from the Docker Daemon Configuration and Host Tuning cards. Those two files are not part of the daemon configuration.

For every other setting, edit the file on the node and restart the daemon.

The file the installer writes, on Linux

yaml
node:
  uuid: ""
  name: "us-east-1"

panel:
  url: "https://panel.example.com"
  api_key: ""
  registration_token: "YOUR_TOKEN"
  insecure_skip_tls: false
  timeout: "30s"

servers:
  data_dir: "/var/lib/badger-daemon/servers"
  container_runtime: "docker"

heartbeat:
  interval: "30s"
  timeout_seconds: 60

sftp:
  enabled: true
  port: 2022
  host_key: "/etc/badger-daemon/sftp_host_key"

logging:
  level: "info"
  format: "json"
  file: "/var/log/badger-daemon/daemon.log"

update:
  enabled: true
  check_interval: "1h"
  auto_restart: true

The daemon replaces registration_token with an encrypted api_key at the first start.

Panel connection

OptionDescriptionDefault
panel.urlAddress of your panel.Required
panel.api_keyKey for this node. The daemon writes it and encrypts it.-
panel.registration_tokenOne-time token. The daemon uses it once and then writes an api_key.-
panel.timeoutRequest timeout.30s
panel.insecure_skip_tlsSkip the TLS check.false
panel.allowed_originsExtra addresses that can connect to the daemon.-

The file needs panel.url, and either panel.api_key or panel.registration_token.

WARNING

insecure_skip_tls turns off the TLS certificate check. To use it, you must also set the environment variable BADGER_ALLOW_INSECURE_TLS=true. Never use it in production.

The API key gives full control of the node. Keep the file private. If the key leaks, click Regenerate Token in the panel and run the install command again.

Node identity

OptionDescriptionDefault
node.uuidSet by the panel at registration. Do not edit it.-
node.nameName of the node.The name that you gave in the panel

Server storage

OptionDescriptionDefault
servers.data_dirRoot directory for the game server files./var/lib/badger-daemon/servers
servers.container_runtimeContainer runtime.docker

The daemon puts the files of each server in a directory named after the UUID of that server:

/var/lib/badger-daemon/servers/
└── a1b2c3d4-e5f6-7890-abcd-ef1234567890/
    ├── server.jar
    ├── server.properties
    └── world/

Use SSD storage for the best performance.

Heartbeat

OptionDescriptionDefault
heartbeat.intervalHow often the daemon reports to the panel.30s
heartbeat.timeout_secondsTimeout of one heartbeat.60

The panel writes a metrics sample on each heartbeat. A shorter interval gives more detail in the monitoring charts and more load on the panel.

SFTP

OptionDescriptionDefault
sftp.enabledTurn the built-in SFTP server on or off.true
sftp.portSFTP port.2022
sftp.host_keyPath of the SFTP host key.Written by the installer

Users sign in with their panel account. Each user reaches the files of their own servers only.

ItemValue
HostThe IP address or domain name of the node
Port2022, or the port that you set
UsernameThe panel email address of the user
PasswordThe panel password of the user

Logging

OptionDescriptionDefault
logging.leveldebug, info, warn, or error.info
logging.formatjson or text.json
logging.filePath of the log file. Leave it empty to write to the console only.Written by the installer

Use the debug level for a short time only. It produces a large amount of output.

Updates

OptionDescriptionDefault
update.enabledTurn the update function on. The panel needs it to push an update.true
update.check_intervalHow often the daemon looks for an update.1h
update.auto_updateInstall an update without a request from the panel. Linux only.false
update.auto_restartRestart the daemon after an update.true

System user, on Linux

OptionDescriptionDefault
system.user.uidUser ID that owns the game server files.1000
system.user.gidGroup ID that owns the game server files.1000

These values must match the user inside the game server images. If you build your own images, change these values to match them.

Local API, on Linux

OptionDescriptionDefault
api.enabledTurn on a local HTTP API on the node.false
api.portPort of the local API.8080
api.cert_fileTLS certificate for the local API.-
api.key_fileTLS key for the local API.-

Backup storage, on Linux

Add a storage section to send the backups of this node to object storage.

OptionDescriptionDefault
storage.typelocal, minio, or s3.local
storage.local_pathDirectory for local backups./var/lib/badger-daemon/backups
storage.endpointAddress of the object storage.-
storage.access_keyAccess key.-
storage.secret_keySecret key.-
storage.bucketBucket name.-
storage.regionRegion name.-
storage.use_sslUse HTTPS for the object storage.false
storage.presigned_expiryLife of a download link, in seconds.3600

Server migration, on Linux

The installer does not write this section. Add it to let the node send or receive a game server, and read Server migration.

OptionDescriptionDefault
migration.enabledLet this node take part in migrations.false
migration.listen_portPort for node-to-node transfers.8444
migration.temp_dirWorking directory for a transfer./var/lib/badger-daemon/migration
migration.identity_dirDirectory of the transfer keys./var/lib/badger-daemon/migration/identity
migration.max_concurrentTransfers at the same time, in and out together.2
migration.timeout_hoursTime limit of one transfer.4
migration.trash_retention_hoursHow long a node keeps the files of a server that moved away.72

Windows settings

A Windows node uses the same node, panel, servers, heartbeat, sftp, logging, and update sections. These differences apply:

  • servers.container_runtime is always native. The daemon ignores any other value.
  • servers.data_dir is C:\BadgerDaemon\data\servers.
  • update.auto_update does not exist.
  • There is no system, api, storage, or migration section.
  • servers.allowed_drives lists the disks that the daemon can use.
yaml
servers:
  data_dir: "C:\\BadgerDaemon\\data\\servers"
  container_runtime: "native"
  allowed_drives:
    - path: "C:\\BadgerDaemon\\data\\servers"
      max_disk: 0
      label: "Primary Drive"
    - path: "D:\\GameServers"
      max_disk: 500000
      label: "Game SSD"

max_disk is in MB. A value of 0 means no limit.

Change the drives from the Storage drives card in the panel rather than here, and the panel writes the file for you. Read Node storage.

Command line options

OptionDescription
--configPath of the configuration file.
--log-levelOverride the log level: debug, info, warn, or error.
--versionPrint the version and stop.
--generate-configPrint a sample configuration file.

The Windows daemon also has --install and --uninstall for the Windows service.

Next steps

BadgerPanel Documentation