I’ve had a retired Android phone sitting in a drawer, doing absolutely nothing except slowly losing charge. Rather than let it become e-waste or sell it for pocket change, I decided to see if it could replace a dedicated NAS box for my basic file-sharing needs.
Turns out, it very well can, with minimal setup. There’s a free and open-source tool you can use for the job, which runs as a single Python file with no mandatory dependencies and can turn an old phone with a decent amount of storage into a lightweight network drive for your entire household.
One Python file, seven protocols, zero dependencies
HTTP, WebDAV, FTP, SFTP, TFTP, and SMB from one process
Copyparty is designed to turn almost any device into a portable file server, and Android is explicitly supported through Termux, a terminal emulator that gives you a Linux-like environment on your phone. It also handles an incredible number of protocols at once including HTTP, HTTPS, WebDAV, FTP, SFTP, TFTP, and even SMB/CIFS, all from a single running process.
That means you can map it as a network drive on your Windows laptop, browse it from another phone’s file manager, or just open it in a browser and drag files around, all without installing separate apps for each protocol. The web interface itself is surprisingly full-featured for something this lightweight. It comes with a file manager that supports cut, copy, rename, and thumbnail grid views, plus a built-in audio and video player capable of real-time transcoding, a markdown editor, and even a comic book reader.
If you’re someone who just wants to dump backups, transfer project files, or occasionally browse photos from a browser, this is more than enough without needing something as heavyweight as Nextcloud running in the background.
Ten minutes between an old phone and a file server
Termux is the only thing standing between you and a running server
Getting Copyparty running on any Android phone takes about 10 minutes if you already have Termux installed from F-Droid or via the official Termux GitHub repository. Once Termux is installed, run the following command to install Termux:API and download the Copyparty script. Make sure you give Termux storage access permissions when prompted.
yes | pkg upgrade && termux-setup-storage && yes | pkg install python termux-api && python -m ensurepip && python -m pip install --user -U copyparty && { grep -qE 'PATH=.*\.local/bin' ~/.bashrc 2>/dev/null || { echo 'PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && . ~/.bashrc; }; }
echo $?
If you want thumbnails for photos and videos and are okay spending another 132 MB of storage, run the following command.
pkg install ffmpeg && python3 -m pip install --user -U pillow
And that’s it. Copyparty is now ready to run on your Android. Just type copyparty anywhere in the terminal, and a server will automatically start. You can also add the –qr flag to get a handy QR code pointing to your file server. You’ll also see the address to your file server mentioned in the terminal. Type this into any browser on any device that can connect to your network, and you’ll be able to upload or download files to your phone’s storage instantly.
up2k does the heavy lifting nobody notices
Chunked uploads that resume across a reboot
Its elaborate feature set and light footprint make Copyparty an excellent choice for running file servers on low-powered devices that have plenty of storage. However, it does not skimp on features at all.
You get resumable downloads and uploads, file deduplication, batch renaming, tagging for file organization, built-in media and thumbnail support, and on-the-fly compression. Another major feature is its upload system, called up2k. Instead of uploading a file in one long stream that fails completely if the Wi-Fi hiccups, up2k splits files into checksummed chunks, hashes them client-side, and only sends the pieces the server does not already have. If an upload gets interrupted, whether from a dropped connection or a browser restart, it resumes automatically right where it left off, even across a reboot of the phone or computer sending the files.
Up2k also deduplicates identical files by hash, replacing duplicates with symlinks or hard links so the same photo backed up twice does not eat double the storage. For anyone syncing a growing collection like a photo library or archiving downloads from multiple devices, that alone can save a meaningful amount of space on a phone that probably only has 32 to 128 gigabytes to begin with.
It’s a file server, not a NAS replacement
No RAID, no hot-swap, no 24/7 guarantee
To be clear, this setup is not a direct replacement for a proper NAS with RAID redundancy, hot-swappable drives, or dedicated network hardware. A phone’s storage is soldered in place, its Wi-Fi radio is not built for sustained high-throughput transfers, and battery degradation means it’s not meant to run 24/7 without eventually being plugged in permanently. It will also not survive a drop or a spilled drink the same way a purpose-built enclosure might.
But for occasional file transfers, local backups, or a quick way to move large files across multiple devices without needing the cloud, Copyparty is genuinely hard to beat. It costs nothing, runs on devices you already own, and its cross-platform support means the same setup works if you later swap the phone for a Raspberry Pi or an old laptop, so the skills carry over. For a weekend project that turns e-waste into something useful, it is one of the most satisfying ways to keep an old device out of the landfill.