Skip to content

About

Share a local folder over FTP from electerm; the built-in Local FTP Server as a user widget

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Local FTP Server — an electerm widget

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 }.

Install

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.

Use

  1. Folder to share (empty = home)
  2. Bind address defaults to 127.0.0.1; use 0.0.0.0 for other machines
  3. Port defaults to 2121 (21 needs root)
  4. Allow anonymous gives passwordless access; otherwise use Username / Password (defaults ftpuser / ftppass — change them)
  5. Start widget → the URL looks like ftp://ftpuser:ftppass@127.0.0.1:2121
  6. 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.

Verify

curl -s ftp://127.0.0.1:2121/          # with anonymous access enabled
curl -s ftp://ftpuser:ftppass@127.0.0.1:2121/

Notes

  • 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.js if that range is taken

About

Share a local folder over FTP from electerm; the built-in Local FTP Server as a user widget

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages