Skip to content

Run your own server

The relay is the one piece of TwoPlacePaste that runs on a server. Devices keep a WebSocket open to it; it stores encrypted entries for 24 hours and tells the other devices when one arrives. It cannot read anything it stores.

Part What it is What it holds
tpp One static Go binary: the relay (/ws), the admin page (/admin/), group creation and a health check (/healthz). Nothing on its own.
Redis 7 The only database. Groups, devices, public keys, wrapped group keys, creation tokens — and entries up to 256 KB.
Blob store A disk directory or an S3 bucket. Entries larger than 256 KB, at most 24 hours’ worth, and the store items of groups that have one.
  • A Linux host with Docker (or Go 1.26 and a Redis 7 if you prefer to build it yourself).
  • A domain name pointing at the host, for example tpp.example.com.
  • A reverse proxy that terminates TLS — Caddy, nginx, Traefik or similar. The relay speaks plain HTTP and expects TLS in front of it.

It is light: an idle relay uses about 20 MB of memory and Redis under 10 MB. Redis needs room only for the last day of small entries.

Then put a reverse proxy in front of it and hand out a group.

The relay is licensed under the GNU Affero General Public License v3.0 or later (AGPL). Running it, unmodified, for yourself or for other people asks nothing of you.

If you change the relay’s code and let other people use your changed version, the AGPL requires you to offer those people the source code of your version. Configuration through TPP_* variables, your reverse proxy and your Docker setup are not changes to the code.

The admin page and the pairing page carry a Source code link for this. It points at the upstream repository; if you run a modified relay, publish your version and set TPP_SOURCE_URL to it.

The Docker image carries the relay’s licenses and the licenses of every library it is built from in /usr/share/doc/tpp/: LICENSE, LICENSE.MPL-2.0 and THIRD_PARTY_NOTICES.txt.