fen c32566979f
CI / test (pull_request) Successful in 23s
CI / docker (pull_request) Skipped
#260: .swapbtn grid for copy feedback (fix attempt 2)
Label and checkmark stack in one grid cell (inline-grid, grid-area 1/1,
checkmark visibility-hidden until .ok), so the button width is static by
construction across the click. Replaces the min-width pin from fix attempt
1, which enlarged buttons by up to 0.64px (ceil of fractional width) and
leaked the pin after restore.

Applies to paste-view Copy/Link (paste.html + paste.js copyFeedback) and
the /new result-box copy button (new.js). Verified with CDP bounding-box
probes: Copy width/x identical before/during/after at 1400x900 and
375x812 (including the previously failing 52.36px mobile case), Link
button static, checkmark visible during feedback, no minWidth pin set.
2026-09-17 17:18:15 -05:00

Palette

Palette is a fast, self-hosted pastebin. One Go binary, a SQLite database, and a web UI for sharing text and small files.

Note

This project was built by AI — GLM 5.3 Flash on the Hermes Agent harness, with a human in the loop.

Features

  • Text pastes and cans (multiple items in one share)
  • File attachments (one file per paste, up to 25 MB)
  • Password protected pastes
  • Expire after a specified time
  • Burn after a number of views
  • Custom URLs
  • Syntax highlighting with language auto-detection (go-enry)
  • Public paste listing with search, sort and pagination
  • Cookie based saved pastes and settings
  • Five base themes (midnight, smooth, pastel-lavender, pastel-peach, pastel-cloud), each with a dark and light variant
  • Dark mode toggle in the topbar and settings, with a configurable default

Screenshots

Editor in midnight (dark) Paste view in pastel-peach (light)
Paste view in midnight (dark) Settings and theme picker
Public pastes list Editor at mobile width

Mobile previews (375x812): paste view, public list, settings.

Get Started

Docker

docker run -p 8080:8080 -v palette-data:/data git.archfox.org/poslop/palette

The SQLite database lives in the /data volume inside the container.

Docker Compose

See docker-compose.yml for a ready-to-use example with every environment variable documented, including which are required (only the /data volume) and which are optional.

Build from source

Requires Go 1.27+.

go build -o palette ./cmd/palette
./palette
# open http://localhost:8080

Configuration

Setting Default Description
PALETTE_ADDR :8080 Listen address
PALETTE_DB palette.db SQLite database path
PALETTE_MAX_TEXT 5242880 Max paste size in bytes (5 MB)
PALETTE_MAX_ITEM 26214400 Max can item size in bytes (25 MB)
PALETTE_ADMIN_KEY generated Admin key; if unset a 32-char hex key is generated and persisted to <db-dir>/admin-key (0600)
PALETTE_DEFAULT_DARK dark on Default dark mode for new visitors. Set false, 0, or off to default to light mode. Visitors who toggle dark mode keep their choice in their browser.
PALETTE_UNLOCK_SECRET random per start HMAC secret for password-unlock cookies. Set a fixed value to keep unlock sessions across restarts or across replicas.

An /admin page exists for runtime settings, protected by a key set at install (PALETTE_ADMIN_KEY env var) and resettable locally. See API and the design docs in the wiki for details.

API

Full REST API: wiki/API. One example:

curl -X POST http://localhost:8080/api/pastes -d '{"content":"hello"}'

Design docs: wiki/design (e2e encryption, attachments & storage, cookie preferences).

License

Palette is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only). See LICENSE.

The software is provided AS IS, without warranty of any kind, express or implied, including merchantability and fitness for a particular purpose. In no event shall the authors be liable for any claim, damages, or other liability, including without limitation any security vulnerabilities, data loss, or legal issues arising from use of the software. You use it at your own risk.

If you run a modified version of Palette as a network service, the AGPL requires you to offer your modified source code to its users.

S
Description
Fast self-hosted pastebin with small file support
Readme AGPL-3.0
106 MiB
v0.5.1
Latest
2026-09-18 18:50:51 +00:00
Languages
Go 61.1%
HTML 14.4%
JavaScript 13.3%
CSS 11%
Dockerfile 0.2%