Pastey

Pastey

Docker app from CatDuck's Repository

A lightweight, self-hosted paste platform (Pastebin alternative) with language detection and on-disk encryption.

Overview
A lightweight, self-hosted paste platform (Pastebin alternative) with language detection and on-disk encryption. This fork exists because upstream Cesura/pastey has had no release since 2022, and the previous community image (arcscloud/pastey) was removed from Docker Hub. This build removes TensorFlow for a much smaller image, adds a default paste expiry and an expiry picker, supports IPv6 whitelist ranges, and defaults to dark mode.

pastey

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 guesslang to 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

Links

Details

Repository
ghcr.io/catduckgnaf/pastey:latest
Last Updated2026-11-17
First Seen2026-11-17

Runtime arguments

Web UI
http://[IP]:[PORT:5000]/
Network
bridge
Shell
sh
Privileged
false

Template configuration

Web InterfacePorttcp
Target
5000
Default
5000
Value
5000
AppDataPathrw
Target
/app/data
Default
/mnt/user/appdata/pastey
Value
/mnt/user/appdata/pastey
PASTEY_RESTRICT_PASTINGVariable

Enable/disable restricting of pasting to whitelisted users.

Default
False
Value
False
PASTEY_RESTRICT_RAW_PASTINGVariable

Enable/disable restricting of pasting via /raw to whitelisted users.

Default
True
Value
True
PASTEY_RATE_LIMITVariable

Rate limit for pasting, for non-whitelisted users.

Default
25/hour
Value
25/hour
PASTEY_RECENT_PASTESVariable

Number of recent pastes to show on the home page.

Default
10
Value
10
PASTEY_BEHIND_PROXYVariable

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
PASTEY_USE_WHITELISTVariable

Enable/disable whitelisting for admin tasks (view recent, delete, config).

Default
True
Value
True
PASTEY_WHITELIST_CIDRVariable

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
PASTEY_DEFAULT_THEMEVariable

Default theme for new visitors. Choose Dark or Light.

Default
Dark|Light
Value
Dark
PASTEY_DEFAULT_PASTE_EXPIRYVariable

Default paste expiry in hours. Pastes may choose a different expiry using the expiry picker.

Default
72
Value
72
PASTEY_GUESS_THRESHOLDVariable

Threshold for automatic language detection guesses. If a result is below this value, it is treated as Plaintext.

Default
0.20
Value
0.20