Ztash
GitHub →

Your phone and laptop,
sharing a clipboard.

A self-hosted PWA for moving images, text, links, and JSON between your devices on the same WiFi. Runs on your machine, uses your network, stores nothing in the cloud.

$npx @jjosephgalicio/ztash
Requires Node.js 22.5+. First run prompts for a 4–6 digit PIN.

Why Ztash

Your storage, your network

Files live on your laptop. Traffic stays on your home WiFi. No cloud account, no monthly fee.

Real-time sync

Paste on your phone, it shows up on your laptop in under a second over Server-Sent Events.

Type-aware cards

Images, links, JSON, and plain text each render as their own card. Filter, copy, or download in one tap.

Installable PWA

Add to your phone's home screen and it feels like a native app. Dark theme, mobile-first, ~16 KB JS.

QR onboarding

The startup banner prints a QR code of the phone URL. Scan with your phone camera — no typing 192.168.x.x.

One-shot kill switch

Forgot Ztash is running? npx @jjosephgalicio/ztash --stop from any terminal frees the port.

Get started in 60 seconds

  1. Install Node.js 22.5 or newer if you don't have it.
  2. In a terminal on your laptop, run npx @jjosephgalicio/ztash. Set a 4–6 digit PIN when prompted.
  3. Ztash prints the URLs and a QR code. http://localhost:4123 is for the laptop browser; the QR (or the printed http://192.168.x.x:4123) is for your phone.
  4. On your phone (same WiFi), point the camera at the QR or open the printed URL, enter the PIN, and start sending.
  5. When you're done, Ctrl+C in the terminal stops it. Or from anywhere: npx @jjosephgalicio/ztash --stop.

What's in the box

PIN-gated

Httponly cookie session, constant-time compare, rate-limited login attempts.

SQLite, locally

Items stored in ~/.ztash/ztash.sqlite. Survives restarts. Delete the file to wipe everything.

Open source

MIT licensed. Audit it, fork it, customize it. The whole client is <800 lines of vanilla JS.

No service to break

Nothing to deploy, nothing to pay for, nothing to go offline. Your laptop is the server.

Copied to clipboard