---
name: plik
description: Plik recipe for open-forge. Covers self-hosting the scalable temporary file upload and sharing system. Upstream: https://github.com/root-gg/plik
---

# Plik

Scalable, self-hosted temporary file upload and sharing system — like WeTransfer, but on your own server. Modern Vue 3 web UI, powerful CLI client, configurable TTL with auto-cleanup, one-shot downloads, stream mode (no storage), password-protected uploads, end-to-end encryption via Age, and multiple storage backends. Upstream: <https://github.com/root-gg/plik>. Docs: <https://root-gg.github.io/plik>.

**License:** MIT

## Compatible install methods

| Method | Upstream | First-party? | When to use |
|---|---|---|---|
| Docker (rootgg/plik) | https://root-gg.github.io/plik | ✅ | Recommended; zero deps |
| Debian/Ubuntu APT | https://root-gg.github.io/plik | ✅ | Native systemd service on Debian/Ubuntu |
| Binary release | https://github.com/root-gg/plik/releases | ✅ | Any Linux; extract and run |
| Kubernetes (Helm) | https://root-gg.github.io/plik | ✅ | Kubernetes clusters |
| Build from source | https://github.com/root-gg/plik | ✅ | Development |

## Inputs to collect

| Phase | Prompt | Format | Applicability |
|---|---|---|---|
| app | "Public URL?" | e.g. https://plik.example.com | All |
| storage | "Storage backend?" | local / S3 / GCS / Swift | All |
| database | "Metadata backend?" | SQLite / PostgreSQL / MySQL | All |
| auth | "Enable authentication?" | None / Local / Google / GitHub / OIDC | Optional |
| limits | "Max upload size?" | e.g. 10GB | plikd.cfg |

## Docker (quickstart)

```bash
docker run -d --name plik \
  -p 8080:8080 \
  -v /opt/plik/data:/data \
  rootgg/plik:latest
```

## Docker Compose (with config)

```yaml
services:
  plik:
    image: rootgg/plik:latest
    restart: unless-stopped
    ports:
      - 8080:8080
    volumes:
      - ./plikd.cfg:/home/plik/server/plikd.cfg:ro
      - ./data:/data
```

Provide a `plikd.cfg` for persistent configuration (see below).

## Debian/Ubuntu APT install

```bash
curl -fsSL https://root-gg.github.io/plik/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/plik.gpg
echo "deb [signed-by=/etc/apt/keyrings/plik.gpg] https://root-gg.github.io/plik/apt stable main" | sudo tee /etc/apt/sources.list.d/plik.list
sudo apt update && sudo apt install plik-server
sudo systemctl enable --now plikd
```

## Binary install

```bash
wget https://github.com/root-gg/plik/releases/download/1.4.2/plik-server-1.4.2-linux-amd64.tar.gz
tar xzvf plik-server-1.4.2-linux-amd64.tar.gz
cd plik-server-1.4.2-linux-amd64/server
./plikd
```

## Software-layer concerns

### Key plikd.cfg settings

```toml
ListenAddress = "0.0.0.0:8080"
Path = "https://plik.example.com"  # Public URL (important for generated links)
MaxFileSize = 10737418240          # 10 GB
MaxFilesPerUpload = 1000
DefaultTTL = 2592000               # 30 days (seconds)
MaxTTL = 0                         # 0 = no limit

[DataBackend]
  Name = "file"                    # or "s3", "swift", "gcs"
  [DataBackend.Config]
    Directory = "/data"

[MetadataBackend]
  Driver = "sqlite3"               # or "postgres", "mysql"
  [MetadataBackend.Config]
    Path = "/data/plik.db"         # SQLite only
```

### Storage backends

| Backend | Config | Notes |
|---|---|---|
| `file` | `Directory` | Local filesystem (default) |
| `s3` | `Bucket`, `Region`, `AccessKeyID`, `SecretAccessKey` | AWS S3 or compatible |
| `gcs` | `Bucket` | Google Cloud Storage |
| `swift` | `AuthURL`, `Username`, `Password` | OpenStack Swift |

### Metadata backends

| Backend | Notes |
|---|---|
| SQLite3 | Default; fine for single-instance |
| PostgreSQL | Preferred for production/multi-instance |
| MySQL | Alternative relational option |

### CLI client

```bash
# Install client binary from releases
# Upload a file
plik myfile.txt
# Upload multiple files
plik file1.txt file2.txt
# One-shot (deleted after first download)
plik --oneshot secret.txt
# With TTL (1 day)
plik --ttl 86400 myfile.txt
```

## Upgrade procedure

```bash
# Docker
docker pull rootgg/plik:latest
docker compose up -d

# APT
sudo apt update && sudo apt upgrade plik-server
sudo systemctl restart plikd
```

## Gotchas

- **`Path` must be set to the public URL.** Links generated by the server use this value. If not set correctly, share links will point to `localhost`.
- **SQLite is single-instance only.** For scaled or multi-container setups, use PostgreSQL or MySQL.
- **Default TTL.** Files with no TTL set use `DefaultTTL`. Set `MaxTTL = 0` to allow permanent uploads (no expiry).
- **End-to-end encryption.** E2EE via Age requires the CLI client; files encrypted client-side cannot be previewed on the web.
- **No built-in TLS.** Deploy behind nginx/Caddy with HTTPS.

## Upstream docs

- Documentation: https://root-gg.github.io/plik
- GitHub README: https://github.com/root-gg/plik
- Releases: https://github.com/root-gg/plik/releases
- Demo: https://plik.root.gg
