pastesite.com New paste

Share config files without the credentials

By · Guide · updated October 2026 · 3 min read

Config files are where secrets live, and config bugs are exactly the kind of thing you need a second pair of eyes on. That tension is why the routine below exists: you keep the structure, the keys and the ordering, and replace only the values that would hurt.

The 60-second redaction pass

  1. Copy the file to a scratch copy. Never edit the original in place.
  2. Replace every value on a line whose key suggests a secret: TOKEN, KEY, SECRET, PASSWORD, PASS, CREDENTIAL, DSN, CONNECTION.
  3. Replace hostnames and IPs with placeholders, keeping the shape: db.prod.internal → db.example.internal.
  4. Check for secrets hiding in unusual places: URLs with basic auth, query strings with keys, comments left by a previous engineer.
  5. Paste, then read the paste once more on the page before sending the link.

Audit an .env file by key name

# list likely-secret lines in an env file (shows keys, not values)
grep -nE '^[A-Z0-9_]*(KEY|TOKEN|SECRET|PASSWORD|PASS|DSN|CREDENTIAL)[A-Z0-9_]*=' .env | cut -d= -f1

What each format tends to leak

FileUsual leakSafe to share as
.envReal values for every keyKeys with REDACTED values
docker-compose.ymlRegistry creds, DB passwords in environment:Structure plus ${VAR} references
nginx.confUpstream hostnames, TLS key paths, basic-auth file pathsPaths replaced with /etc/ssl/example.pem
SSH configReal hostnames, usernames, identity file paths, jump hostsHost aliases and User example
CI configTokens in env:, deploy targets, account idsSecret names, never values
Terraform variablesAccount ids, ARNs, default passwordsVariable names and types

Why placeholders beat deletion

Deleting a line changes the file's structure, and the bug you are asking about may depend on the line you removed. Replace the value instead: DATABASE_URL=postgres://user:REDACTED@db.example.internal:5432/app still shows the scheme, the driver, the port and the database name — enough to spot a typo — while hiding the credential. Keep indentation and key order too; YAML and compose files are order-sensitive in ways that matter.

Settings for config pastes

And if a real secret did get out — even briefly — rotate it. A link that existed for two minutes was still readable by anything that fetched it.

Frequently asked questions

Is it ever safe to paste a real .env file?

No. Replace values with placeholders. If the reader needs to reproduce the bug, give them the key names and the shape of each value, not the value.

Are pastes encrypted?

Not by default. Traffic is HTTPS and the database encrypts data at rest, but a normal paste is stored as readable text and the site can technically read it, so do not treat one as a vault. Encrypt in this browser changes that: the text is encrypted with AES-256-GCM in the browser and the key stays in the link fragment, so the server stores the text as ciphertext only; the optional title and metadata remain visible. That mode is unlisted-only and cannot be edited or recovered if the link is lost.

Can I delete a config paste later?

If you created it while signed in, yes. Anonymous pastes cannot be deleted by their author, so use an expiry or burn-after-read for those.

What if I already pasted a production secret?

Rotate the credential first, then delete the paste. Rotation is the only step that actually revokes access; deleting the link just makes it harder to find.