A self-hosted, single-binary pastebin and file-sharing web app written in Rust, with optional encryption and URL shortening.
matze/wastebin
A minimal, self-hosted pastebin written in Rust with axum and SQLite, offering encrypted, expiring and burn-after-reading pastes.
Open-source alternative to:Pastebin
- Stars
- 885
- Forks
- 68
- Open issues
- 28
- Last commit
- 18 days ago
What is it?
wastebin is a self-hosted pastebin for sharing text snippets, logs and code through a browser or an HTTP API. It is built on axum with an SQLite database and ships as a single binary with a small memory footprint. Pastes are compressed with zstd, and syntax highlighting covers more than 170 languages via syntect.
Pastes can be encrypted with ChaCha20Poly1305, using argon2-hashed passwords, and set to expire, to be deleted after the first read, or to be removed by the anonymous owner who created them. Markdown pastes can be rendered as HTML with GitHub-flavored tables, task lists and admonitions, and raw HTML is sanitized with ammonia. The interface offers nine color themes in light and dark modes, and a QR code for opening a paste on a phone.
The project does not include user accounts, admin functions or arbitrary file uploads, and the README advises placing it behind a rate-limiting reverse proxy if exposed to the internet. Configuration is handled through environment variables, and a bundled wastebin-ctl tool can list, purge or delete entries directly in the database.
Key features
- 01Axum and SQLite backend distributed as a single binary
- 02zstd compression and syntax highlighting for over 170 languages
- 03Markdown rendering with tables, task lists and admonitions
- 04ChaCha20Poly1305 encryption with argon2-hashed passwords
- 05Expiration, burn-after-reading and owner-based deletion
- 06Nine color themes in light and dark mode, plus a QR code view
Use cases
- Sharing code snippets or logs with teammates on a private server
- Pasting command output from a terminal via curl or a shell function
- Sending temporary encrypted notes that expire or self-destruct after one read
- Hosting a small internal pastebin with Docker or docker-compose
Quick start
- 1
Install a Rust 2024 toolchain (Rust 1.85 or newer) with rustup
- 2
Build and run the server in release mode with cargo
cargo run --release
Things to know
- It has no user authentication or admin functions, and the README advises against exposing it to the internet without rate limiting or a reverse proxy.
- The default database path is in memory, so pastes are lost on restart unless WASTEBIN_DATABASE_PATH is set.
In collections
Topics
FAQ
- What is wastebin?
- A minimal, self-hosted pastebin written in Rust with axum and SQLite, offering encrypted, expiring and burn-after-reading pastes. wastebin is a self-hosted pastebin for sharing text snippets, logs and code through a browser or an HTTP API. It is built on axum with an SQLite database and ships as a single binary with a small memory footprint. Pastes are compressed with zstd, and syntax highlighting covers more than 170 languages via syntect.
- Is wastebin free to use? What license does it have?
- wastebin is open source under the MIT license. Check the license terms before using it in commercial products.
- Is wastebin still maintained?
- Actively maintained. The last commit to wastebin was on Oct 20, 2026.
- What can I use wastebin for?
- Sharing code snippets or logs with teammates on a private server Pasting command output from a terminal via curl or a shell function Sending temporary encrypted notes that expire or self-destruct after one read Hosting a small internal pastebin with Docker or docker-compose
- How do I install wastebin?
- Install a Rust 2024 toolchain (Rust 1.85 or newer) with rustup Build and run the server in release mode with cargo: cargo run --release
- Where can I get wastebin?
- The source code and installation instructions are on GitHub: https://github.com/matze/wastebin
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A minimalist self-hosted pastebin that encrypts pastes in the browser so the server never sees plaintext.
A self-hostable personal website with notes, moments, works, a bookshelf-style collection, and a voyage log, built on React 19 and Rust (axum + SQLite).
Self-hosted file sharing, pastebin and URL shortener with per-item passwords, expiring share links and a web admin panel.
A self-hostable, end-to-end encrypted pastebin with paste history, one-time deletion, and cross-device transfer.
Self-destructing, end-to-end encrypted pastebin: notes are encrypted in the browser with AES-256-GCM and vanish after one read or 24 hours.