English | 中文
Share a folder over FTP for the devices that only speak FTP (old routers, embedded boxes, legacy tooling).
This is the built-in Local FTP Server (src/app/widgets/widget-local-ftp-server.js) as a user widget. type: "instance", same contract: widgetRun(config, ctx) → { instanceId, start, stop }.
Settings → Widgets → Import, then paste
electerm/electerm-widget-ftp-server
or the full https://github.com/electerm/electerm-widget-ftp-server. Import downloads the repo and copies it to <data dir>/widgets/ftp-server/.
Repository import needs electerm v5.8.0+. Importing copies, it does not link: editing this repo afterwards changes nothing until you re-import and confirm the overwrite.
@electerm/ftp-srv is committed in node_modules (~1MB) on purpose: import never runs npm install. For local development, git clone it and use the Import folder button in the same dialog instead of the URL.
- Folder to share (empty = home)
- Bind address defaults to
127.0.0.1; use0.0.0.0for other machines - Port defaults to 2121 (21 needs root)
Allow anonymousgives passwordless access; otherwise use Username / Password (defaultsftpuser/ftppass— change them)- Start widget → the URL looks like
ftp://ftpuser:ftppass@127.0.0.1:2121 - The instance log shows connect / login / disconnect and a command-level trace (ftp-srv masks PASS arguments)
Passive data ports are pinned to 50000-51000 because the client opens them, so a firewall rule must cover that range. On a multi-homed or NATed machine put the client-reachable address into PASV address — otherwise login works but listings hang, which is the classic "connected but stuck" FTP failure.
curl -s ftp://127.0.0.1:2121/ # with anonymous access enabled
curl -s ftp://ftpuser:ftppass@127.0.0.1:2121/- FTP is plaintext: credentials and file bodies are unencrypted. Trusted networks only; use SFTP on the internet
- Never combine
0.0.0.0, the default password and anonymous access - The passive range is fixed so a firewall rule is possible; change the two constants at the top of
main.jsif that range is taken