🔥 Lightweight, self-hosted paste server for Forge Panel — zero dependencies, hastebin-compatible API
|
Some checks failed
SonarQube Scan / sonarqube (push) Has been cancelled
|
||
|---|---|---|
| .forgejo/workflows | ||
| forge-paste.py | ||
| forge-paste.service | ||
| README.md | ||
🔥 Forge Paste
A lightweight, self-hosted paste server with a clean UI. Hastebin-compatible API.
Zero dependencies — runs on Python 3.10+ with the standard library only. Uses SQLite for storage.
Quick Install
# Clone
git clone https://github.com/everestmcarthur/forge-paste.git /opt/forge-paste
# Create data directory
sudo mkdir -p /var/lib/forge-paste
sudo chown www-data:www-data /var/lib/forge-paste
# Install systemd service
sudo cp /opt/forge-paste/forge-paste.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now forge-paste
API
# Create a paste
curl -X POST -d "your text here" https://logs.yourdomain.com/api/paste
# → {"key": "abc123", "url": "https://logs.yourdomain.com/abc123"}
# Hastebin-compatible
curl -X POST -d "your text" https://logs.yourdomain.com/api/documents
# → {"key": "abc123"}
# Get raw text
curl https://logs.yourdomain.com/api/raw/abc123
# Get JSON
curl https://logs.yourdomain.com/api/documents/abc123
# → {"key": "abc123", "data": "your text"}
Wings/Spark Integration
Upload diagnostics directly:
sudo spark diagnostics --hastebin-url=https://logs.yourdomain.com
Upload logs via curl:
tail -n 300 /var/www/forge/storage/logs/laravel-$(date +%F).log | curl -X POST --data-binary @- https://logs.yourdomain.com/api/paste
Caddy Reverse Proxy
logs.yourdomain.com {
reverse_proxy 127.0.0.1:7890
}
Configuration
| Env / Flag | Default | Description |
|---|---|---|
FORGE_PASTE_PORT / --port |
7890 | Listen port |
FORGE_PASTE_HOST / --host |
127.0.0.1 | Listen address |
FORGE_PASTE_DB / --db |
/var/lib/forge-paste/pastes.db | SQLite database path |
License
MIT