Overview
Discover what makes Plik powerful
Plik is a **self‑hosted, high‑performance temporary file transfer service** written in Go, designed to replace services like WeTransfer for internal or private use. At its core, Plik accepts file uploads via a modern web UI, a powerful command‑line client, or any HTTP POST to its REST API, and then provides a short‑lived download link that can be optionally protected by authentication or a password. Files are stored in one of several pluggable *data backends* (local filesystem, OpenStack Swift, Amazon S3, Google Cloud Storage) while metadata such as upload time, TTL, and permissions are kept in a *metadata backend* (SQLite, PostgreSQL, MySQL). The separation of data and metadata allows operators to choose a durable storage backend for large files while keeping a lightweight database for fast lookups.
Language & Runtime
Web Layer
Storage Layer
Encryption
Overview
Plik is a self‑hosted, high‑performance temporary file transfer service written in Go, designed to replace services like WeTransfer for internal or private use. At its core, Plik accepts file uploads via a modern web UI, a powerful command‑line client, or any HTTP POST to its REST API, and then provides a short‑lived download link that can be optionally protected by authentication or a password. Files are stored in one of several pluggable data backends (local filesystem, OpenStack Swift, Amazon S3, Google Cloud Storage) while metadata such as upload time, TTL, and permissions are kept in a metadata backend (SQLite, PostgreSQL, MySQL). The separation of data and metadata allows operators to choose a durable storage backend for large files while keeping a lightweight database for fast lookups.
Architecture & Technical Stack
- Language & Runtime: Pure Go (1.20+), compiled to static binaries for all major platforms.
- Web Layer:
net/httpwith Gorilla Mux routing, serving a single‑page React UI bundled via Webpack. - Storage Layer: A pluggable backend interface (
DataBackend) with implementations for File, S3, Swift, GCS. The same pattern is used for metadata (MetaBackend), enabling easy addition of new storages. - Encryption: Optional server‑side AES‑256 encryption for S3 uploads, implemented via Go’s
crypto/aesandcrypto/cipher. - Authentication: Supports Basic Auth, Google OAuth2, and OVH token authentication. Users can be authenticated locally or via external providers; the system stores session tokens in the metadata backend.
- Containerization: Multi‑arch Docker images (
amd64,arm64,i386,arm) are built automatically on GitHub Actions. The Docker image exposes a single entrypoint that runsplikdwith a default configuration file, making deployment in Kubernetes or Docker Compose trivial. - API: A RESTful JSON API (
/api/v1/...) provides endpoints for upload, download, delete, and metadata queries. The API is fully documented via GoDoc and OpenAPI/Swagger support can be added by developers.
Core Capabilities
| Feature | Description |
|---|---|
| OneShot | Files are automatically deleted after the first successful download. |
| TTL & Expiration | Uploads can have a custom expiration date; the system cleans up expired files via a background goroutine. |
| Password Protection | Uploads can be protected with a Basic Auth password; the UI presents a prompt before download. |
| Comments | Markdown comments can be attached to uploads and are displayed in the UI or returned by the API. |
| Upload Restrictions | Source IP filtering and token‑based restrictions are configurable per upload or globally. |
| Streaming Mode | When enabled, the file is streamed directly from uploader to downloader without intermediate storage. |
| Admin CLI & Web UI | Full CRUD operations for users, uploads, and configuration via a dedicated admin interface. |
| Client Libraries | A Go client SDK (github.com/root-gg/plik) and a .NET wrapper (plikSharp) expose the API in idiomatic code. |
Deployment & Infrastructure
- Self‑Hosting: A single binary plus a config file is all that’s required. The default configuration listens on
0.0.0.0:8080and uses SQLite for metadata; this can be swapped out for PostgreSQL or MySQL with a single line in the config. - Scalability: Because data and metadata are decoupled, multiple Plik instances can run behind a load balancer, all pointing to the same S3 bucket or Swift container. The metadata backend must be a single source of truth (e.g., PostgreSQL) to avoid duplicate IDs.
- Container Orchestration: Helm charts are not provided, but the Docker image is fully compatible with Kubernetes deployments. A typical deployment would expose a
Servicefor external access, mount a PersistentVolumeClaim for the local file backend, and use an Ingress with TLS termination. - Resource Footprint: A minimal instance runs comfortably on a 1‑core, 512 MiB VM. CPU usage is linear to upload throughput; memory consumption stays below 50 MiB for typical workloads.
Integration & Extensibility
- Plugin System: While Plik does not expose a formal plugin API, its backend interfaces are open to extension. Developers can fork the repository and add new storage adapters (e.g., Azure Blob, Ceph) without altering the core logic.
- Webhooks: The API supports optional webhook callbacks on upload completion, deletion, and expiration. This can be used to trigger downstream processes (e.g., notifying a Slack channel or updating an asset catalog).
- Custom UI: The React front‑end is served as static assets. Developers can replace
public/index.htmland the bundled JS with a custom UI that still talks to the same API endpoints. - SDKs: The Go SDK and .NET wrapper expose typed request/response structs, making integration into existing CI/CD pipelines or desktop applications straightforward.
Developer Experience
- Configuration: A single
plikd.cfgfile uses standard Go struct tags for JSON/YAML, making it easy to understand and edit. Environment variables can override any field. - Documentation: The project hosts comprehensive docs (Installation, Configuration, API) and a GoDoc reference. The README is kept concise but links to deeper sections.
- Community & Support: The project is MIT
Open SourceReady to get started?
Join the community and start self-hosting Plik 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
Chitchatter
Peer‑to‑peer encrypted chat with no server needed
Yarr
Self-hosted other
CookCLI
Command‑line tool for managing, shopping and web‑serving Cooklang recipes
Kinto
Self-hosted other
EspoCRM
Open‑source CRM for smart customer relationships
OpenSearch
Enterprise‑grade search and observability for unstructured data