Pastey
Docker app from CatDuck's Repository
A lightweight, self-hosted paste platform (Pastebin alternative) with language detection and on-disk encryption.
Overview
Readme
View on GitHubpastey
Forked from Cesura/pastey
A lightweight, self-hosted paste platform.
Why this fork
This fork preserves catduck's Pastey build. The former arcscloud/pastey image disappeared from Docker Hub, so the source and image are now maintained here.
Compared with upstream, this build:
- Removes TensorFlow and
guesslangto keep the image lighter. - Supports a configurable default paste expiry with an expiry picker.
- Supports IPv4 and IPv6 whitelist networks using
ip_network. - Defaults to the Dark theme while retaining the theme assets.
The upstream BSD-3-Clause license is retained in LICENSE, and upstream credit is preserved above.
Features
- Self-contained system without external database dependencies
- Optional on-disk encryption
- Optional single-use pastes
- Optional expiration date
- QR code generation
- IP/network whitelisting and blocking
- Endpoint rate limiting
- JSON API
- Configurable via environment variables
Docker
docker run -d --name pastey -p 5000:5000 \
-v /path/to/local/dir:/app/data \
ghcr.io/catduckgnaf/pastey:latest
Pastey will be accessible at http://localhost:5000. Set PASTEY_DEFAULT_THEME=Dark to explicitly select the Dark theme. Persistent paste storage is mounted at /app/data.
Local installation
Requirements: Python 3.8 or newer.
git clone https://github.com/catduckgnaf/pastey.git
cd pastey
mkdir -p data
pip install -r requirements.txt
python app.py
Configuration
| Environment variable | Description | Default |
|---|---|---|
PASTEY_DATA_DIRECTORY |
Local directory for paste storage | ./data |
PASTEY_LISTEN_ADDRESS |
Address to listen on | 0.0.0.0 |
PASTEY_LISTEN_PORT |
Port to listen on | 5000 |
PASTEY_DEFAULT_THEME |
Default theme (Dark or Light) |
Dark |
PASTEY_DEFAULT_PASTE_EXPIRY |
Default paste expiry in hours; 0 means no expiry |
6 |
Other upstream configuration options remain available; see pastey/config.py for defaults.
Categories
Related apps
Explore more like this
Explore allLinks
Details
ghcr.io/catduckgnaf/pastey:latestRuntime arguments
- Web UI
http://[IP]:[PORT:5000]/- Network
bridge- Shell
sh- Privileged
- false
Template configuration
- Target
- 5000
- Default
- 5000
- Value
- 5000
- Target
- /app/data
- Default
- /mnt/user/appdata/pastey
- Value
- /mnt/user/appdata/pastey
Enable/disable restricting of pasting to whitelisted users.
- Default
- False
- Value
- False
Enable/disable restricting of pasting via /raw to whitelisted users.
- Default
- True
- Value
- True
Rate limit for pasting, for non-whitelisted users.
- Default
- 25/hour
- Value
- 25/hour
Number of recent pastes to show on the home page.
- Default
- 10
- Value
- 10
Inform Pastey if it is behind a reverse proxy (nginx, etc.). If this is the case, it will rely on HTTP headers X-Real-IP or X-Forwarded-For. NOTE: Make sure your proxy config sets these values.
- Default
- True
- Value
- True
Enable/disable whitelisting for admin tasks (view recent, delete, config).
- Default
- True
- Value
- True
List of whitelisted IP addresses or networks (in CIDR format). Default allows localhost only; add trusted IPv4 or IPv6 ranges as needed.
- Default
- 127.0.0.1/32
- Value
- 127.0.0.1/32
Default theme for new visitors. Choose Dark or Light.
- Default
- Dark|Light
- Value
- Dark
Default paste expiry in hours. Pastes may choose a different expiry using the expiry picker.
- Default
- 72
- Value
- 72
Threshold for automatic language detection guesses. If a result is below this value, it is treated as Plaintext.
- Default
- 0.20
- Value
- 0.20