A Go implementation of the LocalSend v2.1 protocol for secure, cross-platform file sharing.
- Complete LocalSend v2.1 Protocol - Works with LocalSend apps
- Secure - HTTPS with certificates, optional PIN protection
- Fast Discovery - Multicast UDP + HTTP fallback
- Multi-file Transfers - Send multiple files concurrently
- Web Share - Share files via browser download link
- Clipboard Integration - Incoming text/plain transfers copied to clipboard automatically
- Metadata Preserved - File timestamps preserved on transfer
- Cross-Platform - Linux, macOS, Windows
# User installation (recommended)
./scripts/install.sh
# System-wide with systemd
sudo ./scripts/install.sh --mode system --service --create-user
# or using go (no service and completions)
go install github.com/bethropolis/localgo/cmd/localgo@latest# Start server to receive files
localgo serve
# Discover devices
localgo discover
# Send a file
localgo send --file document.pdf --to "My Phone"
# Share files for web download
localgo share --file document.pdf# Start with Docker Compose
docker-compose up -d
# Or build and run manually
docker build -t localgo .
docker run -d --network host -v $(pwd)/downloads:/app/downloads localgo| Variable | Default | Description |
|---|---|---|
LOCALSEND_ALIAS |
hostname | Device name |
LOCALSEND_PORT |
53317 | Server port |
LOCALSEND_DOWNLOAD_DIR |
./downloads | Download directory |
LOCALSEND_PIN |
— | Optional PIN protection |
LOCALSEND_FORCE_HTTP |
false | Use HTTP instead of HTTPS |
LOCALSEND_DEVICE_TYPE |
desktop | Device type (mobile/desktop/laptop/tablet/server/headless/web/other) |
LOCALSEND_DEVICE_MODEL |
LocalGo | Device model string |
LOCALSEND_AUTO_ACCEPT |
false | Auto-accept incoming files without prompting |
LOCALSEND_NO_CLIPBOARD |
false | Save incoming text as a file instead of clipboard |
LOCALSEND_LOG_LEVEL |
info | Log verbosity (debug/info/warn/error) |
export LOCALSEND_ALIAS="File Server"
export LOCALSEND_DOWNLOAD_DIR="/srv/files"
export LOCALSEND_PIN="123456"
localgo serve| Command | Description |
|---|---|
serve |
Start server to receive files |
share |
Share files via web download |
discover |
Find devices via multicast |
scan |
Find devices via HTTP scan |
send |
Send files to a device |
info |
Show device information |
devices |
List discovered devices |
Run localgo help for more options.
Detailed guides available in docs/:
- Configuration - All settings
- Docker - Container deployment
- CLI Reference - Command details
- Deployment - Production setup
Discovery not working:
# Use HTTP scan instead
localgo scan --timeout 15Port in use:
# Use different port
localgo serve --port 8080Permission denied:
# Fix download directory
chmod 755 ~/Downloads/LocalGoMIT License - see LICENSE file.