1 Access Configuration: Address, Port and Data Directory
Three settings decide how colleagues reach the service: listen address, port and data root. Most units never touch them; adjust only for port conflicts, multi-subnet isolation or storage changes.
Defaults and How to Read Them
Factory defaults: listen on 0.0.0.0 (all interfaces), port 6557, root /home/lynx/lynxdrive. Run lynxdrive-ctl port, lynxdrive-ctl addr or lynxdrive-ctl root without arguments to echo the current value — confirming these three first removes half the guesswork in troubleshooting.
Changing the Port
sudo lynxdrive-ctl port 8080. Ports accept digits only — invalid input is rejected outright; the service restarts automatically and takes effect within seconds. The access address changes with it: notify everyone to update bookmarks and regenerate previously issued share links.
Changing the Listen Address
sudo lynxdrive-ctl addr 192.168.1.20 binds the service to one NIC, fitting multi-subnet isolation. Note that other subnets lose access once bound to a specific IP; without isolation needs, 0.0.0.0 is the effortless choice. When the device's IP or NIC order changes, a specific binding breaks — a common cause of "worked yesterday, dead today".
Changing the Data Directory
sudo lynxdrive-ctl root /data/share creates the new directory and takes it over, but does not move old data. Files stay in the old path and must be migrated manually beforehand, or colleagues will think they "vanished". The correct order: stop writes, migrate files, change the setting, then verify by sampling.
Ripple Effects of Changes
A port change affects bookmarks and share links; an address change affects reachable subnets; a root change affects the whole directory structure. After any change, run lynxdrive-ctl status to confirm the port probe is healthy before notifying. A notice stating "new address, effective time, old links invalid" beats explaining one by one afterwards.
Configuration Maintenance Principle
Configuration is maintained by the system — always change it through commands, never by hand-editing files. Manual edits diverging from the system's records make later troubleshooting and upgrades hard to reason about. Recording the previous value before a change is the cheapest rollback.