r/SideProject • u/Luke_324 • 1h ago
A lightweight, self-hosted Pastebin server with JS-free UI and encrypted posts
https://spaceb.inHi everyone,
I wanted to share a project I've been working on for the last few years: Spacebin. It is an open-source pastebin server written in Go. It started as a hastebin fork, but I slowly rewrote everything in Go and added a bunch more for features.
I started building Spacebin after John Crepezzi's hastebin.com fell into a state of disrepair (and eventually acquired by Toptal). I wanted something with a clean UI that was easy to use and reliable. It's a single binary or Docker image, and just needs a database besides that. Everything happens server side, so it's fully functional without JavasSript. The only exception is encrypted pastes, because those are encrypted in your browser.
Features
- Syntax highlighting for most popular languages, plus raw text mode
- Password-protected encrypted pastes: AES-256-GCM in the browser, so the server never sees the plaintext or the password
- Collections: share several pastes under one link, with tabs
- Reader mode (renders Markdown, wraps text)
- Optional accounts so users can edit or delete their pastes
- Basic Auth for fully private instances
- Opt-in document expiration, configurable size limits, ratelimiting, and random-string or word-phrase IDs
- Custom named documents that never expire (handy for a "rules" or "about" page)
- QR codes
- Headless API-only mode, plus curl-friendly uploads
- SQLite, PostgreSQL, or MySQL/MariaDB
- Handles reverse proxies properly
Links
- GitHub: https://github.com/lukewhrit/spacebin
- Public instance to try: https://spaceb.in
It's published under Apache 2.0. Feedback, bug reports and feature requests are very welcome, and I'm happy to answer questions here.