Create a Samba/FTP server using Android

canute
2 min readOct 26, 2023

--

I have been wanting to use a sync service to access my Files across all my devices, however I didn’t wanted to pay ! But its not just about accessing them, I want to mount them too on Linux, Android and Windows, for things like Obsidian. I tried free cloud services, but sometimes I couldn’t mount and other times there were limitations, speed limit, space limit, etc.

At last I decided to start a FTP server on my WiFi, but I needed to host it on a device that must always be running, most of us would choose a raspberry or dedicated laptop for it, but this poor lazy being decided to host FTP on his android device.

Note : You will need ROOT access on your android device for FTP and Samba, if you want to do without root, then you can ! I might make a tutorial for that too soon.

Creating an HTTP server

  • The simplest and unmountable technique, preferable when you just want to copy files from one system to another and do not want to edit them
  • Open source apps like Servelt and Share-via-http for directory share and single file share respectively.
  • Just copy the URL displayed by the app to your client device’s web browser.
  • However I wanted to store notes which are meant to be edited. Thus, I tried FTP and Samba.

Creating an FTP server

  • There are many ways, my preferred app is Material Files, also available on F-droid
  • Go to Hamburger menu within the app → FTP server → setup username and password ; allow writing → Start the server → note the URL to access the FTP server as a client on other devices. Find OS specific guides online on how to access FTP server, for Windows there are programs like Filezilla, for Linux, install the curlftpfs package and :
curlftpfs ftp://username_set_on_app:Password@xxx.IP.ADDRESS.xxx/ /where/you/want/to/mount

Creating a Samba server

  • As of today, there exist no open source application on android to host a SMB Server. If you really want to go the open source route, you can use termux and download nix packages required to setup samba server, and then all process should be similar to that of linux.
  • For what I use is a propriety software : LAN drive, it comes with Ads and bandwidth limitation 😊. I hope I don’t get sued for sharing the cracked version of this deprecated application with acceptable Privacy Policy
  • The app is pretty simple and has its own tutorials on how to acreate and access SMB

Conclusion

And that’s it ! I tried running an NFS server without termux too, but nothing worked. I will soon write a seperate article about how to mount an FTP and a Samba server on your nixos machine and also generally for all linux distros.

--

--

No responses yet