Skip to content

Pastebin - wizzdom

Redbrick currently uses Privatebin as a paste utility accessible at and


The Privatebin instance is deployed with nomad on aperture. Its configuration is available here. Privatebin doesn't support full configuration via environment variables but instead uses a conf.php file. This is passed in using nomad templates.

All sensitive variables are stored in the consul KV store.

The main points are as follows:

  • configure URL shortener (shlink)
urlshortener = "{{ key "privatebin/shlink/api" }}&format=txt&longUrl="
  • enable file upload, set file size limit and enable compression
fileupload = true
sizelimit = 10485760
compression = "zlib"
  • Connect to PostgreSQL database
class = Database
dsn = "pgsql:host=postgres.service.consul;dbname={{ key "privatebin/db/name" }}"
tbl = "privatebin_"     ; table prefix
usr = "{{ key "privatebin/db/user" }}"
pwd = "{{ key "privatebin/db/password" }}"
opt[12] = true    ; PDO::ATTR_PERSISTENT ; use persistent connections - default