These instructions walk through a basic installation of the Pasteburn application on Linux and will need:
- a modern version of Perl
- sqlite3
- git
cd /opt/
git clone https://github.com/renderorange/pasteburn.git
cd pasteburn
(these instructions assume running on Debian or Ubuntu)
apt-get install cpanminus sqlite3
(again, Debian or Ubuntu)
The Perl dependencies for this project are listed in the cpanfile
within the repo.
cpanm -n Config::Tiny Crypt::Eksblowfish::Bcrypt Crypt::Random Cwd Dancer2 Dancer2::Session::Cookie Data::Structure::Util DBD::SQLite DBI Digest::SHA Encode Getopt::Long HTML::Strip HTTP::Status Moo MooX::ClassAttribute namespace::clean Plack::Builder Plack::Middleware::TrailingSlashKiller Pod::Usage Scalar::Util Session::Storage::Secure strictures Template::Toolkit Time::Piece Try::Tiny
sqlite3 db/pasteburn.sqlite3
sqlite> .databases
sqlite> .q
sqlite3 db/pasteburn.sqlite3 < db/schema/schema.sqlite
An example configuration file, config.ini.example
, is provided in the examples directory.
To set up the configuration file, copy the example into one of the following locations:
$ENV{HOME}/.config/pasteburn/config.ini
/etc/pasteburn/config.ini
After creating the file, edit and update the values accordingly.
NOTE: If the $ENV{HOME}/.config/pasteburn/
directory exists, config.ini
will be loaded from there regardless of a config file in /etc/pasteburn/
.
-
secret
The
secret
section key is required,age
andscrub
option keys within it.[secret] age = 604800 scrub = 1
If
scrub
is set to 1, HTML tags will be removed from the secret string before storing and again as it's retrieved from the database. If set to 0, HTML tags will not be removed from the secret.NOTE: Setting
scrub
to 0 means XSS vulnerabilities will be possible in the textarea box as it's displayed. Disable this setting with caution. -
passphrase
The
passphrase
section key is required, and theallow_blank
option key within it.[passphrase] allow_blank = 0
The allow users to set a blank passphrase, change
allow_blank
to1
. -
cookie
The
cookie
section key is required, andsecret_key
option key within it.[cookie] secret_key = default
Set the
secret_key
value to a complex random string for your installation. -
footer
The
footer
section key is required, andlinks
option key within it.[footer] links = 1
To disable the links in the footer, set the
links
value to0
.
app/development
HTTP::Server::PSGI: Accepting connections at http://0:5000/
^C
The pasteburn.service.example
file within the examples directory contains an example systemd
configuration file.
Create the log file directories on the system, edit the paths and identifiers within the example file, then install and enable through systemd.
Once installed, enable and start the service.
systemctl enable pasteburn
systemctl start pasteburn
It's recommended to run Pasteburn proxy behind a frontend webserver. The apache.conf.example
file within the examples directory contains example ProxyPass
settings for running behind Apache2.
To automatically delete expired secrets after the configured secret age, create a cronjob to run the bin/delete_expired_secrets.pl
script every minute.
* * * * * export PERL5LIB=/opt/pasteburn/lib:$PERL5LIB; cd /opt/pasteburn/ && perl bin/delete_expired_secrets.pl
To allow secrets to persist without an expiration, disable the cronjob to delete expired secrets.