-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration
The daemon uses a single main config:
etc/config.yml
Key sections:
- server identity
- mode (
masterorslave) - master block
- slave block
- slave routing
- section directories
- TLS
- zipscript
- plugins
WeaveFTPd uses one config format for both roles.
The active role is selected with:
mode: masteror:
mode: slaveWhen mode: slave is active:
- the
slave:block is the role-specific block that matters -
slave.rootsis required - slave mode no longer falls back to
storage_pathfor roots - shared top-level runtime settings such as
tls_*,log_*,debug, andtimezonestill apply - master-only FTP/site/plugin layout and routing settings are ignored
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: 60For 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_pathas a fallback root path -
acl_base_pathfor 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 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.
The main daemon can read selected sitebot settings from:
sitebot_config
Current uses:
-
SITE INVITEreads channel visibility and channel names from the sitebot config. -
SITE IRCreads IRC host/port/nick/password from the sitebot config. -
SITE BLOWFISHuses daemon-sideblowfish_private_key/blowfish_keyswhen set, and falls back to the sitebot config when those daemon-side mirrors are empty.
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: trueroots: "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.
The current daemon understands fuller userfile limit fields such as:
LOGINSLOGINSLOTSMAXSIMUPLOADSLOTSDOWNLOADSLOTSWKLYALLOTMENTGROUPSLOTSPRIMARY_GROUP
Important behavior:
-
LOGINSLOTSlimits concurrent logins. -
MAXSIMlimits simultaneous transfers for the user. -
UPLOADSLOTSandDOWNLOADSLOTSlimit concurrent uploads/downloads. -
WKLYALLOTMENTis 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
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:
predateddirsrequest
So plugin config can also create or keep directories alive.
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.
Audio and sample/video metadata are configured under the built-in zipscript:
block, not through a standalone daemon mediainfo plugin.
Relevant sections:
zipscript.audiozipscript.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.
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 customA pure slave install normally does not need a sitebot at all.
WeaveFTPd now validates the important configs more strictly:
etc/config.ymletc/permissions.yml
Malformed YAML should fail cleanly instead of partially loading and producing weird runtime behavior.
- keep plugin config in the plugin file
- keep on/off enable decisions in the main config
- rerun
./setup.sh installafter adding new built-in plugins to older installs
- Home
- Installation and Setup
- Setup Helper
- Update and Maintenance
- Docker
- Configuration
- Master-Slave Authentication
- Daemon Overview
- Daemon Plugins
- SITE Commands
- Sitebot
- Sitebot Plugins