Guides · 26 November 2026

How to send a .env file securely to a developer

A .env file holds every credential of a project. How to share it with a teammate or contractor without leaving copies in chats, emails or repos.

Why a .env is the most sensitive file of a project

Database URL, payment keys, mail credentials, cloud tokens: a .env file is the keyring of an application. Sent by Slack or email, it stays in history forever. Committed by mistake, it is copied by every clone and fork, and public repositories are scanned by bots within minutes.

Send it as a one-time link

On Shredkey, paste the content of the file or attach it (up to 1 MB free). It is encrypted in your browser, delivered once, then erased. From a terminal:

curl -fsSL https://shredkey.com/sk.mjs -o sk.mjs
cat .env | node sk.mjs share --ttl 1h

The command prints a link; send it to your teammate. The recipient can also download it straight back into a file:

node sk.mjs get "https://shredkey.com/s/…#…" --to .env

Better: send only what is needed

  • Give a contractor development or test keys, never production ones, unless their job requires it.
  • Prefer one key per person when the service allows it, so you can revoke one without breaking the others.
  • Keep a .env.example in the repository with variable names and no values.

When the work is over

Rotate the keys the contractor had access to. With per-person keys, revoke theirs only.

Let the developer ask for what they need

With “Request a secret”, the developer sends you a link listing what they need; you fill it, they receive it once. If they work with an AI agent, the agent can do it itself through the MCP server and write each value to their .env.

Share a secret now: encrypted in your browser, destroyed after reading.

Create a secret link Connect an AI agent