A lightweight, self-hosted pastebin-like service built with Rust for fast and secure text sharing.
![]() |
![]() |
- Syntax highlighting through codemirror
- Rate limiting by IP address
- Note: IPs are saved in the database using SHA256 hashing for added privacy
- Database paste storage encrypted with AES-256
- reCAPTCHA protected upload
Planned:
- Expiry time for pastes
- Password protected pastes
- API support for raw data fetching (Already partially functional)
Note
You can visit /api/docs for OpenAPI documentation and testing of the API endpoints.
Creating new pastes:
- Call
POST /api/pastes/pastewhich accepts these argumentsname: Option<String> | stringpaste: String | stringlanguage: String | stringrecaptchaToken: Option<String> | string | undefined(required only when reCAPTCHA is enabled)
Getting pastes:
- Call
GET /api/pastes/paste/{short_id}which will return this in its contentname: String | stringpaste: String | stringlanguage: String | stringcreatedAt: DateTime<UTC> | Date
- DB_URL - URL string to connect to your database of choice (postgres for best compatibility. other databases may work but are not tested)
- PASTE_ENCRYPTION_KEY - String used to encrypt paste content.
openssl rand -hex 32or equivalents are recommended - RECAPTCHA_SECRET_KEY - optional backend secret key (enables server-side reCAPTCHA verification)
- VITE_RECAPTCHA_SITE_KEY - optional frontend site key (loads and executes reCAPTCHA in the client)
Note
The default port for the backend is 4000 and can be changed here if needed. Remember to also update the vite proxy and docker configuration if you change the port.
This project uses third-party libraries that are licensed under MIT and/or Apache 2.0. These libraries are used as-is, without modification. Please refer to their respective repositories for more details on their licenses.

