Docker Compose
The relay is published to the GitHub Container Registry as
ghcr.io/mark7888/two-place-paste-server, for linux/amd64 and linux/arm64. You need no clone
and no build — just a docker-compose.yml and a .env.
-
Make a directory and fetch the example settings.
Terminal window mkdir tpp && cd tppcurl -fsSL -o .env https://raw.githubusercontent.com/Mark7888/two-place-paste/master/deploy/.env.example -
Edit
.env. Two values are required:.env TPP_PUBLIC_BASE_URL=https://tpp.example.com # your domain, with https://, no trailing pathADMIN_PASSWORD=pick-a-long-random-passwordEverything else has a sensible default. See Configuration.
-
Create
docker-compose.yml:docker-compose.yml name: tppservices:redis:image: redis:8-alpinerestart: unless-stopped# volatile-lru is not optional: allkeys-lru would silently evict# group records and destroy pairings.command: >-redis-server --appendonly yes --appendfsync everysec--maxmemory 512mb --maxmemory-policy volatile-lru --protected-mode novolumes:- redis-data:/datahealthcheck:test: ["CMD", "redis-cli", "ping"]interval: 10stimeout: 3sretries: 5start_period: 5sserver:image: ghcr.io/mark7888/two-place-paste-server:latestrestart: unless-stoppedenv_file: .envenvironment:TPP_REDIS_ADDR: redis:6379TPP_BLOB_ROOT: /var/lib/tpp/blobsTPP_HTTP_ADDR: ":8080"ports:# Loopback only: the reverse proxy is the one thing that should reach it.- "127.0.0.1:8080:8080"volumes:- blob-data:/var/lib/tpp/blobsuser: "10001:10001"read_only: truesecurity_opt:- no-new-privileges:truecap_drop:- ALLtmpfs:- /tmpdepends_on:redis:condition: service_healthyhealthcheck:test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:8080/healthz"]interval: 30stimeout: 3sretries: 3start_period: 5svolumes:redis-data:blob-data: -
Start it and check it.
Terminal window docker compose up -dcurl -fsS http://127.0.0.1:8080/healthz # → ok -
Put a reverse proxy in front of it — see Reverse proxy. Then open
https://tpp.example.com/admin/and hand out a group.
Image tags
Section titled “Image tags”| Tag | What it is |
|---|---|
latest |
The newest full release. |
1.2.3, 1.2, 1 |
A release, and the newest release of that minor and major version. Kept forever — pin one of these to upgrade only when you choose. |
1.3.0-rc.1 |
A pre-release. Kept forever, never latest. |
beta |
The newest build of the main branch — the server side of the apps’ Beta channel. |
sha-abc1234 |
The build of one commit. Deleted a week after it was built. |
Upgrading
Section titled “Upgrading”docker compose pull && docker compose up -dA restart only drops the WebSocket connections, which clients re-open on their own, and signs you out of the admin page.