Skip to main content

Installation

Daniel's Disk Tester runs natively on Debian. Direct hardware access (USB-SATA bridges, SMART passthrough, hotplug) works most reliably this way. A Debian system (12 or 13) with root access is required.

One-command installation​

As root on the target machine:

curl -fsSL https://disk-tester.znbw.de/install.sh | sudo bash

The script downloads the current version from the homepage (the package is built into it, so no GitHub access and no token are needed), verifies the SHA256 checksum of the package and starts deploy/install.sh from the package. The release package is prebuilt; nothing is compiled on the target system.

Updates and rollback: see Updates.

Installation from source​

On the target machine as root, from a copy of the repo:

./deploy/install.sh

The script

  • installs missing packages (smartmontools, e2fsprogs, util-linux, hdparm, nvme-cli, rsync, curl) and Node.js 24 from NodeSource if no suitable Node.js (20.9 or newer) is present,
  • puts everything under /appdata/disk-tester (see below),
  • runs npm ci and npm run build for a source install (not needed for the release package),
  • enables and starts the systemd service disk-tester.

An old installation under /opt/disk-tester or /var/lib/disk-tester is adopted automatically. The script is idempotent: running it again updates the installation, the data is kept.

From a development machine:

deploy/deploy-remote.sh <host> # e.g. deploy/deploy-remote.sh 10.10.11.98

This copies the repo via rsync (without node_modules, .next, data) to /appdata/disk-tester/src on the host and runs install.sh there. Without a local rsync (e.g. Git Bash on Windows), tar over ssh is used instead.

Directories under /appdata/disk-tester​

PathContents
releases/<version>/Installed versions. Every update creates a new directory; older ones stay for the rollback.
appSymlink to the active version under releases/. The service always starts through this path.
data/Settings, known drives and job history. Kept across updates.
disk-tester.envOptional environment variables (mode 600, may contain passwords).

The base can be changed with the environment variable DISK_TESTER_HOME (installation script only).

Managing the service​

systemctl status disk-tester
journalctl -u disk-tester -f
systemctl restart disk-tester

When the service is stopped, running badblocks processes are terminated (KillMode=mixed).

Configuration via the env file​

Additional environment variables go into /appdata/disk-tester/disk-tester.env (format KEY=value, one per line). After changes: systemctl restart disk-tester. install.sh creates a commented-out template for the mail server.

VariableMeaningDefault
PORTHTTP port3000
DISK_TESTER_DATA_DIRData directory (settings, drives, jobs)./data (systemd: /appdata/disk-tester/data)
DISK_TESTER_AUTHHTTP Basic Auth user:password; empty = offoff
DISK_TESTER_ALLOW_NO_AUTH1 = deliberately no access protection (internal network), hides the warningoff
DISK_TESTER_MOCK1 = simulated drives instead of real hardwareoff
DISK_TESTER_UPDATE_URLBase URL of the update interfacehttps://disk-tester.znbw.de
DISK_TESTER_UPDATE_CHECK0 = no update checkon
SMTP_HOST / SMTP_PORT / SMTP_SECUREMail server, port (default 587), true = TLS from the start of the connection (465)empty = no mails
SMTP_USER / SMTP_PASSWORD / SMTP_FROMLogin and sender address (without SMTP_FROM, SMTP_USER is used)empty
SMTP_TORecipients that are copied into the settings on first startempty
NODE_ENVproduction in operation–

The mail settings are described under Notifications.

Access protection​

The application runs as root and can erase drives. Do not expose it to the internet unprotected (use a reverse proxy with TLS or a VPN).

  • DISK_TESTER_AUTH=user:password enables HTTP Basic Auth.
  • Without DISK_TESTER_AUTH the interface shows a warning. If open access in the internal network is intentional, DISK_TESTER_ALLOW_NO_AUTH=1 hides it.

Note: BIOS hotplug for SATA ports​

For drives to be detected at runtime on the machine itself, hotplug must be enabled for the SATA ports. If the kernel reports SStatus 4 for an empty port (visible with dmesg | grep -i sstatus), the port is disabled in the BIOS/UEFI or configured as "not hot-pluggable". Then enable the Hot Plug option for the port in the BIOS (depending on the vendor in the SATA settings, per port) and do not leave the port set to "External" or "Disabled". Afterwards, newly connected drives are detected without a reboot.