A transfer.sh alternative that works with the same curl command

The public transfer.sh service no longer answers. File2Share accepts the same curl --upload-file command, so most transfer.sh scripts keep working after you change one word: the domain.

# before
curl --upload-file ./report.pdf https://transfer.sh/report.pdf
# after
curl --upload-file ./report.pdf https://file2share.us/report.pdf

No account and no API key. The response is a single line with the download link, and the file deletes itself after 14 days.

What stays the same

  • Same upload command: curl --upload-file (or curl -T) with the file name at the end of the URL.
  • Same Max-Days header to make a file expire sooner, from 1 to 14 days.
  • Same X-Url-Delete response header with a secret URL that deletes the file: curl -X DELETE <that URL>.
  • Uploads from pipes: tar czf - ./logs | curl -T - https://file2share.us/logs.tar.gz

What is different

transfer.sh (public instance)File2Share
StatusNot respondingRunning
Response bodyDirect file URLDownload page URL; the direct file URL is in the X-Direct-Url header
Single-request uploadUp to 10 GBUp to 95 MB; bigger files through the f2s helper, up to 50 GB
Max-DownloadsSupportedNot supported yet
RetentionUp to 14 daysUp to 14 days
Web uploadYesYes, drag and drop on the home page

If a script needs the direct file URL (for example to hand to wget), read the header instead of the body:

curl -sD - -T build.zip https://file2share.us/build.zip | grep -i '^x-direct-url' | cut -d' ' -f2

Files bigger than 95 MB

Requests pass through a CDN that rejects bodies over 100 MB, so one-shot uploads stop at 95 MB. The f2s helper is a short Bash script that uploads in 50 MB chunks and retries any chunk that fails. It needs only curl. Read the script before you run it:

curl -sLo ~/.local/bin/f2s https://file2share.us/f2s.sh && chmod +x ~/.local/bin/f2s
f2s big-backup.tar.gz

Other options

If you would rather run your own server, the transfer.sh code is open source and can still be self-hosted. For quick one-off uploads there are also minimalist hosts such as 0x0.st, and for end-to-end encrypted transfers there are browser tools like Wormhole. File2Share sits in between: a hosted service, no setup, a web page for people who don't use a terminal, and large files through the helper.

Questions

Is it free?

Yes. Command-line uploads are free and need no account or API key. Each IP address can start up to 40 uploads per hour.

Do my old transfer.sh scripts work?

Uploads, Max-Days and the X-Url-Delete header work the same way. The one difference is the response body: it is the download page URL, and the direct file URL is in the X-Direct-Url header.

How long are files kept?

Up to 14 days, or less if you send a Max-Days header. Then the file is deleted automatically.

Is it private?

Links use a random ID and are not listed or indexed, but anyone who has a link can download the file. Encrypt sensitive files first, for example with gpg -c file or age.

Full command-line guide