MCPSERV.CLUB
Plik

Plik

Self-Hosted

Scalable temporary file transfer with secure, multi‑backend support

Stale(68)
1.7kstars
0views
Updated Jun 13, 2025

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/http with 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/aes and crypto/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 runs plikd with 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

FeatureDescription
OneShotFiles are automatically deleted after the first successful download.
TTL & ExpirationUploads can have a custom expiration date; the system cleans up expired files via a background goroutine.
Password ProtectionUploads can be protected with a Basic Auth password; the UI presents a prompt before download.
CommentsMarkdown comments can be attached to uploads and are displayed in the UI or returned by the API.
Upload RestrictionsSource IP filtering and token‑based restrictions are configurable per upload or globally.
Streaming ModeWhen enabled, the file is streamed directly from uploader to downloader without intermediate storage.
Admin CLI & Web UIFull CRUD operations for users, uploads, and configuration via a dedicated admin interface.
Client LibrariesA 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:8080 and 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 Service for 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.html and 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.cfg file 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

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
NOASSERTION
Stars
1.7k
Technical Specs
Pricing
Open Source
Database
Multiple
Docker
Official
Supported OS
LinuxDocker
Author
root-gg
root-gg
Last Updated
Jun 13, 2025