← sources

Spacebin: a lightweight, self-hosted pastebin server in Go (JS-free, encrypted pastes)

source: reddit (reddit:selfhosted)published 2026-11-15 18:51ingested 2026-11-16 02:36

retained text

Hi all,

I wanted to share a project I've been working on for a while: 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 it after hastebin fell into a state of disrepair because 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](https://github.com/lukewhrit/spacebin)
* Public instance to try: [https://spaceb.in](https://spaceb.in)

It's published under Apache [2.0.Feedback](http://2.0.Feedback), bug reports and feature requests are very welcome, and I'm happy to answer questions here.  

document fetched 2026-11-16 00:27 · canonical https://reddit.com/r/selfhosted/comments/1xx3f8c/spacebin_a_lightweight_selfhosted_pastebin_server