MO
Mohammed-Asfar/localbox
A self-hosted file storage and management application with a modern, Mac-like interface. Access your files from any device on your local network.
๐ฆ LocalBox
A self-hosted file storage and management application with a modern, Mac-like interface. Access your files from any device on your local network.
๐ธ Screenshots
LocalBox running on a repurposed old laptop as a home server
Dashboard - File list with sidebar navigation
| Grid View | Upload Dialog |
|---|---|
![]() |
![]() |
| Image Preview | Video Preview |
|---|---|
![]() |
![]() |
โจ Features
File Management
- ๐ค Resumable Uploads - TUS protocol for large file uploads with pause/resume
- ๐ Folder Support - Create subfolders, navigate with breadcrumbs
- ๐ Search - Real-time file search
- ๐ Bulk Actions - Select multiple files for download, move, or delete
- โ๏ธ Rename & Move - Organize files across categories and folders
Preview & View
- ๐ผ๏ธ Image Preview - View images with keyboard navigation
- ๐ฌ Video Player - Stream videos directly in browser
- ๐ต Audio Player - Play audio files
- ๐ PDF Viewer - View documents inline
- ๐ Grid/List View - Toggle between thumbnail grid and detailed list
UI/UX
- ๐ Dark/Light Theme - Switch themes with persistence
- ๐ฑ Responsive - Works on desktop, tablet, and mobile
- ๐ฑ๏ธ Drag & Drop - Drop files anywhere to upload
- โก Fast - Optimized with lazy loading and caching
System
- ๐พ Storage Stats - Real-time disk usage display
- ๐ง RAM Monitor - Live memory usage indicator
- ๐ท๏ธ Auto-categorize - Files sorted by type (images, videos, documents, etc.)
๐ Quick Start
Prerequisites
- Node.js 18+
- npm or yarn
Installation
# Clone the repository
git clone https://github.com/Mohammed-Asfar/localbox.git
cd localbox
# Install backend dependencies
cd localbox-backend
npm install
# Install frontend dependencies
cd ../localbox-frontend
npm installDevelopment
# Terminal 1: Start backend (port 4000)
cd localbox-backend
npm start
# Terminal 2: Start frontend (port 5173)
cd localbox-frontend
npm run devOpen http://localhost:5173 in your browser.
Production
# Build frontend
cd localbox-frontend
npm run build
# Start backend (serves frontend from dist/)
cd ../localbox-backend
npm startAccess at http://your-ip:4000
๐ Project Structure
localbox/
โโโ localbox-backend/
โ โโโ index.js # Express server with TUS upload
โ โโโ categorizer.js # File type detection
โ โโโ package.json
โโโ localbox-frontend/
โ โโโ src/
โ โ โโโ App.jsx # Main application
โ โ โโโ components/ # React components
โ โโโ package.json
โโโ README.md
โ๏ธ Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
PORT |
4000 | Server port |
STORAGE_DIR |
~/Downloads/localboxstorage |
File storage path |
Categories
Files are auto-categorized by extension:
| Category | Extensions |
|---|---|
| Images | jpg, png, gif, webp, svg... |
| Videos | mp4, webm, mov, mkv, avi... |
| Audio | mp3, wav, flac, m4a, ogg... |
| Documents | pdf, doc, docx, txt, md... |
| Archives | zip, rar, 7z, tar, gz... |
| Others | Everything else |
๐ API Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/files |
List files |
GET |
/api/stats |
Storage & RAM stats |
GET |
/api/folders/:cat |
List folders |
POST |
/api/folders |
Create folder |
DELETE |
/api/files/:cat/:path |
Delete file |
PUT |
/api/files/:cat/:path |
Rename file |
PATCH |
/api/files/:cat/:path/move |
Move file |
POST |
/files |
TUS upload endpoint |
๐ ๏ธ Tech Stack
- Frontend: React 18, Vite, Tailwind CSS, Lucide Icons
- Backend: Node.js, Express
- Upload: TUS Protocol (@tus/server)
- UI Library: @uppy/react for upload dashboard
๐ License
MIT License - feel free to use for personal or commercial projects.
๐ค Contributing
Contributions welcome! Please open an issue or PR.
Made with โค๏ธ for local-first file management
On this page
Languages
JavaScript96.4%CSS1.6%Shell0.7%Batchfile0.7%HTML0.6%
Contributors
Created January 14, 2026
Updated January 18, 2026





