StackTao/DropDrawer
About
可自托管的跨平台文件传输与暂存抽屉。桌面贴边拖放,手机端随时收发,支持 P2P 直连、云盘中转和浏览器外链下载。
Productivity & AutomationWhat you can do
- Desktop edge drawer. On macOS, Windows, and Linux (X11), drag files in and out of the drawer, move it between displays, open it with a global shortcut, paste from the clipboard, and preview images. You can also switch to a standard window.
- Mobile transfers. Pick files or photos, paste content, use the system share sheet, and save images to your photo library on Android and iOS. Import from the Android share menu or use “Open in DropDrawer” on iOS.
- P2P first. iroh QUIC tries a direct connection over the local network or the internet, with an encrypted relay when needed. Transfers support resuming, BLAKE3 integrity checks, delivery receipts, and cancellation from either device.
- Self-hosting and offline access. The Rust server handles accounts, device presence, and drawer sync. It supports Google Drive, Quark Drive, Baidu Netdisk, S3-compatible storage (including Cloudflare R2), WebDAV, and local server storage.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
DropDrawer
Drop files into a drawer at the edge of your screen and pick them up on another device.
English | 简体中文 | 繁體中文 | 日本語 | 한국어
Demo · Download · Install · Self-host · Architecture (Chinese) · Issues · MIT License
DropDrawer is a self-hostable, cross-platform app for transferring and temporarily storing files. The desktop app gives you a drawer at the edge of your screen, and the mobile app can send and receive files, photos, and text. When both devices are online, DropDrawer tries a direct peer-to-peer connection first. Cached files stay available through your configured storage even when the source device is offline. You can also create a download link that works in a browser.
See DropDrawer in action
Drag a file in. Drag a file from Finder toward the screen edge. When the drawer opens, drop it in the highlighted area. With cloud caching enabled, the uploaded file becomes available to your other devices.

Pick it up on another device. Sign in with the same account and click the download button beside the synced file. The GIF shows the file appearing in the receiving device’s Finder folder.

Step-by-step desktop screenshots
The edge hint appears as you drag a file.

The expanded drawer shows where to drop it.

The new file appears in the drawer after uploading.

The downloaded file appears in the receiving folder.

