New — Iris AI drafts your firewall, routing & rate-limit rules. Explore AI features →
Changelog
CLI & MCPSecurity

Deploys leave your secrets out

ngris deploy no longer uploads .env files or files with your ngris login, and follows your .gitignore. Writable file servers need edge protection.

Deploys leave your secrets out

ngris deploy . zipped everything in the folder. A .env with a database password, or a file with your auth token, went up with the site.

Now a deploy leaves them out and says so. Above, Maya deploys the shop's landing page: her .env and .env.local stay on her laptop, and the CLI tells her where those values go instead.

What changed

  • No .env files. .env and .env.* files are never uploaded; .env.example and .env.sample still are. Set those values with ngris env set KEY=VALUE --secret.
  • No login files. Your CLI config, your private key and any file with your auth token or API key are never uploaded. If one of them was ever committed or shared, remove it from the repository and replace that token or key in the dashboard.
  • Your .gitignore counts. Without a .ngrisignore, a deploy follows your .gitignore. If your build output (for example dist/) is gitignored, deploy that folder directly with ngris deploy ./dist, or add a .ngrisignore.
  • A writable file server needs edge protection. ngris webfm --rw, and tunnel.file_server_write: true with ngris http <folder>, start only with --basic-auth user:pass, or --mutual-tls required with --client-ca.
  • No config from the folder you run ngris in. The CLI uses your personal config, or the file you pass with --config, so a downloaded project can't change your account or settings.
  • Your API key only goes to the API. App commands and ngris api send it over https only (localhost aside), and never follow a redirect.
  • Git tokens out of your shell history. ngris apps create … --git-token-stdin < token.txt reads the token from a file instead of the command line.
  • Clean terminal output. What the API, the network or an internet client sent shows with control characters escaped, so it can't change what your terminal shows or add a fake line. Written to a file or a pipe, the output stays exact: ngris env pull > .env gives the real values.

Get started

  1. Update ngris to 0.5.0.
  2. Deploy as before: ngris deploy ./site --app <uuid> lists what it left out.
  3. If you kept settings in a config.yaml in your project folder, run ngris auth --token <your token> once, or add --config ./config.yaml.
  4. Read the docs: App commands and Protect a writable file server.

Read the docs

Ask an AI to summarise this page
Deploy
App hosting Edge functions Domains & certificates
Connect
Secure tunnels API gateway Multi-region edge
Protect
Bot protection & challenge WAF & firewall Edge login
Observe & AI
Monitoring Inspector & replay Iris AI MCP server AI Gateway
Developers
Developer tools Docs ngrok policy converter Blog Changelog
Compare
Ngris vs ngrok Ngris vs Cloudflare Tunnel Ngris vs Vercel Ngris vs Netlify Expose localhost guide
More
Solutions Pricing Enterprise Sign in Get Started Free