Linux

Where Does Wastebin Store Pastes?

Wastebin keeps pastes in SQLite at WASTEBIN_DATABASE_PATH. Default is memory; persistence needs the env plus a mount.

Last updated

Wastebin configures entirely through WASTEBIN_* env vars: database path, bind address, base URL, cache size. Pastes live in SQLite at WASTEBIN_DATABASE_PATH, defaulting to :memory:. Production means pointing that var at a file on a mounted volume (conventionally /data/state.db) with the dir writable by the container user.

That default is the gotcha the docs warn about: everything works until restart, then every paste vanishes. The scratch-based image ships no shell, so debugging happens through env and mounts, not exec. wastebin-ctl manages the same database file for listing and purging; point it with the same env var or --database flag.

Where Wastebin stores this, by platform

Linux
/data/state.db (WASTEBIN_DATABASE_PATH)

SQLite file with all pastes. Default :memory: loses everything on restart; always set a mounted path in production. Dir must be writable by the container user.

Frequently asked questions

how do i back up wastebin

Copy state.db from the mounted /data dir with the app stopped. Single-file SQLite is the whole backup; no config file exists to pair it with. Env record (port, base URL) documents the setup for restores.

can wastebin run on the default database

Only if you accept total loss on restart. The default :memory: database evaporates with the process, which suits disposable demos and nothing else. Set WASTEBIN_DATABASE_PATH to a mounted file for any real use.

Notice an outdated path? Let us know.