Overview
Discover what makes transfer.sh powerful
`transfer.sh` is a lightweight, self‑hostable file transfer service written in **Go** that exposes a minimal HTTP API for uploading, downloading, and deleting files. The service is designed to be drop‑in on any server or container orchestration platform, providing a command‑line friendly interface (`curl`, `wget`, etc.) and optional server‑side encryption. At its core, the application accepts multipart/form‑data uploads and streams them directly to a configured backend storage provider without materializing the entire file in memory, making it efficient for large payloads.
Language & Runtime
Frameworks
Storage Abstraction
Database
Overview
transfer.sh is a lightweight, self‑hostable file transfer service written in Go that exposes a minimal HTTP API for uploading, downloading, and deleting files. The service is designed to be drop‑in on any server or container orchestration platform, providing a command‑line friendly interface (curl, wget, etc.) and optional server‑side encryption. At its core, the application accepts multipart/form‑data uploads and streams them directly to a configured backend storage provider without materializing the entire file in memory, making it efficient for large payloads.
Architecture & Technical Stack
- Language & Runtime: Pure Go (1.20+), compiled to a single static binary, enabling zero‑dependency deployments.
- Frameworks: Standard
net/httpwith a small router (github.com/gorilla/mux) for path handling; no heavy frameworks, keeping the attack surface minimal. - Storage Abstraction: A pluggable backend interface (
storage.Provider) supports S3, Google Drive, Storj, and a local filesystem. The provider layer abstracts bucket/namespace operations, upload/download streams, and lifecycle policies. - Database: No relational database; metadata (file ID, deletion URL, expiry timestamps) is encoded into a deterministic URL and stored in memory or an optional key‑value store for persistence across restarts.
- Encryption: Optional AES‑256 server‑side encryption (via
X-Encrypt-Password) and client‑side GPG support. Encryption is performed in streaming mode to avoid full file buffering. - Metrics & Health: Exposes Prometheus metrics and a
/healthzendpoint for observability.
Core Capabilities
- Upload API:
PUT /<filename>orPOSTwith multipart form data; supports custom headers forMax-Downloads,Max-Days, and encryption. - Download API: Simple GET to the file URL; supports
X-Decrypt-Passwordfor server‑side decryption. - Deletion API:
DELETE <delete-url>where the delete URL is returned in theX-Url-Deleteresponse header. - VirusTotal Integration: Special endpoint (
/virustotal) that forwards the file to VirusTotal’s API automatically after upload. - Extensible Providers: New storage backends can be added by implementing the
Providerinterface and registering it in the provider registry. - Webhooks & Callbacks: Not natively supported, but developers can wrap the service in a proxy that forwards POST requests to external endpoints on upload/delete events.
Deployment & Infrastructure
- Containerization: Official Docker image (
dutchcoders/transfer.sh) is built on a scratch base, exposing port 80. The image can be run with environment variables for provider configuration (AWS_ACCESS_KEY_ID,GOOGLE_APPLICATION_CREDENTIALS, etc.). - Self‑Hosting Requirements: Minimal – a machine with Go runtime (or Docker), network connectivity to the chosen storage provider, and optional TLS termination via a reverse proxy.
- Scalability: Stateless request handling allows horizontal scaling behind a load balancer. The storage provider handles concurrency; S3 and Storj naturally scale, while local FS requires shared storage (e.g., NFS) for multi‑node deployments.
- High Availability: Combine multiple instances with a shared backend (S3 or NFS) and a DNS round‑robin or Kubernetes Service for load balancing.
Integration & Extensibility
- API Usage: Exposed endpoints are RESTful and can be consumed by any HTTP client. The service supports CORS headers, enabling browser‑based uploads via drag‑and‑drop.
- SDKs: No official SDKs, but the API’s simplicity allows quick wrappers in any language.
- Customization: Developers can modify the
main.gosource to add custom headers, enforce authentication (JWT, Basic Auth), or integrate with CI/CD pipelines. - Plugin System: Not built‑in, but the provider abstraction allows adding new storage backends by implementing a small interface.
Developer Experience
- Configuration: All settings are environment‑based; the README documents required variables for each provider. No configuration files mean fewer attack vectors.
- Documentation: The repository’s README covers usage patterns, header semantics, and examples. The code is well‑commented, and unit tests cover edge cases.
- Community & Support: Active GitHub repo with issue tracking and pull requests. Licensing is MIT, encouraging commercial use without restrictions.
Use Cases
- CI/CD Artifact Sharing: Upload build artifacts to a temporary S3 bucket and share the URL with downstream jobs.
- Internal Tooling: Provide a lightweight file drop for internal teams without relying on external services.
- Security Audits: Integrate with VirusTotal to automatically scan uploaded binaries before distribution.
- Developer Prototyping: Quickly spin up a local instance for testing file upload flows in new applications.
Advantages Over Alternatives
| Feature | transfer.sh | Competitor (e.g., WeTransfer, File.io) |
|---|---|---|
| Self‑hostable | ✔️ | ❌ |
| Zero dependencies | ✔️ (static Go binary) | ❌ |
| Multiple storage backends | ✔️ S3, GDrive, Storj, Local | Limited |
| Server‑side encryption | ✔️ AES-256 via header | ❌ |
| Open source & MIT license | ✔️ | ❌ |
| Container‑friendly | ✔️ Docker image | Mixed |
For developers who need a dependable,
Open SourceReady to get started?
Join the community and start self-hosting transfer.sh today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Grist
Hybrid database‑powered spreadsheet for modern data work
WeeChat
Lightweight, extensible chat client for multiple protocols
Wakapi
Track coding time with a lightweight, self-hosted backend
Vanilla Cookbook
Simplify recipe management with smart conversion and AI assistance
Socialhome
Federated personal profile and social networking platform
I Hate Money
Shared budget tracking made simple and self‑hostable