A tiny, lightweight file and media server designed to run on low-powered boards like Raspberry Pi or Orange Pi and to be easily accessed from a cellphone. It provides a simple browser UI for browsing folders, streaming video/audio in the browser, downloading, uploading, and creating folders on local storage.
- Browse folders with arbitrary depth
- Stream video/audio directly in browser
- Download any file
- Upload files to any folder
- Create new folders
- Mobile-friendly interface
- Storage usage indicator
- No authentication (local network use)
pip install flask# Set media root (default: /media/usb)
export MEDIA_ROOT=/path/to/your/media
# Run server
python server.pyServer starts on http://0.0.0.0:5000
Organize however you like:
/media/usb/
├── Media/
│ ├── Video/
│ │ ├── Series Name/
│ │ │ └── episodes...
│ │ └── movies...
│ └── Audio/
│ └── music...
└── Install files/
├── Android/
└── Windows/
For better performance with multiple users:
pip install gunicorn
gunicorn -w 2 -b 0.0.0.0:5000 server:appThe installer script install_arm_no_venv.sh supports a non-interactive mode that auto-answers prompts and will auto-select a single exFAT USB partition when present. Enable it by setting the environment variable AUTO_YES=1 or by passing -y / --yes on the command line.
Examples:
# env var style
AUTO_YES=1 bash install_arm_no_venv.sh
# or flag style
bash install_arm_no_venv.sh --yesNote: If multiple exFAT partitions are detected, unattended mode will abort to avoid ambiguity. The script still uses sudo for system changes; for fully automatic runs, configure passwordless sudo for the invoking user or run from a privileged installer.
Pre-transcode for universal browser playback:
- Video: H.264 MP4, 720p
- Audio: MP3 or AAC
Create /etc/systemd/system/tinymedia.service to auto-start the server:
[Unit]
Description=TinyMedia Lightweight Media Server
After=network.target
[Service]
Type=simple
User=pi
Environment=MEDIA_ROOT=/media/usb
WorkingDirectory=/home/pi/tinymedia
ExecStart=/usr/bin/python3 server.py
Restart=always
[Install]
WantedBy=multi-user.targetThen:
sudo systemctl enable tinymedia
sudo systemctl start tinymedia