1
0
mirror of https://github.com/taigrr/pastebin synced 2025-01-18 04:03:18 -08:00
2021-04-20 23:20:39 +10:00
2021-04-20 23:20:39 +10:00
2017-07-02 23:42:34 -07:00
2021-04-21 07:25:57 +10:00
2019-04-13 13:50:06 +10:00
2019-07-11 22:42:44 +10:00
2021-04-09 21:41:50 +10:00
2017-07-06 22:42:04 -07:00
2017-07-02 23:57:32 -07:00
2022-06-13 02:25:25 -07:00
2022-06-13 02:25:25 -07:00
2017-07-11 01:03:54 -07:00
2017-07-09 10:18:41 -07:00
2019-07-11 22:26:21 +10:00
2021-04-20 23:20:39 +10:00
2021-04-21 07:25:57 +10:00
2022-06-13 02:35:45 -07:00

pastebin

Build Status CodeCov Go Report Card GoDoc Sourcegraph

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) afterwhich 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 get github.com/prologic/pastebin/...

Usage

Run pastebin:

$ pastebin

Create a paste:

$ echo "Hello World" | pb
http://localhost:8000/92sHUeGPfoFctazBxdEhae

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

Or curl:

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

There is also an included command line utility for convenience:

echo hello | pb

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")

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 generating the UUID(s) for pastes, change this to be your domain name.

The command-line utility by default talk to http://localhost:8000 which can be changed via the -url option or by creating a $HOME/.pastebin.conf configuration file with contents similar to:

$ cat ~/.pastebin.conf
url=https://paste.mydomain.com/

License

MIT

Description
Self hosted web app for storing temporary pastes (Pastebin)
Readme 89 KiB
Languages
Go 76.4%
HTML 13.5%
Shell 5.4%
Dockerfile 2.8%
Makefile 1.9%