Expanded desktop drawer
On iPhone
The iPhone drawer offers quick access to files, photos, and the clipboard. Synced items appear below, ready to download or share.
Features
- Desktop edge drawer. On macOS, Windows, and Linux (X11), drag files in and out of the drawer, move it between displays, open it with a global shortcut, paste from the clipboard, and preview images. You can also switch to a standard window.
- Mobile transfers. Pick files or photos, paste content, use the system share sheet, and save images to your photo library on Android and iOS. Import from the Android share menu or use “Open in DropDrawer” on iOS.
- P2P first. iroh QUIC tries a direct connection over the local network or the internet, with an encrypted relay when needed. Transfers support resuming, BLAKE3 integrity checks, delivery receipts, and cancellation from either device.
- Self-hosting and offline access. The Rust server handles accounts, device presence, and drawer sync. It supports Google Drive, Quark Drive, Baidu Netdisk, S3-compatible storage (including Cloudflare R2), WebDAV, and local server storage.
- Share links. Share one file or bundle several files into a single download. Recipients download in their browser. You can set a passcode, an expiration time, and a download limit, and revoke the link at any time. Administrators choose which formats preview and their size limits under File preview in the admin console. By default, PDFs open with continuous scrolling, zoom and text search (up to 50 MiB); images up to 20 MiB with zoom, including SVG, TIFF and HEIC; Office documents up to 20 MiB, with Word files in a page layout and tabs for multi-sheet workbooks; text up to 2 MiB (UTF-8 or GB18030), with rendered Markdown, CSV tables, a JSON tree and highlighted source code; HTML up to 2 MiB; video and audio in the browser's own player; ZIP browsing; EPUB books; 3D models (glTF, GLB, STL, OBJ); and font specimens. Built-in viewers process files in the browser. Office layouts may differ. Range support depends on storage. Baidu and Quark require whole-file reads. Save cached previews before leaving the page. Preview retries and saves on this page share a two-hour grant per file. The first cloud read or LAN transfer authorization counts once. HTML is static unless interactive viewing is enabled. Configure a separate preview site and the public share origin to enable interactive viewing for trusted pages. It opens in a new tab or directly in the share page in WeChat and QQ. Never enter sensitive information there.
Install the client
| Platform | Installer or build option |
|---|---|
| macOS (Apple silicon) | DMG |
| Windows (x64) | Setup.exe |
| Linux (x64, preview) | AppImage · tar.gz (./install.sh) |
| Android | ARM64 APK · Universal APK |
| iOS 16.2+ | IPA (sign before installing) |
Windows and Linux desktop users can update manually from the official download page.
Your first transfer
- Start a DropDrawer server that both devices can reach.
- Enter the same server address on both devices, create an account, and sign in to it on both.
- Drag a file into the desktop drawer or pick one on mobile. Open the drawer on the other device and download it.
To make a file available while the source device is offline, enable cloud caching and let the file finish uploading to your chosen storage.
Send files from your AI assistant
On a computer with DropDrawer, open Preferences → AI file delivery. This installs the bundled skill for the current user. Keep DropDrawer running (the tray is fine), then start a new AI chat. Uploads use the active desktop account, including after switching accounts. The desktop app includes the native upload tool and needs no separate runtime.
Install the standalone CLI and Skill
Install the CLI and Skill together on macOS, Linux or Windows (x64 and ARM64). Run the command for your system, or paste it into your AI assistant and ask it to run the command. No separate Python or Node.js installation is required.
Skill installation guide and per-tool commands · Codex / Claude Code / Cursor / Gemini CLI / OpenCode / GitHub Copilot
Since v0.1.23 the desktop and CLI installers detect existing tool configuration folders and also install into ~/.agents/skills. To target just one tool, select it in the guide. After adding a tool, restart the desktop app or rerun the installer. On Linux, install unzip or bsdtar first.
macOS / Linux
bash -o pipefail -c 'curl -fsSL https://github.com/StackTao/DropDrawer/releases/latest/download/install-cli.sh | sh'
Windows PowerShell
& ([scriptblock]::Create((Invoke-RestMethod https://github.com/StackTao/DropDrawer/releases/latest/download/install-cli.ps1)))
The installer prints the executable path and saves it in the Skill. Open a new AI chat after installation.
On Linux the standalone CLI lives at ~/.local/share/dropdrawer-cli/bin/dropdrawer. Use that path for the examples below if the desktop launcher is on your PATH.
dropdrawer login
dropdrawer push --json -- "./build/My App.apk"
Sign in interactively. Use login --google for Google or login --server https://drop.example.com for self-hosting. The CLI snapshots the specified file and uploads it through the server to the account’s default storage. A successful receipt confirms a cloud download plan with the matching SHA-256. Other devices signed in to the same account can download it until the item expires, even after the CLI exits. Retrying the same name and content on the same CLI device reuses its existing item. If you abandon a failed upload, you can remove its pending item in the drawer.
Run dropdrawer for quick-start examples. Login shows the destination server and offers the sign-in methods it enables. Use login --google --no-browser on remote terminals. Signing in again reuses the previous server unless you pass --server.
dropdrawer status checks the current account, device session, and upload access with the server. Interactive pushes show file preparation, upload progress and cloud verification. If an upload response is lost, the CLI checks the same item before retransmitting and retries at most once.
For scripts, use status --json or push --json. Success writes JSON to stdout. Runtime errors write error.code, message and retryable to stderr and leave stdout empty. Exit code 4 requests sign-in and 130 indicates cancellation. Receipts include already_available and the server’s expires_at.
Run the one-line installer again to upgrade. To uninstall this build, run the downloaded executable with install --uninstall. For a custom agent skills directory pass install --skill-dir <directory> and use the same directory for uninstall. Local sign-in state is preserved.
dropdrawer logout clears the local session token. The session file is owner-only on macOS/Linux. Windows protects the token with the current user's DPAPI.
Self-host the server
Run Docker Compose or Cargo from the repository root. Docker Compose stores data in deploy/data/server by default. Running the server directly uses ./data.
cp -n .env.example .env
# The container runs as UID 10001; on Linux, give it the data directory first.
mkdir -p deploy/data/server && sudo chown 10001:10001 deploy/data/server
# Option A: pull the prebuilt multi-arch GHCR image (fastest, no Rust compile)
docker compose --env-file .env -f deploy/docker-compose.prebuilt.yml up -d
# Option B: build from local source
docker compose --env-file .env -f deploy/docker-compose.yml up -d --build
curl -fsS http://localhost:8080/health
For local development, you can also run cargo run --bin dropdrawer-server. On other devices on the same network, enter the server host’s address, such as http://192.168.1.10:8080.
If DROPDRAWER_JWT_SECRET is not set, the server generates a random secret on first start and keeps it in jwt_secret next to the database. Cloud drive credentials and other stored secrets are encrypted with DROPDRAWER_SECRET_KEY, or with a secret_key file generated next to the database; back it up together with the database, because the credentials cannot be recovered without it. You can also set your own long random value. Once every account you need exists, set DROPDRAWER_ALLOW_REGISTRATION=false to stop new sign-ups. In production, use an HTTPS reverse proxy that supports WebSocket upgrades. For large transfers, disable proxy buffering and set the upload size limit to suit your deployment. Share link recipients need to be able to reach the server. Prebuilt Compose · Caddy template · Nginx template · Production Compose template · Architecture (Chinese)
To enable Google sign-in, follow the Google sign-in setup. Use the same Google account on each device to access the same drawer.
Admin console
Set DROPDRAWER_ADMIN_ENABLED=true, create an administrator account, and open /admin on your server to manage users, storage, sign-in, retention, and share policies. See the server environment reference (Chinese) for account setup, Google sign-in, Turnstile, SMTP, quotas, and reverse proxy settings. Under File preview you can also choose preview formats and offer kkFileView, OnlyOffice Docs, a WOPI client such as Collabora Online, or a URL template such as Microsoft's online viewer as optional external viewers. Visitors confirm before sharing originals with these services. See share page previews (Chinese).
Build from source
Install stable Rust and Flutter. macOS and iOS builds require Xcode. For Windows, Android, and Linux, you can use the GitHub Actions workflows listed above.
macOS
./scripts/build_macos_p2p.sh
(cd app && flutter pub get --enforce-lockfile && flutter run -d macos)
Run ./scripts/build_macos_release.sh to create a DMG, or add --install to update DropDrawer in Applications. To use the global shortcut, grant Accessibility and Input Monitoring permissions when prompted.
Linux
Install the GTK build packages (on Ubuntu or Debian: sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev libsecret-1-dev liblzma-dev libx11-dev libxfixes-dev), then run:
cargo build --release -p p2p-core
(cd app && flutter pub get --enforce-lockfile && flutter run -d linux)
Run ./scripts/build_linux_release.sh to create dist/DropDrawer-Linux-<arch>.AppImage and .tar.gz.
iOS (Native SwiftUI)
./scripts/build_apple_p2p.sh
(cd apple && xcodegen generate)
Open the generated apple/DropDrawer.xcodeproj in Xcode and run the DropDrawerIOS scheme on Simulator or a signed physical device (includes the Share Extension).
Legacy Flutter iOS build scripts remain available via
./scripts/build_ios_p2p.shandapp/ios/.
Project structure and contributing
| Path | Purpose |
|---|---|
| app | Flutter desktop (macOS / Windows / Linux) and Android client with native platform bridges |
| apple | Native Swift / SwiftUI iOS client (DropDrawerIOS, DropDrawerShareExtension, DropDrawerCore) |
| crates/server | Axum, SQLite, WebSocket, storage adapters, and share link downloads |
| crates/p2p-core | iroh QUIC transfer engine and native FFI |
| crates/protocol · crates/p2p-cli | Shared protocol and P2P debugging tool |
| deploy · scripts | Container deployment, installers, and platform build scripts |
Report bugs and suggest features in GitHub Issues. For bug reports, include your platform, version, and reproduction steps. Before submitting code, run the relevant checks from the engineering guide (Chinese).
cargo test --workspace
(cd app && flutter analyze && flutter test)
(cd apple/DropDrawerCore && swift test)
To test P2P independently, run cargo run --bin dropdrawer-p2p-cli -- seed ./sample.zip to generate a transfer ticket and a one-run token. On the receiving device, run cargo run --bin dropdrawer-p2p-cli -- pull '<TICKET_JSON>' <TOKEN> ./received.zip.
Join the discussion on LINUX DO.
Star history
License
DropDrawer is licensed under the MIT License.
Explore related projects
Loading…