Where Does Hastebin Store Config and Pastes?
Haste reads config.js for ports and storage backend. Pastes live in ./data files, Redis, or Postgres per config.
Last updated
Haste centers on config.js: host, port, key length, max paste size, static documents, logging, and the storage block selecting file, Redis, Postgres, memcached, or RethinkDB. File storage (the default) writes pastes under ./data. Docker images take the same values as STORAGE_* style env vars; key generator and documents ride along in env too.
Backups follow the backend: copy ./data for files, dump for databases, nothing for memory. File mode skips expiry entirely, so retention policies need Redis or Postgres. Paste keys derive per config keyLength; changing it mid-life orphans old links. Static documents (about pages) ship beside config and need no backup beyond version control.
Where Hastebin stores this, by platform
config.js (install root)
Ports, key rules, static docs, storage backend block. Docker mirrors values as env. File backend writes ./data; mount it persistently. Changing keyLength orphans old links.
Frequently asked questions
how do i back up hastebin
Copy config.js plus the storage backend contents (./data folder, Redis dump, or Postgres dump) with the app stopped. Pastes without config lose keys and expiry rules; config without pastes serves an empty board.
which hastebin storage backend should i use
Set the storage block to file with a persistent path for simplest ops. Redis adds expiry support file storage lacks; Postgres suits existing estates. Point path at a mounted volume in Docker, never container-ephemeral disk.
Notice an outdated path? Let us know.