Skip to main content

Configuration

Configuration controls data sources, disk pool layout, runtime safety, optional services, and the built-in web panel.

Configuration Scope​

Full config.yml Example​

# Source folders — scanned for new files
src_folders:
- "/media/sf_MultiDisk-FileBalancer/src"

# Target disks in the pool
disks:
- name: "disk1"
path: "/media/sf_MultiDisk-FileBalancer/out1"
- name: "disk2"
path: "/media/sf_MultiDisk-FileBalancer/out2"
- name: "disk3"
path: "/media/sf_MultiDisk-FileBalancer/out3"

# Last used disk (automatically tracked by the program)
last_disk: disk1

# Discord webhook for notifications (leave empty to disable)
webhook_url: ''

# General settings
settings:
min_file_age_hours: 4
extra_safety_space_gb: 5
scan_interval_seconds: 120
console_clear_interval_hours: 6
space_check_default_min_free_gb: 10

# Space Hunter settings
space_hunter_min_file_age_hours: 1
space_hunter_exclude_folders: []
space_hunter_dry_run: false
space_hunter_max_actions_per_cycle: 0
space_hunter_global_fallback: false

# Automatic disk space monitoring and cleanup
space_hunter_disks:
- action: delete # 'delete' or 'move'
min_free_gb: 40
path: "/media/sf_MultiDisk-FileBalancer/out1"
move_destination: null # required when action: move

# Reverse workflow — move files back to source folder
reverse_raid:
enabled: false
source_paths:
- "/media/sf_MultiDisk-FileBalancer/out1"
- "/media/sf_MultiDisk-FileBalancer/out2"
destination_path: "/media/sf_MultiDisk-FileBalancer/src"
min_file_age_hours: 12
run_interval_minutes: 10

# FUSE mount (unified virtual disk view)
fuse_server:
enabled: true
mount_point: "/mnt/vfs"
upload_src: "/media/sf_MultiDisk-FileBalancer/src"

# WebDAV server
webdav_server:
enabled: true
host: "0.0.0.0"
port: 8080
username: "admin"
password: "changeme"
upload_src: "/media/sf_MultiDisk-FileBalancer/src"
use_fuse_mount_as_root: true

# SFTP server
sftp_server:
enabled: true
host: "0.0.0.0"
port: 8081
username: "raiduser"
password: "changeme"
upload_src: "/media/sf_MultiDisk-FileBalancer/src"
use_fuse_mount_as_root: true

# NFS server (requires root or sudo — uses Linux kernel nfs-kernel-server)
nfs_server:
enabled: false
host: "0.0.0.0"
port: 2049
permitted: "*"
upload_src: "/media/sf_MultiDisk-FileBalancer/src"
use_fuse_mount_as_root: true

# Web Panel (Flask dashboard — enabled by default)
webpanel:
enabled: true
host: "0.0.0.0"
port: 5000

Option Breakdown​

Base Configuration​

OptionDescription
src_foldersInput roots scanned for candidate files. Supports multiple paths as a list. The legacy single-path key src: is also accepted for backwards compatibility.
disksTarget storage devices in the pool (name + path).
last_diskLast used disk — automatically tracked by the program.
webhook_urlDiscord webhook URL for notifications. Leave empty to disable.

Settings​

OptionDescription
min_file_age_hoursMinimum file age before it may be moved.
extra_safety_space_gbReserved free space buffer on each disk.
scan_interval_secondsScheduler loop frequency.
console_clear_interval_hoursHow often the console is cleared.
space_check_default_min_free_gbDefault free space threshold for Space Hunter.

Space Hunter​

OptionDescription
space_hunter_min_file_age_hoursMinimum file age for cleanup candidates.
space_hunter_exclude_foldersFolders excluded from cleanup.
space_hunter_dry_runtrue = simulate cleanup without actual deletion.
space_hunter_max_actions_per_cycleMax actions per cycle (0 = unlimited).
space_hunter_global_fallbacktrue = global fallback cleanup across all disks under pressure.

Space Hunter Disks​

OptionDescription
actiondelete = remove oldest file, move = move to move_destination.
min_free_gbFree space threshold below which cleanup activates.
pathPath of the disk to monitor.
move_destinationDestination path when action: move.
min_file_age_hours(optional) Per-disk override for minimum file age. Falls back to the global space_hunter_min_file_age_hours.
exclude_folders(optional) Per-disk list of folders excluded from cleanup. Falls back to the global space_hunter_exclude_folders.
dry_run(optional) Per-disk dry-run override. Falls back to the global space_hunter_dry_run.
max_actions_per_cycle(optional) Per-disk action limit per cycle. Falls back to the global space_hunter_max_actions_per_cycle.

Reverse Raid​

OptionDescription
enabledEnable/disable the reverse workflow.
source_pathsDisk paths from which files are moved back.
destination_pathTarget folder for returned files.
min_file_age_hoursMinimum age for reverse candidates.
run_interval_minutesHow often the reverse workflow runs.

Protocol Servers​

Each server has at minimum enabled, host, port, username, and password. Additional options:

OptionDescription
upload_srcSource folder for uploads via this protocol.
use_fuse_mount_as_roottrue = serve the FUSE mount point as root instead of upload_src.
nfs_server.permittedIP pattern of allowed NFS clients (e.g. * or 192.168.1.*).
sftp_server.host_key_path(optional) Path to an existing SSH host key file. If omitted, an Ed25519 and RSA key are generated automatically in memory on each start.

Web Panel​

OptionDescription
webpanel.enabledEnable or disable the web panel. Default: true.
webpanel.hostHost to bind the Flask server to. Default: 0.0.0.0.
webpanel.portPort for the Flask web panel. Default: 5000.

Note: The NFS server uses the Linux kernel NFS daemon (nfs-kernel-server). The program installs it automatically if missing, but requires root or sudo to write to /etc/exports.d/ and reload exportfs. Custom ports are not supported — NFS always uses port 2049.

Note: The S3-compatible server (s3_server) found in older config files has been removed from the program and is ignored.

Advanced details
  • Use space_hunter_dry_run: true to verify cleanup policy without risk.
  • Align extra_safety_space_gb with ingest burst profiles.
  • Keep ports and mount targets explicit to avoid runtime ambiguity.
  • When use_fuse_mount_as_root: true, FUSE must be enabled and running before the protocol server starts.
  • The Web Panel setup wizard prompts for host and port on first run.