A privacy-friendly, self-hosted pastebin alternative β part of the MSK Scripts ecosystem alongside MSK Shortener.
Live: paste.msk-scripts.de
- π Plain-text pastes with optional title (up to 1 MB)
- π¨ Syntax highlighting for 30+ languages via Shiki
- β±οΈ Expiration β 10 min Β· 1 h Β· 1 d Β· 1 w Β· 1 mo Β· 1 y
- π₯ Burn after read β paste self-destructs after the first view
- π Password protection with bcrypt (cost 12)
- π Custom paste IDs (
paste.msk-scripts.de/my-snippet) - π οΈ REST API for CLI / scripting workflows
- π Bilingual UI (German / English) with cookie-based switching
- π Public stats page β aggregate numbers only
- π‘οΈ Privacy by default β no analytics, no GeoIP, IP addresses stored only as HMAC-SHA-256 hashes
- No tracking, no analytics, no third-party scripts other than Google Fonts.
- IPs are never stored. Rate limiting uses HMAC-SHA-256(ip, secret).
- Passwords are stored as bcrypt hashes (cost 12) only.
- Expired pastes are deleted, not soft-deleted.
- Cookies: exactly one β
NEXT_LOCALEfor the language preference.
See /privacy for the full policy.
| Layer | Choice |
|---|---|
| Framework | Next.js 15 (App Router) + TypeScript |
| Database | MariaDB via mysql2 |
| Styling | Tailwind CSS + MSK design tokens |
| Validation | Zod 4 |
| i18n | next-intl v4 (cookie-based, no prefix) |
| Highlighting | Shiki (server-rendered) |
| Password | bcryptjs |
| Charts | Recharts |
| Hosting | Debian + Apache2 reverse proxy + systemd |
| CI/CD | GitHub Actions (SCP + SSH) |
Deliberately not used: Prisma, Redis, any analytics, any auth provider.
# 1. Clone & install
git clone https://github.com/MSK-Scripts/msk-paste.git
cd msk-paste
npm install
# 2. Configure environment
cp .env.example .env
# Edit .env: set DB credentials and IP_HASH_SECRET (openssl rand -hex 32)
# 3. Run migrations
npm run migrate
# 4. Start the dev server
npm run dev
# β http://localhost:3000For a production deploy on Debian/Ubuntu use the install script:
curl -fsSL https://raw.githubusercontent.com/MSK-Scripts/msk-paste/main/deployment/scripts/install.sh | sudo bashDetails: deployment/README.md.
curl -X POST https://paste.msk-scripts.de/api/pastes \
-H 'Content-Type: application/json' \
-d '{
"content": "console.log(\"hello world\")",
"title": "My snippet",
"language": "javascript",
"expiresIn": "1w",
"burnAfterRead": false
}'Response:
{
"pasteId": "X7q9bA2k",
"url": "https://paste.msk-scripts.de/X7q9bA2k",
"rawUrl": "https://paste.msk-scripts.de/raw/X7q9bA2k",
"deleteToken": "dk_a7c4f2e1...",
"expiresAt": "2026-05-20T16:00:00.000Z",
"hasPassword": false,
"burnAfterRead": false
}| Method | Path | Purpose |
|---|---|---|
POST |
/api/pastes |
Create a paste |
GET |
/api/pastes/:id |
Fetch paste metadata + content |
POST |
/api/pastes/:id/verify |
Verify password, returns content |
DELETE |
/api/pastes/:id?token=β¦ |
Delete a paste with its delete token |
GET |
/api/stats |
Aggregate statistics |
POST |
/api/locale |
Set language cookie (de / en) |
npm run dev # Start Next.js dev server
npm run build # Production build
npm start # Start production server on port 3012
npm run lint # ESLint
npm run type-check # TypeScript --noEmit
npm run migrate # Apply DB migrations
npm run cleanup # Delete expired pastes (run via cron)AGPL-3.0-or-later β if you fork or host MSK Paste publicly, please share your source code under the same license.
Author: Musiker15 β MSK Scripts
Email: info@msk-scripts.de
Website: www.msk-scripts.de
Issues and feature requests β GitHub Issues