Skip to content
Self hosted web app for storing temporary pastes (Pastebin)
Go HTML Shell Dockerfile Makefile
Branch: master
Clone or download
This branch is even with prologic:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client
cmd/pb
scripts
static/css
templates
.drone.yml
.gitignore
Dockerfile
LICENSE
Makefile
README.md
_config.yml
config.go
config_test.go
go.mod
go.sum
main.go
server.go
templates.go
utils.go

README.md

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 -d @- -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

You can’t perform that action at this time.