A self-hosted pastebin built with Flask. Supports syntax highlighting, file attachments, password-protected pastes, expiry options, and an admin panel. https://p.wenberg.net
  • Python 50.7%
  • HTML 31.1%
  • JavaScript 6.2%
  • CSS 6.1%
  • TypeScript 5.3%
  • Other 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
redeuxx 67afc124d8
All checks were successful
Mirror main to GitHub / mirror (push) Successful in 12s
Build and publish image / build (push) Successful in 16s
docs: install from published image instead of git clone
2026-08-02 01:39:02 -05:00
.forgejo/workflows fix(ci): push image with a PAT, not the Actions token 2026-08-01 03:37:39 -05:00
.github chore(deps): drop the github-actions dependabot ecosystem 2026-07-31 23:59:15 -05:00
app Merge branch 'main' of https://github.com/redeuxx/whitespace 2026-07-22 10:26:33 -05:00
docs docs: install from published image instead of git clone 2026-08-02 01:39:02 -05:00
migrations first commit 2026-04-10 13:52:38 -05:00
tests fix(attachments): prevent stored XSS from inline-served uploads 2026-07-03 00:23:28 -05:00
.dockerignore first commit 2026-04-10 13:52:38 -05:00
.env.example chore: remove deprecated FLASK_ENV from .env.example 2026-05-04 10:45:29 -05:00
.gitignore fix(attachments): prevent stored XSS from inline-served uploads 2026-07-03 00:23:28 -05:00
.python-version first commit 2026-04-10 13:52:38 -05:00
docker-compose.yml build: publish image from Forgejo CI instead of building on deploy 2026-08-01 03:25:42 -05:00
Dockerfile first commit 2026-04-10 13:52:38 -05:00
entrypoint.sh first commit 2026-04-10 13:52:38 -05:00
LICENSE first commit 2026-04-10 13:52:38 -05:00
main.py first commit 2026-04-10 13:52:38 -05:00
package-lock.json chore(deps-dev): bump typescript from 6.0.3 to 7.0.2 2026-07-11 09:02:49 +00:00
package.json chore(deps-dev): bump typescript from 6.0.3 to 7.0.2 2026-07-11 09:02:49 +00:00
pyproject.toml chore(release): bump version to 1.0.3 2026-07-22 21:43:54 -05:00
README.md docs: install from published image instead of git clone 2026-08-02 01:39:02 -05:00
requirements.txt chore(deps): bump wrapt from 2.2.2 to 2.3.0 (#2) 2026-08-01 01:00:30 -05:00
run.py Potential fix for code scanning alert no. 9: Flask app is run in debug mode 2026-04-12 06:43:32 -05:00
tsconfig.json chore: replace deprecated module=None with ESNext in tsconfig 2026-05-25 22:39:53 -05:00
uv.lock fix: update cryptography to 49.0.0 to remediate GHSA-537c-gmf6-5ccf 2026-06-19 10:33:27 -05:00

Whitespace

A self-hosted pastebin built with Flask. Supports syntax highlighting, file attachments, password-protected pastes, expiry options, and an admin panel. Live demo at https://p.wenberg.net.

Features

  • Syntax highlighting with auto-language detection
  • Optional password protection with AES-256-GCM encryption at rest
  • Expiry options: burn after read, 1h, 1d, 1w, or never
  • File attachments (number of attachments is configurable)
  • Fork pastes to create an editable copy
  • Full-text search
  • Admin panel - manage pastes, ban IPs, toggle maintenance mode
  • Rate-limiting options

Deployment

Quick start (Docker)

No clone needed - the image is published to git.wenberg.net/redeuxx/whitespace.

mkdir whitespace && cd whitespace/

cat > docker-compose.yml <<'EOF'
services:
  web:
    image: git.wenberg.net/redeuxx/whitespace:latest
    ports:
      - "8118:8118"
    volumes:
      - uploads_data:/app/uploads
      - db_data:/app/instance
      - ./.env:/app/.env:ro
    restart: unless-stopped

volumes:
  uploads_data:
  db_data:
EOF

# set SECRET_KEY, ADMIN_USERNAME, ADMIN_PASSWORD
curl -o .env https://git.wenberg.net/redeuxx/whitespace/raw/branch/main/.env.example

docker compose up -d

App runs at http://localhost:8118, admin at /admin. This app is meant to be run behind a reverse proxy that provides SSL.

See .env.example for all configuration options (file upload limits, rate limits, pagination, database URL).

Updating (Docker)

cd whitespace/
docker compose pull
docker compose up -d