LocalDrop

command module
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 3 Imported by: 0

README

LocalDrop

LocalDrop is a lightweight, cross-platform file sharing application that enables fast and secure file transfers over your local network — no internet, Bluetooth, or cloud services required.

Built with Go and Gin, LocalDrop provides a simple web interface for uploading and downloading files between devices on the same network.


Features

  • Easy File Sharing - Upload files from any device on your local network
  • Simple Downloads - Access files through a clean web interface
  • Folder Upload and Navigation - Upload folders and browse them in the web UI
  • PIN Protection - Optional PIN codes for secure file downloads
  • Admin Dashboard - Manage files and control access (optional authentication)
  • Lightweight - Fast, efficient, and minimal resource usage
  • Cross-Platform - Works on Windows, macOS, and Linux
  • Any Device - Access from browsers on phones, tablets, or computers
  • No Internet Required - Works completely offline over LAN or hotspot

Installation

Make sure you have Go 1.24+ installed.

go install github.com/Mo7sen007/LocalDrop@latest

This will install localdrop to your $GOPATH/bin directory. Make sure this directory is in your system PATH.

Option 2: Build from Source
# Clone the repository
git clone https://github.com/Mo7sen007/LocalDrop.git
cd LocalDrop

# Build the binary
go build -o localdrop

# Optional: Install to GOPATH
go install
Option 3: Install via Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/Mo7sen007/LocalDrop/main/install.sh | bash
Option 4: Install via Script (Windows PowerShell)
irm https://raw.githubusercontent.com/Mo7sen007/LocalDrop/main/install.ps1 | iex
Option 5: Download Pre-built Binaries

Download the latest release for your platform from the Releases page.


Quick Start

Initialize Storage and Admin
localdrop init

This creates the required folders and configuration, and prompts you to create the first admin account.

Start the Server
# Default mode (runs in background on port 8080)
localdrop start

# Debug mode (runs in foreground with console output)
localdrop start --debug

# Custom port
localdrop start --port 3000

# Enable admin authentication
localdrop start --auth
Access the Interface

Once started, open your browser and navigate to:

  • Download page: http://localhost:8080
  • Upload/Admin page: http://localhost:8080/dashboard

Other devices on your network can access it using your machine's IP address:

http://192.168.1.100:8080
Find Your IP Address

Windows:

ipconfig

macOS/Linux:

ifconfig
# or
ip addr show
Stop the Server
localdrop stop

Usage

Basic Commands
# Start server
localdrop start

# Start with debug output
localdrop start -d

# Start with authentication enabled
localdrop start --auth

# Stop server
localdrop stop

# Check version
localdrop --version

# Get help
localdrop --help
Admin Management

When authentication is enabled, you'll need at least one admin account. The first account can be created using localdrop init.

# Add a new admin user
localdrop addadmin

# List all admin users
localdrop listadmin
Folder Uploads and Navigation

Use the web dashboard to upload folders and browse nested directories:

  • Upload a folder from the dashboard upload page
  • Navigate folders in the web UI to view or download files
Configuration

LocalDrop stores its data in your system's config directory:

  • Windows: C:\Users\<YourName>\AppData\Roaming\localdrop\
  • macOS: ~/Library/Application Support/localdrop/
  • Linux: ~/.config/localdrop/

Directory structure:

localdrop/
├── logs/
│   └── localdrop.log                 # Server logs
├── internal/
│   └── storage/
│       ├── files/                    # Uploaded files
│       │   └── localdrop.db          # SQLite database
│       ├── adminList.json            # Admin records (legacy)
│       └── config.yaml               # App config
└── localdrop.pid                     # Process ID (when running)

Security

  • PIN Protection: Set optional PIN codes when uploading files to restrict downloads
  • Admin Authentication: Enable --auth flag to require login for uploads and file management
  • Local Network Only: Server only accessible on your local network by default
  • No Cloud Storage: All files stay on your machine

Use Cases

  • Office/Home Network: Share files quickly between computers
  • Mobile Hotspot: Create a hotspot and share files with nearby devices
  • Classroom/Workshop: Distribute materials to students without internet
  • Team Collaboration: Quick file exchange during meetings
  • Event Sharing: Share photos/videos with attendees on local WiFi

Development

Project Structure
LocalDrop/
├── cmd/                    # CLI commands
├── internal/
│   ├── handlers/          # HTTP request handlers
│   ├── middleware/        # Authentication middleware
│   ├── models/            # Data models
│   ├── paths/             # Path configuration
│   ├── services/          # Business logic
│   ├── storage/           # Data persistence
│   └── static/            # Web UI (embedded)
├── main.go
└── README.md
Building
# Build for current platform
go build -o localdrop

# Cross-compile for other platforms:

# Windows (64-bit)
GOOS=windows GOARCH=amd64 go build -o localdrop-windows-amd64.exe

# Linux (64-bit)
GOOS=linux GOARCH=amd64 go build -o localdrop-linux-amd64

# macOS (Intel)
GOOS=darwin GOARCH=amd64 go build -o localdrop-macos-amd64

# macOS (Apple Silicon - M1/M2)
GOOS=darwin GOARCH=arm64 go build -o localdrop-macos-arm64

Note: Go automatically uses the correct build tags (start_windows.go or start_unix.go) based on the target platform.

Running Tests
go test ./...

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Troubleshooting

Server won't start
# Run in debug mode to see errors
localdrop start --debug
Can't access from other devices
  • Make sure devices are on the same network
  • Check firewall settings (allow port 8080)
  • Verify your IP address with ipconfig or ifconfig
Port already in use
# Use a different port
localdrop start --port 3000
Files not uploading
  • Check available disk space
  • Verify file size (default limit: 8MB per file)
  • Check logs: Look in config directory's logs/localdrop.log

Contact

Amir Boujneh - @Mo7sen007

Project Link: https://github.com/Mo7sen007/LocalDrop


Show Your Support

If you find this project useful, please consider giving it a star on GitHub.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
dto
scripts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL