Zpaste is a self-hosted pastebin for reading Markdown, code and logs, whether a person wrote them or an AI tool generated them. It is built to replace the wastebin instance at https://paste.gentoozh.org and to make long pastes readable there. Editing a paste at the same URL and keeping its version history are planned.
Zpaste is based on wastebin by Matthias Vogelgesang and keeps wastebin's storage, encryption, expiration and burn-after-reading code.
Zpaste is in early development. It is upstream wastebin at commit c0ec968
with three changes so far: the /v1 API; a reading page that the web app in
web/ draws in the browser (GET /<id>[.<ext>], where /md/<id> now
redirects); and the server executable named zpaste, whose log lines name
zpaste as their target. Configuration variables keep the WASTEBIN_ prefix,
and wastebin's HTTP API (POST /, /raw, /dl) keeps working.
Building requires Rust 1.95 or later and a C compiler, because SQLite and
zstd are compiled from source. The server embeds the web app in web/ at
build time, so build that first, with Node.js 22.18 or later and pnpm 11. Run
this in the repository root:
pnpm --dir web install --frozen-lockfile
pnpm --dir web build
cargo build --releaseWithout web/dist, cargo build warns and builds a server whose reading pages
only say that the web app is missing; the tests pass either way.
The build writes the server to target/release/zpaste and the database tool
to target/release/wastebin-ctl.
Start the server with a database file in the current directory:
WASTEBIN_DATABASE_PATH=state.db ./target/release/zpasteThe server listens on 0.0.0.0:8088. Without WASTEBIN_DATABASE_PATH it keeps
pastes in memory and loses them on exit. Open http://127.0.0.1:8088 in a
browser, or create a paste from a shell:
curl -s -H 'Content-Type: application/json' \
--data '{"text": "# Hello", "extension": "md"}' \
http://127.0.0.1:8088/The response names the new paste and an owner token that can delete it:
{"path":"/<id>.md","owner":"<token>"}curl http://127.0.0.1:8088/raw/<id> returns the stored text. The
configuration variables, the rest of the HTTP API and wastebin-ctl are
described in wastebin's README.
The Dockerfile cross-compiles static musl executables and is meant for an x86_64 host. Build the x86_64 image in the repository root:
docker build --target amd64 -t zpaste .The image build builds the web app itself. The image runs /app/zpaste as
user 10001.
cargo test- A reading page that renders Markdown with an outline, and shows code, logs and diffs in views suited to each.
- Editing a paste at the same URL, with version history.
- A versioned HTTP API under
/v1and a command-line client.
The working plan, in Traditional Chinese, is docs/plan.zh-TW.md.
wastebin's README, changelog and contribution guide are kept in docs/upstream for reference. They describe wastebin and will drift from Zpaste.
Zpaste is released under the MIT license. The license keeps Matthias Vogelgesang's copyright for wastebin and adds Zakkaus's copyright for Zpaste.
The Zpaste logo is adapted from the gentoo-zh logo, itself adapted from the Gentoo logo (vector versions copyright Gentoo Foundation and Lennart Andre Rolland), and is licensed under CC BY-SA 2.5, not MIT. Its 中 and 文 seal glyphs are public domain, from Wikimedia Commons. The full attribution chain and the files it covers are in web/src/brand/NOTICE.md.