selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
transfer.sh logo

Self-host transfer.sh

v1.6.1

Command-line file sharing with expiring links

ReleaseOpen SourceMIT
Updated2 years ago
LanguageGo
Setup difficultyEasy
Stars
15 909
Ports
8080 (HTTP listener used by the official Docker image entrypoint), 80 (Default HTTP listener when run without a listener flag), 443 (Default HTTPS listener when TLS is enabled)
Docker
dutchcoders/transfer.sh
Install with Docker

What is transfer.sh?

transfer.sh is a file sharing server you run yourself, aimed at people who want to hand over a file with a single curl command instead of a cloud drive. Uploads go through HTTP with --upload-file, and each one comes back with a short link plus a delete URL in the x-url-delete response header. Links can be capped by a maximum number of downloads or a maximum lifetime in days, and a scheduled purge removes old uploads on local or Google Drive storage. Files can be encrypted server side with AES-256, submitted to VirusTotal, or prescanned by a ClamAV daemon; access can be restricted with basic auth, IP allow/deny lists, rate limits, upload size caps and CORS domains. Storage is pluggable between the local filesystem, Amazon S3 (and custom S3 endpoints), Storj and Google Drive. TLS is handled either with your own certificates or via Let's Encrypt with an optional redirect to HTTPS, so it usually sits behind a reverse proxy on your own domain. Run it with the official Docker image (dutchcoders/transfer.sh), including rootless -noroot variants, or with the compiled Go binary. Two caveats: a published security advisory covers an IP-filter and auth bypass through spoofed X-Forwarded-For headers, and the maintainers state that server-side encryption should only be trusted on an instance you host yourself.

transfer.sh alternatives

Should you self-host transfer.sh?

transfer.sh scores 68/100 on selfhost.directory (how scoring works) and ranks #9 of 90 in File Sharing. It has 15 909 GitHub stars, +13 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is copyparty (82/100, 47 274 stars). It scores higher overall, so compare the two before you pick. See transfer.sh vs copyparty side by side.

Features

  • Automatic purge of old uploads
  • Command-line uploads
  • Delete links for uploads
  • Direct download and inline links
  • Download-count limits
  • HTTP basic auth on uploads
  • IP allow- and blocklists
  • Link expiry after N days
  • Pluggable storage backends
  • Rate and size limits
  • Server-side AES-256 encryptionMaintainers warn to use it only on an instance you host yourself.
  • TLS with Let's Encrypt or own certificates
  • VirusTotal scanning
  • Web upload front end

transfer.sh README

IP filter and HTTP auth bypass via unauthenticated X-Forwarded-For header spoofing

transfer.sh Docker pulls Build Status

Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance.

Transfer.sh currently supports the s3 (Amazon S3), gdrive (Google Drive), storj (Storj) providers, and local file system (local).


How to install transfer.sh

Install transfer.sh with Docker

docker run --publish 8080:8080 dutchcoders/transfer.sh:latest --provider local --basedir /tmp/

Rootless builds are published with a -noroot tag suffix (UID/GID 5000); the README recommends using an actual version tag instead of latest.

How to configure transfer.sh

  • LISTENERport to use for http (:80)
  • PROFILE_LISTENERport to use for profiler (:6060)
  • FORCE_HTTPSfalseredirect to https
  • TLS_LISTENERport to use for https (:443)
  • TLS_LISTENER_ONLYflag to enable tls listener only

transfer.sh releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in File Sharing

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…