26.10.21 23:38
Skip to content
Network & Cloud Standard, noLegal, Photos, Legacy, VR and FOSS Recipe #04

All editions except Lite; needs Android 8.0 or newer.

Turning the Phone into an SFTP Server

Share folders straight from this phone over SFTP - pick them with the folder picker, sign in with a password or an SSH key, and pair another FastMediaSorter in one scan instead of typing an address.

Why You'll Love This

Usually this app reaches out to a folder somewhere else - a PC, a NAS, a cloud account. Sometimes it is the other way around: the photos worth sharing are on the phone, and it is another device that should reach in and get them. Turn on the phone's own SFTP server, pick the folders to share, and any device that speaks SFTP - including another phone running this app - can open them.

Before You Begin: Ingredients & Prerequisites
  • This app in any edition except Lite, on Android 8.0 (Oreo) or newer.
  • The folders you want to share, picked through the system's own folder picker.
  • Either a password (the app can generate one) or the public half of an SSH key from whoever will connect.
  • For pairing another FastMediaSorter with a scan: a camera on the connecting device.
1

Turn the server on

Open Settings, the General tab, and find the Share from phone card. Switch on SFTP server - "Other devices on your network can open the folders you pick" - and the status line below moves from Off to Starting.. and then to Running at 192.168.1.42:2222, its address and port. Turning it on with nothing shared yet, or with no way to sign in configured, is caught before it starts: "Add at least one folder to share, then turn the server on" or "Add a public key or switch to password login, then turn the server on."

A phone with no Wi-Fi connection can still switch the server on, but it says so plainly: "Running, but the phone is not on Wi-Fi - other devices reach it through the exchange server or via Google Drive." A foreground notification, "SFTP server is on", stays up the whole time with the address to connect to and a one-tap Stop button; when the phone moves to another Wi-Fi network, the address shown follows it.

Sharing stays on until you switch it off yourself. It starts again on its own every time the app is opened - including when the app is your home screen - and Android 15 and newer may pause it after about 6 hours in the background in one day: the notification "Sharing paused" says so, and opening the app continues it. There is no start after the phone reboots until the app is opened. Sharing over mobile internet uses mobile traffic.

2

Choose which folders to share

Under Shared folders, tap Add folder to open the system's own folder picker and choose a folder on the phone or its memory card. Until you add one, the section simply reads "No folders yet - add one to share it." Each folder you add gets its own row with a remove button next to it, and the grant survives a restart, so the same folders are still shared after the phone reboots.

A folder you add while the server is already running joins it immediately - no need to turn the server off and on again for a new folder.

The Share from phone card's Shared folders section with two folders added and their remove buttons, and the Add folder button
Picking which folders the server shares.
3

Decide how people sign in

Right below the folder list, choose Password or SSH key. With Password, the app already generated one; tap New password any time to replace it. With SSH key, paste the public keys of whoever should connect into Public keys, one per line - the phone never needs their private key, only what proves it.

While the server is running, the current sign-in details are shown right there: "Login: fms, password: 7f3kQ2mN" or "Login: fms, sign in with your SSH key" - so you can read them off to whoever is connecting without hunting for them elsewhere. The login name itself is fixed; only the password or the accepted keys change.

The Share from phone card's authentication section with Password selected, the New password button, and the running credentials line showing the login and password
Password sign-in, with the current password shown while the server runs.
4

Change a setting without losing the connection

The Port field defaults to a free one and can be changed - a port already used by another app is refused, for example "Port 2222 is taken by another app - choose another port", and a value outside the allowed range with "Use a port from 1024 to 65535." Changing the port, the sign-in mode or the keys while the server is already running does not restart it on its own: "Turn the server off and on again to apply the change" - so a client already connected is not dropped by a setting you are still adjusting.

5

Pair another FastMediaSorter with a scan

While the server is running, tap Show pairing code to reveal a QR code - "Pairing code: scan it in FastMediaSorter on another device" - and Hide pairing code to put it away again. The code is rebuilt fresh every time you show it, so it always carries the server's current address and password.

On the other device, open Add Resource, the SFTP / FTP card, and tap Import by barcode - the same scanner that reads a Windows companion code also recognizes this one. A message confirms the form was filled in: "Connection details filled in from the pairing code - check them and save," with the host, port, username, password or key and the server's host key already in place, suggested as "Device server 192.168.1.42." Review it and save - the host key is pinned from that first scan, so a later attempt from a different machine using the same address is refused rather than silently accepted. A damaged or incomplete code is called out too: "This code is not a complete FastMediaSorter pairing code - show it again on the server phone and rescan."

The Share from phone card with the pairing QR code shown and the Hide pairing code button
The pairing code, ready to scan from another device.
6

Reach the phone from another network

The Access from anywhere group next to it can register the phone's server on an exchange server, so devices on any network reach it without a VPN or port forwarding. Switch on Exchange server - "Reach this server from any network through your exchange server" - fill in the Exchange server address, the Exchange server port and the Exchange server password (at least 10 characters with upper- and lower-case Latin letters and digits), and tap Save server. The status line moves from "Only reachable on the local network" to "Reachable from anywhere through" and the server's name once the exchange server accepts the phone. The section is off by default.

A pairing code shown afterwards carries the exchange server too: a phone that scans it falls back to the relayed connection when no direct address answers, still checking the same host key. New access link makes every code shared earlier stop opening this server. To reach the phone from any network with no port forwarded, run your own exchange server or join one a person you know runs - see the media exchange portal.

Signed in to Google Drive on both devices? Switch on Share access through Google Drive in the Access from anywhere group - it is off by default. While the server runs, the phone then keeps its current address and sign-in details in the app's private space of your Drive, so another device on the same Google account opens the paired share at its new address after a network change, without scanning the code again - as long as it can reach the phone at all.

What You Get

The phone shares exactly the folders you picked, with everyone else needing either a password or an accepted SSH key to get in, and pairing another FastMediaSorter takes one scan instead of typing an address by hand. A tap on Stop, in the app or the notification, ends it until you turn it on again.

Tips and Troubleshooting