1
0
mirror of https://github.com/taigrr/pastebin synced 2026-04-05 02:42:30 -07:00
Tai Groot 857557b4b4 Update copyright year and fix LICENSE formatting
Updated copyright year and corrected formatting in LICENSE file.
2026-03-09 02:06:47 -04:00
2021-04-09 21:41:50 +10:00
2026-03-09 05:45:03 +00:00
2026-03-09 05:45:03 +00:00

pastebin

Build Status CodeCov Go Report Card GoDoc

pastebin is a self-hosted pastebin web app that lets you create and share "ephemeral" data between devices and users. There is a configurable expiry (TTL) after which the paste expires and is purged. There is also a handy CLI for interacting with the service in a easy way or you can also use curl!

Source

go install github.com/taigrr/pastebin@latest
go install github.com/taigrr/pastebin/cmd/pb@latest

Usage

Run pastebin:

pastebin

Create a paste:

echo "Hello World" | pb
http://localhost:8000/p/92sHUeGPfo

Or use the Web UI: http://localhost:8000/

Or curl:

echo "Hello World" | curl -q -L --form blob='<-' -o - http://localhost:8000/

Configuration

When running the pastebin server there are a few default options you might want to tweak:

$ pastebin --help
  ...
  --expiry duration   expiry time for pastes (default 5m0s)
  --fqdn string      FQDN for public access (default "localhost")
  --bind string       address and port to bind to (default "0.0.0.0:8000")

Setting a custom --expiry lets you change when pastes are automatically expired (the purge time is 2x this value). The --fqdn option is used as a namespace for the service.

The command-line utility by default talks to http://localhost:8000 which can be changed via the --url flag:

pb --url https://paste.mydomain.com/

License

MIT

Description
Self hosted web app for storing temporary pastes (Pastebin)
Readme MIT 196 KiB
Languages
Go 92.3%
HTML 6.1%
Makefile 0.8%
Dockerfile 0.8%