Skip to content

Configuration

Bl4DiEDiEBL4 edited this page Aug 12, 2026 · 8 revisions

Configuration

Main Daemon Config

The daemon uses a single main config:

  • etc/config.yml

Key sections:

  • server identity
  • mode (master or slave)
  • master block
  • slave block
  • slave routing
  • section directories
  • TLS
  • zipscript
  • plugins

Master and Slave

WeaveFTPd uses one config format for both roles.

The active role is selected with:

mode: master

or:

mode: slave

When mode: slave is active:

  • the slave: block is the role-specific block that matters
  • slave.roots is required
  • slave mode no longer falls back to storage_path for roots
  • shared top-level runtime settings such as tls_*, log_*, debug, and timezone still apply
  • master-only FTP/site/plugin layout and routing settings are ignored

Minimal Slave Config

On a slave box, most of the file can stay at defaults. The parts that really matter are:

  • mode: slave
  • the slave: block
  • shared top-level runtime settings if you changed them from the defaults

Example:

mode: slave

slave:
  name: "SLAVE1"
  master_host: "203.0.113.10"
  master_port: 1099
  master_ca_cert: "./etc/certs/master-ca.crt"
  client_cert: "./etc/certs/slave-SLAVE1.crt"
  client_key: "./etc/certs/slave-SLAVE1.key"
  roots:
    - "/glftpd/site"
  pasv_port_min: 30000
  pasv_port_max: 35000
  bind_ip: "198.51.100.25"
  timeout: 60

For a pure slave install, you do not need to configure:

  • sitebot
  • sections: structure policy
  • master-side slave routing
  • master-side daemon plugins unless that box is also acting as a master
  • storage_path as a fallback root path
  • acl_base_path for the slave daemon itself

This also applies to archive storage. An archive server can just be another slave with its own roots: path. It does not need an NFS mount simply to be usable as an archive target.

Slave Authentication

Slave control connections fail closed. Choose mTLS or per-slave masks before starting a slave. The main master settings are:

master:
  slave_ca_cert: "./etc/certs/ca.crt"
  slave_masks_file: "etc/slave_masks.txt"

When slave_ca_cert is configured, every slave needs a valid client certificate. Without it, every slave name needs at least one persisted source mask. See Master-Slave Authentication.

Sitebot Config Reuse

The main daemon can read selected sitebot settings from:

  • sitebot_config

Current uses:

  • SITE INVITE reads channel visibility and channel names from the sitebot config.
  • SITE IRC reads IRC host/port/nick/password from the sitebot config.
  • SITE BLOWFISH uses daemon-side blowfish_private_key / blowfish_keys when set, and falls back to the sitebot config when those daemon-side mirrors are empty.

Restart, VFS, and Remerge

The master persists VFS state in userdata/vfs.dat.

On a normal master restart, the first reconnect from a slave that already has cached VFS entries now reuses that cached tree instead of immediately forcing a full startup remerge. Later reconnects in the same runtime still use normal remerge behavior.

If master.remerge_checksums: true, remerge only asks slaves for CRCs when the current VFS entry does not already have a stored checksum. Unchanged files with preserved checksum state should not be re-CRC'd just because the master was restarted.

Recurring remerge work is configured by the master under each slave policy. Use separate jobs when normal roots and mounted archive roots need different schedules or throttles:

slaves:
  - name: "LOCAL"
    remerge:
      jobs:
        - name: "site_root"
          enabled: true
          interval_seconds: 21600
          roots: "normal"
          path: "/"
          exclude_paths: ["/ARCHiVE"]
          delay_ms: 10
          pause_on_active_transfers: 1
          timeout_seconds: 3600
          skip_busy_slave: true

        - name: "mounted_roots"
          enabled: true
          interval_seconds: 43200
          roots: "mounted"
          mount_paths: ["*"]
          delay_ms: 25
          pause_on_active_transfers: 1
          timeout_seconds: 86400
          skip_busy_slave: true

roots: "normal" scans slave.roots; roots: "mounted" scans slave.mounted_roots. The master owns scheduling and throttling. The removed master.background_remerge_* and slave.remerge_* keys are ignored by current WeaveFTPd builds.

Manual scans use the same configured jobs:

SITE REMERGE LOCAL
SITE REMERGE LOCAL mounted_roots /ARCHiVE/BLURAY
SITE REMERGESTOP LOCAL

master.manual_remerge_mode controls whether a manual scan keeps the slave online while it runs. Keep remerge jobs gentle on busy storage by using delay_ms, pause_on_active_transfers, and skip_busy_slave.

Userfile Limits and Allowances

The current daemon understands fuller userfile limit fields such as:

  • LOGINS
  • LOGINSLOTS
  • MAXSIM
  • UPLOADSLOTS
  • DOWNLOADSLOTS
  • WKLYALLOTMENT
  • GROUPSLOTS
  • PRIMARY_GROUP

Important behavior:

  • LOGINSLOTS limits concurrent logins.
  • MAXSIM limits simultaneous transfers for the user.
  • UPLOADSLOTS and DOWNLOADSLOTS limit concurrent uploads/downloads.
  • WKLYALLOTMENT is a weekly credit replacement amount, not an upload quota.
  • GROUPSLOTS <slots> <leech_slots> lives on a gadmin user account and controls how many users that gadmin may create, plus how many of those may be leech users.
  • userfile values override the default template once written into the real user file.

By default, normal new users inherit these values from:

  • etc/users/default.user

The bundled weaveftpd account ships from:

  • etc/users/weaveftpd

Section Directories

sections: in the main config defines the root and nested virtual directories that should exist in the VFS and be created on writable slaves.

Example:

sections:
  - "/0DAY"
  - "/TV-1080P"
  - "/FOREIGN/TV-NL"
  - "/ARCHiVE"

Some daemon plugins also contribute directory structure, notably:

  • pre
  • dateddirs
  • request

So plugin config can also create or keep directories alive.

Plugin Config Split

Daemon plugins are enabled in the main config:

plugins:
  slowkick:
    enabled: true
    config_file: "plugins/slowkick/config.yml"

The enabled switch lives in the main config. The plugin-specific file holds settings only.

Zipscript Media and Sample Info

Audio and sample/video metadata are configured under the built-in zipscript: block, not through a standalone daemon mediainfo plugin.

Relevant sections:

  • zipscript.audio
  • zipscript.media

With zipscript.audio.create_m3u: true, WeaveFTPd generates <release>.m3u from SFV entries for both MP3 and FLAC releases unless a playlist already exists.

The announce text is still rendered by the sitebot announce layer.

Sitebot Config

The sitebot has its own config:

  • sitebot/etc/config.yml

This covers:

  • IRC connection
  • channel routing
  • FiSH / DH1080 encryption
  • sitebot plugin enable list
  • sitebot plugin config file references

IRC TLS verification is controlled under irc::

irc:
  ssl: true
  tls_verify: "strict"  # strict, custom, or insecure
  tls_ca_cert: ""       # required with custom

A pure slave install normally does not need a sitebot at all.

Config Validation

WeaveFTPd now validates the important configs more strictly:

  • etc/config.yml
  • etc/permissions.yml

Malformed YAML should fail cleanly instead of partially loading and producing weird runtime behavior.

Practical Advice

  • keep plugin config in the plugin file
  • keep on/off enable decisions in the main config
  • rerun ./setup.sh install after adding new built-in plugins to older installs

Clone this wiki locally