Skip to content

xport receive

Terminal window
xport receive [dir]

Starts a public upload page and stores everything people send you in dir (default: current directory, created if missing). The command stays in the foreground until you stop it (Ctrl-C) or the session expires.

Example output:

____ _
__ _| _ \ ___ _ __| |_
\ \/ / |_) / _ \| '__| __|
> <| __/ (_) | | | |_
/_/\_\_| \___/|_| \__|
Receiving into: /home/you/inbox
Upload page: https://k7fz2.xport.sh
Expires: 2026-10-21 17:17:00 CET
Press Ctrl-C to stop.
  • The page is a drag & drop dropzone on the inside-xPort design: multi-file picking, per-file type/size validation with clear errors, an optional sender name, progress bars during upload, and a done card listing what arrived. A <noscript> form keeps it usable without JavaScript.
  • The header chip counts down the real session expiry.
  • Received files land in dir with their original names.
  • Name conflicts never overwrite: the second report.txt becomes report-1.txt, then report-2.txt, and so on.
  • Upload filenames are sanitized (filepath.Base) — path traversal attempts are stripped.
  • Uploads are streamed (memory-capped request bodies, larger uploads spill to disk).
  • --name, --expires, and --password work as for xport <port> — protect the page so only people you gave the password to can upload.

xport receive doubles as a file-request page: set a request text, restrict the file types, and cap the upload size — handy when you need a specific document from someone:

Terminal window
xport receive ~/inbox \
--name receipt \
--message "Please upload the receipt as a PDF" \
--accept ".pdf,.jpg,image/png" \
--maxfilesize 10MB \
--password dinner-2026
  • --message becomes the page heading; the rules chips show the accept rule and the per-file limit (plus the sender name once typed).
  • --accept feeds both the file input’s accept attribute and the client-side validation (extensions and common MIME types like image/png); it is a convenience, not a hard restriction.
  • --maxfilesize is enforced server-side: an oversized file is rejected with 413 Payload Too Large and a clear error. Sizes are plain bytes or a B/KB/MB/GB suffix (decimal 1000-based).

All three also live in the config file (receive.message, receive.accept, receive.max_filesize) and as XPORT_RECEIVE_* environment variables; the flag wins.

All persistent options apply: --name, --expires, --password, --qr, --copy, --detach, --json — protect the page so only people you gave the password to can upload.

Plus the receive-local --message, --accept, and --maxfilesize (file requests, configurable via receive.*), and the positional [dir] argument for the target directory.