A temporary, portable web file server for exchanging files with people behind strict firewalls and proxies. Customers only need a browser and HTTPS on 443. You share a folder through an admin page, hand out a link (optionally password-protected, expiring, quota- and speed-limited), and tear it down afterwards.
- A Drive-like page for customers: browse, preview images, PDFs, video, audio and text, filter and sort, resumable parallel chunked uploads, parallel downloads (also in Firefox), pause and resume, and honest progress: only what the server has confirmed counts. Works on a phone, in light and dark.
- Control for you: links with a mode (upload, download or both), a sub-folder, a password, an expiry, a quota and a speed limit, all editable afterwards; a closing time; a bandwidth cap for the whole server; an activity log.
- A file manager in the admin: make folders, rename, move, delete to a trash with undo. Nothing is ever overwritten.
- Built for a tunnel: chunk sizes keep every request under Cloudflare Free's 100 MB body cap and 125 s timeout, even on
a throttled link. There are two listeners: the public one (
:8080, put the tunnel in front) and the admin one (127.0.0.1:8081, bearer token, Host allow-list). Never expose the admin port. - Portable: one static binary with the UI embedded, a distroless container, a compose file and a Kubernetes manifest.
Binary (make build, needs Go 1.26 and Node 22):
./bin/dropbridge --parent /srv/exchange --data-dir ~/.dropbridge
The admin token is printed once on first start (--reset-admin-token issues a new one). Only folders beneath
--parent can be shared.
Docker Compose with Cloudflare Tunnel: see deploy/compose.
cd deploy/compose && cp .env.example .env # set TUNNEL_TOKEN and SHARE_DIR
docker compose up -d
Harvester / Kubernetes: see deploy/harvester/dropbridge.yaml
(one replica, cloudflared sidecar, admin reached with kubectl port-forward).
In every case, point the tunnel's public hostname at the app's public port (http://dropbridge:8080 in compose,
http://localhost:8080 in the pod).
The admin page is meant for loopback. To reach it from anywhere, put it behind Cloudflare Access first: the admin can delete files, so the admin token alone should not be what stands between it and the internet.
- In the Zero Trust dashboard: Access > Applications > Add an application > Self-hosted. Application domain
admin.example.org, and one policy: Allow, include your email address (a one-time code is enough; the Free plan covers up to 50 users). Create it before the next steps. - Route the tunnel to the admin port. With a token-managed tunnel (the compose file in this repo), add a second public
hostname in the tunnel's settings:
admin.example.orgtohttp://dropbridge:8081. With aconfig.yml, add- hostname: admin.example.organdservice: http://dropbridge:8081before the catch-all rule. - Tell dropbridge the name, which its Host check otherwise refuses:
DROPBRIDGE_ADMIN_HOSTS=admin.example.org(or--admin-hosts), and restart it. - Create the DNS record last (
cloudflared tunnel route dns <tunnel> admin.example.org, or from the dashboard), so there is never a moment when the page is reachable without Access.
You then sign in twice: Cloudflare asks for your email code, and the page asks for the admin token. The public hostname
never reaches the admin listener, whatever is misconfigured: the admin checks the Host header and answers 403 to any
name that is not on its list.
| Flag | Environment | Default |
|---|---|---|
--data-dir |
DROPBRIDGE_DATA |
./dropbridge-data |
--parent |
DROPBRIDGE_PARENT |
current directory |
--public-addr |
DROPBRIDGE_PUBLIC_ADDR |
:8080 |
--admin-addr |
DROPBRIDGE_ADMIN_ADDR |
127.0.0.1:8081 |
--min-free-mb |
DROPBRIDGE_MIN_FREE_MB |
1024 (refuse uploads that leave less free; 0 = off) |
--delete-uploads-after |
DROPBRIDGE_DELETE_UPLOADS_AFTER |
0 (never; e.g. 720h = 30 days) |
--forget-ips-after |
DROPBRIDGE_FORGET_IPS_AFTER |
0 (keep; e.g. 168h = 7 days) |
--retention-dry-run |
DROPBRIDGE_RETENTION_DRY_RUN=1 |
off (with the first flag: only log what would be deleted) |
--direct-link-max |
DROPBRIDGE_DIRECT_LINK_MAX |
24h (the longest a direct link may live; 0 turns them off) |
--notify-url |
DROPBRIDGE_NOTIFY_URL |
none (a webhook; a secret, so use the variable) |
--notify-format |
DROPBRIDGE_NOTIFY_FORMAT |
auto (slack, discord, ntfy or json) |
--admin-hosts |
DROPBRIDGE_ADMIN_HOSTS |
none (extra Host names, e.g. a tailnet name) |
--trusted-proxies |
DROPBRIDGE_TRUSTED_PROXIES |
127.0.0.0/8,::1/128 |
--public-url |
DROPBRIDGE_PUBLIC_URL |
none (e.g. https://files.example.org: the address customers use; the admin UI builds copied links from it and you can change it there) |
--trash-days |
DROPBRIDGE_TRASH_DAYS |
7 (days that what the administrator deletes stays recoverable) |
--upload-ttl |
24h |
|
--close-after |
DROPBRIDGE_CLOSE_AFTER |
none (e.g. 72h: stop serving customers this long after the first start) |
--healthcheck |
probe /healthz and exit (used by the image) |
--trusted-proxies must list the address range of whatever sits in front (the tunnel); the client IP is read from
CF-Connecting-IP / X-Forwarded-For only for those peers.
--close-after is a safety net for a temporary server: it sets a deadline once, on the first start (restarts never
extend it). Closing is a gate, not an exit, so restart policies do not bring it back: customers get a "closed"
message, /healthz stays green, and nothing is deleted. The admin page can extend, close now or reopen at any time.
The admin page also shows an activity log (link opened, wrong passwords, downloads, uploads, admin changes). Link
tokens and passwords are never written to it.
Browse files on a shared folder (in the admin) opens a file manager: make folders, rename, move and delete. It only exists in the admin, which is not reachable by customers.
- Nothing is ever overwritten. A rename or move onto a name that is taken is refused.
- Delete goes to the trash, a hidden
.dropbridge-trashfolder at the top of the share, so it is one fast rename on the same disk. A toast offers Undo, and the Trash panel restores items or deletes them for good. Items are removed automatically after--trash-daysdays (7 by default). - Links are protected. Renaming, moving or deleting a folder that a live link points into asks first and names the links.
- Read-only shares cannot be changed at all, and customers can neither see nor reach the trash.
- Every action is recorded in the activity log with who did it. The permissions (
files.rename,files.move,files.deleteand so on) go through one small check, so accounts could be added later without touching the handlers. - The folder picker can make a folder, so a share can be created on an empty volume (the container image has no shell).
dropbridge shares any folder under its parent, and a mounted network share is just another folder, so NFS and SMB work without any extra software in dropbridge. The operating system (or the container runtime) does the mounting; dropbridge never mounts anything and never stores a network password.
The Network shares tab in the admin helps with that:
- It lists the NFS, SMB and other network file systems that are mounted where dropbridge can see them (read from
/proc/self/mountinfo, Linux only), with size and free space, and a Share this folder… button for each. - It shows which of your shared folders live on the network, and the Shared folders list marks them NFS or SMB.
- A generator writes the settings that mount a new share, for Docker Compose (a volume with
driver_opts), Kubernetes (a PersistentVolume and claim; SMB needs the SMB CSI driver) and a Linux host (/etc/fstab). The account for an SMB share never goes into those files: it comes from the.envfile, a Kubernetes secret, or a credentials file only root can read. Whatever you type is validated, so it cannot break out of the file it is placed in.
Mounting is a step you take with the generated settings, then restart dropbridge and press Share this folder…. Network file systems are slower to list and rename and can stall when the connection drops; see the tab for what to check first when uploads fail with "permission denied" (usually the user and group mapping).
If a network mount hangs. When the server behind a mount goes away, programs that touch it can block until it returns.
dropbridge limits the damage: free space is read with a time limit and a short cache, and an upload that cannot be
checked is let through instead of blocking everyone. To recover on the host (not inside the container), detach the dead
mount with umount -l /path/to/mount (a lazy unmount) and mount it again once the server is back, then restart dropbridge.
dropbridge does not do this itself, on purpose: it would need extra privileges, and while the mount is detached the shared
path is an empty local folder, so uploads would silently land on the server's own disk and be hidden when the share returns.
Stop or pause the links that use the share first. For shares that mostly serve downloads, the NFS options soft,timeo=100,retrans=3
make calls fail after a bounded time instead of waiting forever; the price is that a write can fail in the middle.
Set DROPBRIDGE_NOTIFY_URL to a webhook and dropbridge tells you when files arrive, when a link is opened for the first
time, when a link's upload quota is used up and when the disk is too full to accept uploads. Slack, Discord and
ntfy addresses are recognised, anything else gets a small JSON document (event, link, files,
count, bytes, time, text). The admin page shows whether it is on and has a Send a test button.
- The address is a secret: Slack and Discord put a token in it. It is read from the environment (a flag would show in the process list), never stored in the database, never returned by the API and never written to a log; delivery errors are logged without it.
- Never in a message: a link's address or token. Messages carry the link's label, file names and sizes.
- File names come from customers, so each format neutralises them: Slack text is escaped (no
<!channel>), Discord messages disable all mentions, and control characters and line breaks are removed everywhere. - It cannot slow a transfer: delivery is asynchronous with a short timeout, the queue is bounded and drops when full, and a folder of 500 files is one message (uploads are gathered for ten seconds per link). A restart sends what is waiting.
- "First opened" is remembered in the database, so it is announced once, also across restarts. "Quota full" and "disk low" are announced once each time the condition starts, not once per refused upload.
The customer page and the admin are available in English and Brazilian Portuguese. The language is taken from the browser's
language list (any Portuguese becomes pt-BR), can be changed with the selector in the page header, and is remembered in that
browser. Numbers, dates and plurals follow the language. To add a language, copy web/src/lib/i18n/en.js, translate the
values (keep the keys and the {placeholders}), and register it in web/src/lib/i18n-core.js; npm test fails if a key or
placeholder is missing, or if English is typed straight into a label.
Each link can carry three more settings, set when it is created and changeable later:
- A message (plain text, up to 2000 characters) shown above the upload area once the customer is inside: "Upload the logs, named by date." It is never shown on the password screen or to someone who is not signed in.
- Accepted file types (
pdf, zip, tar.gz): an upload is refused unless the file's name ends with one of them, compared without regard to case. The file's own name decides, soreport.pdf.exeis not a PDF. Empty means any file. - Largest single file (MiB): a file over the limit is refused at the start, before anything is reserved or stored. This is separate from the link's total upload quota.
The customer page applies the same rules before it queues anything, so a folder with hundreds of unwanted files becomes one notice ("2 files were not added") instead of a failure for each, and says what is accepted. The server enforces them regardless. New rules apply to uploads that start after the change; an upload that was already running is ended, and its quota freed, when the customer tries to resume it.
Copy invitation next to a link copies a ready-to-send text: the address on a line of its own, what the link allows, when it ends, the rules and your message. It never contains the password (which is stored only as a hash); it says the password comes separately. The text is in the language the admin page is shown in.
A browser is not always where a file is needed: sometimes it has to land on a server you only reach over SSH. On a link that can download, each file has a Direct link button. It makes a signed address for that one file that works without a cookie or a sign-in, and offers ready-made commands:
curl -fL -C - -o 'report.pdf' 'https://files.example.org/d/...'
aria2c -c -x 8 -o 'report.pdf' 'https://files.example.org/d/...'
Both resume if interrupted (run the same command again). The commands are quoted for a POSIX shell and the saved name is cleaned, so a file name chosen by someone else cannot run anything on the customer's machine.
What it is, and what it is not:
- It is a credential: anyone who has the address can download that one file until it ends (an hour, six or a day, never
more than
--direct-link-maxand never past the link's own expiry). It is not a way to browse the share. - It stops at once when the link is revoked or expires, when the link stops allowing downloads, when the share is closed,
when the password is changed to a different one, or when direct links are turned off (
--direct-link-max 0). Taking a password off again restores the state the address was made in, as it does for a session; to end direct links for good, revoke the link. - It is signed with its own purpose (a session cookie can never be used as one), is never logged (the activity log shows
"downloaded (direct link)" with the file's path), is sent with
Cache-Control: private, no-store, and obeys the link's speed limit like any other download. - A password-protected link still makes direct links for someone who has signed in: they are the person you gave the password
to, and they chose to hand the address on. If that is not acceptable for a share, set
--direct-link-max 0.
A link can allow only so many downloads: a download limit of 3 serves three files, and a one-time link is simply a limit of 1. Set it in the link form or later with Edit; "Create similar" copies the limit but starts counting from nothing.
- What counts as a download: one file fetched by one sign-in (session). A browser fetches a file in many parts and a
download can be resumed, so the count is held by the session for that file: its later requests for the same file, with
any
Range, are the same download and are never refused, not even when the first request used the last one. A request that holds no claim always takes one, whatever its range, so starting at a later byte is no way around the count. A different session, or a different file, is another download. AHEAD, a missing file and a folder cost nothing. - What is switched off: a limited link has no previews, no folder ZIPs and no direct links. Each of those serves content the count could not follow (and a mail or chat link scanner that fetches a direct link would use up a one-time download), and the server refuses them, not just the page.
- When it is used up: downloads stop for everyone who has no claim. On a download-only link, new visitors are shown the same plain "not available" page as for an expired link, so no file names, sizes or message are shown to whoever opens it later. On an upload and download link only downloads stop; uploads carry on. The admin shows "limit reached", and with notifications on you get one message when the last download is used.
- Raising the limit reopens a used-up link and keeps the count. The count itself cannot be set or reset through the API.
A server like this holds customers' files and the addresses they came from. Two opt-in settings keep that from piling up, both off by default:
--delete-uploads-after 720hdeletes a file that a customer uploaded 30 days after it arrived.--forget-ips-after 168hblanks the client address in the activity log after 7 days. The events stay (what happened, to which file, how big); only who it came from is forgotten.
What it will and will not delete. It only ever considers files that arrived through an upload, from the record made when the upload completed. A file you placed in the folder yourself has no record and is never touched. A file is deleted only if it is still exactly what arrived: a plain file (never a link), the size on record, and not written after the upload completed (the server stamps the time itself; it is never taken from the customer). If anything differs, the file is left in place and its record is dropped. It does not use the trash (the point is to remove the data), and it never removes folders: another link may point at one and you may have made it, so an emptied folder stays. Each deletion is its own entry in the activity log ("deleted by retention", with no address). Customers are told: the page says "Files you upload here are deleted automatically N days after they arrive" on every link that takes uploads.
Turning it on safely. The first sweep deletes everything already older than the limit, in one pass. So:
- Start with
--retention-dry-run(orDROPBRIDGE_RETENTION_DRY_RUN=1) and read the log: on start it says how many uploads and how many bytes would be deleted. Nothing is deleted while it is set. - Remove the flag. On start the log says how many will be deleted, and the first sweep waits two minutes (stop the server to cancel); after that it runs every hour.
Limits you should know about.
- Removing a share from the list deletes its links and with them the records, so its files are never retained (they are kept, which is the safe direction). The same goes for a file you move in the admin file manager, and one you restore from the trash: no record, no deletion.
- Read-only shares, and shares that cannot be opened (an unmounted network share), are skipped and their records kept.
- Addresses live only in the activity log. The container's own logs (
docker logs) and your proxy's or tunnel's logs are yours to manage; dropbridge does not write addresses to its own log lines.
Proof that a file arrived intact, for both sides, in the format sha256sum -c reads (so no special tool is needed):
- The customer gets a Download receipt button in the transfer tray once uploads have finished and the server has computed their checksums: a list of what they sent, by their own file names, to check their copies against (and to send to you).
- You get a Checksums button on every link that takes uploads: the list of what arrived through it, by the names the
files have on the server. Put it in the folder and run
sha256sum -cto check that nothing changed since (a file that was renamed, moved or edited shows up as missing or FAILED, which is the point). Files still being checksummed are left out and the list says how many.
Comment lines start with # and say what the list is; no label or file name can start a line of its own. The lists cover
uploads. Files you placed in the share yourself have no stored checksum (computing one means reading the whole file), so
they are not listed.
- Filters and CSV. The activity log can be filtered by link, by kind of event, by date (whole days, both ends included) and
by a piece of a file name (plain text, not a pattern). Export CSV saves what the filters show as a spreadsheet:
time, event, link_id, link, ip, detail, bytes, actor, newest first, up to 100,000 rows (the export says when it was cut). File names and labels are chosen by other people, so a cell that starts with=,+,-or@gets a quote in front and cannot run as a formula when the file is opened in Excel or LibreOffice. - Export and import the configuration. Export saves the shares, the links that still work (not revoked or expired ones)
and the public address and server-wide speed limit, as
dropbridge-config.json. Import on another server reads such a file and first shows what it would do; only then do you press Import now. It is strict and all-or-nothing: one problem (a share folder that does not exist on this server, an invalid address, a link on a read-only share, ...) refuses the whole file and nothing is changed. Nothing that already exists is overwritten (a second import is a no-op), expired links stay expired, counters start from nothing, and settings you already have are kept. Shares are saved with their path relative to the parent folder, so the same folders have to be there. With the links, the file holds each link's address (its token) and its password hash (never the password itself), so anyone with the file can open those links: keep it private, or export without the links when you only need the shares.
Customers get Test my connection at the bottom of the page. It measures the delay, the download speed and the upload speed between them and the server, with the link's own speed limit, using random data (so a proxy that compresses cannot flatter the result). It uses no download, no quota and no disk. It says what it means for this link: how long a gibibyte takes, and a warning when a round of upload parts would take close to the two minutes a proxy waits (the fix it suggests is a lower speed limit on the link, which makes the parts smaller). The three numbers are also written to your activity log as "connection test" (at most one every 30 seconds per sign-in, numbers only), so "it is slow" turns into something you can read.
Edit on a link changes its name, mode (upload and download, upload only, download only), password, expiry, upload quota and speed limit without making a new link, so the address you already handed out keeps working. A mode or speed change applies immediately, also to people who are already connected. Setting, changing or removing the password signs out everyone who was inside, so turning a public share into a restricted one really restricts it. A revoked link cannot be edited. Each edit is logged ("link_update") with what changed, never with the password.
Large files (16 MiB and up) download over several parallel connections, which matters behind slow or rate-limited proxies:
- Chrome and Edge ask where to save the file, then write it directly with parallel range requests.
- Firefox has no such API, so the page installs a small service worker (
/sw.js) that fetches the ranges in parallel and hands one stream to Firefox's normal download manager. Progress also shows on the page. Cancelling there makes Firefox report the file as failed; no partial file is left behind. - If the worker cannot run (a private window, blocked site storage), or the file is small, the browser's own single-stream download is used, so downloads always work.
Files that browsers show safely get a Preview button on the customer page: images, PDFs, video, audio and plain
text (the first 256 KiB). It opens a dialog with previous/next arrows for the files in the folder. HTML, SVG, XML and
scripts are never previewed: they share the page's origin, so the server refuses them (415) and serves every
preview with a fixed content type, nosniff, a locked-down Content-Security-Policy and no caching. A viewing is
logged once as "previewed" in the activity log.
make test # go test -race ./...
cd web && npm test
See docs/design.md for the design decisions, the Cloudflare limits and how they were verified, and docs/roadmap.md for what has been suggested but not built.
dropbridge is licensed under the Apache License 2.0. Copyright 2026 The dropbridge authors. Created by doccaz; the original repository is https://github.com/doccaz/dropbridge.
If you fork or redistribute it, please keep the LICENSE and NOTICE files, state your
changes, and keep a link to the original repository. Third-party components and their licences are listed in
NOTICE and reproduced in THIRD_PARTY_LICENSES.txt (regenerate it with
python3 tools/licenses.py after changing dependencies). dropbridge --version prints the version, commit and
project address.




