A self-hosted, single-binary pastebin and file-sharing web app written in Rust, with optional encryption and URL shortening.
orhun/rustypaste
A minimal, self-hosted file upload and pastebin service written in Rust, storing files on the local filesystem with no database.
- Stars
- 1,213
- Forks
- 94
- Open issues
- 19
- Last commit
- 3 days ago
What is it?
Rustypaste lets you upload files with curl or a similar HTTP client and get back a short URL to share. It also supports URL shortening and fetching a remote file into the server by URL. Uploads are stored on the filesystem, so no database is needed, and the project is distributed as a single binary plus Docker images.
The service offers optional controls over how files are named and how long they live. Filenames can be random (pet names, alphanumeric strings, or a random suffix), links can expire automatically, and expired files can be deleted on a schedule. One-shot links can be viewed only once, and files can be password-protected with Argon2id-hashed passwords. Auth tokens, a DELETE endpoint protected by delete tokens, and an optional file listing endpoint are available.
Configuration is done through a TOML file that supports hot reloading. MIME types are guessed from extensions and can be overridden or blacklisted, and text-like types are served as plain text to avoid script execution. A custom landing page, such as an HTML upload form, can be configured.
Key features
- 01Uploads via curl or HTTP, returning shareable short URLs
- 02Filesystem storage with no database required
- 03Optional random filenames, auto-expiration and one-shot links
- 04Password-protected files using Argon2id hashing
- 05Basic auth tokens and token-protected DELETE endpoint
- 06MIME type detection with overrides and blacklisting
- 07Hot-reloadable TOML configuration and Docker images
Use cases
- Running a private pastebin or file-sharing server on your own machine or VPS
- Sharing screenshots and short-lived files that should expire automatically
- Sending one-time download links that can only be opened once
- Sharing password-protected files without a third-party service
Quick start
- 1
Install from crates.io with Cargo
cargo install rustypaste - 2
Create a config.toml in the working directory (see the repository's config.toml), then start the server
rustypaste - 3
Upload a file to the running server
curl -F "file=@x.txt" "<server_address>"
Things to know
- Files are stored on the local filesystem with no database, so it suits single-server self-hosting.
In collections
Topics
FAQ
- What is rustypaste?
- A minimal, self-hosted file upload and pastebin service written in Rust, storing files on the local filesystem with no database. Rustypaste lets you upload files with curl or a similar HTTP client and get back a short URL to share. It also supports URL shortening and fetching a remote file into the server by URL. Uploads are stored on the filesystem, so no database is needed, and the project is distributed as a single binary plus Docker images.
- Is rustypaste free to use? What license does it have?
- rustypaste is open source under the MIT license. Check the license terms before using it in commercial products.
- Is rustypaste still maintained?
- Actively maintained. The last commit to rustypaste was on Nov 4, 2026.
- What can I use rustypaste for?
- Running a private pastebin or file-sharing server on your own machine or VPS Sharing screenshots and short-lived files that should expire automatically Sending one-time download links that can only be opened once Sharing password-protected files without a third-party service
- How do I install rustypaste?
- Install from crates.io with Cargo: cargo install rustypaste Create a config.toml in the working directory (see the repository's config.toml), then start the server: rustypaste Upload a file to the running server: curl -F "file=@x.txt" "<server_address>"
- Where can I get rustypaste?
- The source code and installation instructions are on GitHub: https://github.com/orhun/rustypaste
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Self-hosted file sharing, pastebin and URL shortener with per-item passwords, expiring share links and a web admin panel.
A self-hosted file upload server built for ShareX, with sharing, galleries and short links.
Self-hosted file uploader that returns shareable links, with user accounts, albums, snippets, a URL shortener and S3 storage support.
A portable Python file server with resumable uploads and downloads, reachable from any web browser and over WebDAV, SFTP, FTP, TFTP and SMB.
Self-hosted file sharing app where you give each client a private page to sign in and download files you share with them.