Wireless USB flash drive using Raspberry Pi
1. What this Project does
You will create a portable Wi-Fi storage device that:
-
Acts like a USB flash drive over Wi-Fi
-
Lets phones, laptops, or tablets connect wirelessly
-
Allows file upload/download
-
Can create its own Wi-Fi network
-
Runs from a power bank
Final result:
│
Wi-Fi
│
Raspberry Pi
│
USB Flash Drive / SD Storage
2. Hardware Requirements
You need:
Core components
-
Raspberry Pi Zero W (best for portable)
-
MicroSD card (16–32GB recommended)
-
USB flash drive (optional for extra storage)
-
Micro USB OTG adapter
-
Power bank or USB power supply
Optional but useful
-
Case
-
Heat sinks
-
Small OLED screen for status
3. Install Raspberry Pi OS
Download Raspberry Pi OS and flash it.
Step 1 – Install Raspberry Pi Imager
Download:
Install Raspberry Pi Imager
Step 2 – Flash the SD card
Choose:
(Lite version is best for this project)
Configure before writing:
Enable:
-
SSH
-
Wi-Fi
-
Username/password
Insert the card into the Pi and boot.
4. Update the System
Connect via SSH:
Update everything:
sudo apt upgrade -y
5. Attach the USB Flash Drive
Insert your USB drive and check:
Example output:
Create mount point:
Mount it:
Make it permanent:
Add:
Install Samba:
Edit config:
Add at bottom:
path = /mnt/usb
browseable = yes
writeable = yes
create mask = 0777
directory mask = 0777
public = yes
guest ok = yes
Restart Samba:
7. Create a Wi-Fi Access Point
Install required tools:
Stop services temporarily:
sudo systemctl stop dnsmasq
Edit:
Add:
static ip_address=192.168.4.1/24
nohook wpa_supplicant
Configure hostapd
Create config:
Add:
driver=nl80211
ssid=PiFlashDrive
hw_mode=g
channel=7
wmm_enabled=0
auth_algs=1
wpa=2
wpa_passphrase=raspberry123
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
Tell hostapd to use the config:
Change:
Configure DHCP
Backup original:
Create new config:
Add:
dhcp-range=192.168.4.10,192.168.4.50,255.255.255.0,24h
8. Enable Services
Start services:
sudo systemctl start dnsmasq
Enable on boot:
sudo systemctl enable dnsmasq
9. Test the Wireless Flash Drive
-
Power the Raspberry Pi
-
Look for Wi-Fi network:
-
Connect using password:
-
Access storage from:
Windows:
Mac/Linux:
You now have a wireless USB flash drive.
10. Optional Improvements
Web file manager
Install FileBrowser for browser uploads.
Add battery monitoring
Useful for portable setups.
Enable internet sharing
So the Pi acts as Wi-Fi storage + internet router.
Add SSD storage
For large capacity wireless storage.
11. Powering the Device
Use:
-
10,000mAh power bank
-
5V 2A output
Runtime:
depending on model.
12. Final Result
You now have a DIY wireless USB drive that:
-
Works with phones
-
Works with Windows / macOS / Linux
-
Requires no cables
-
Can hold hundreds of GB.
