# Deployment guides

SnitchWallet works anywhere an intruder might find a secret. These guides give the exact commands for every common setup, from a single server to Kubernetes, AWS, CI pipelines and AI agents.

## Pick a pattern

There are two ways to place a canary, and most setups use both.

| Pattern | Use it for | How it works |
|---|---|---|
| **One canary per machine** | Servers, VMs and laptops that you keep for days or more | Run the installer on each machine at first boot. It writes a decoy file there, and the alert names the machine. |
| **One canary per role** | Containers, autoscaling groups, serverless functions and CI runners | Create one canary on your own computer and store it with the role's real secrets. Every replica inherits it, so nothing needs funding or recovering as replicas come and go. The alert names the role. |

A rule of thumb: if you'd replace a machine rather than fix it, use one canary per role.

## Every guide

| Setup | Pattern | Guide |
|---|---|---|
| Linux servers and VMs, by hand | Per machine | [Servers and VMs](/docs/servers) |
| cloud-init and Terraform | Per machine | [Servers and VMs](/docs/servers#cloud-init-and-terraform) |
| Ansible, Chef, Puppet and Salt | Per machine | [Servers and VMs](/docs/servers#ansible-chef-puppet-and-salt) |
| AWS: EC2, Auto Scaling, ECS, Fargate and Lambda | Both | [AWS](/docs/aws) |
| Kubernetes, including Sealed Secrets and External Secrets | Per role | [Kubernetes](/docs/kubernetes) |
| Docker, Compose and Swarm | Per role | [Docker](/docs/docker) |
| GitHub Actions, GitLab CI and other CI | Per role | [CI pipelines](/docs/ci) |
| Fly.io, Vercel, Heroku, Render and Railway | Per role | [Platforms](/docs/platforms) |
| Google Cloud and Azure | Both | [Google Cloud and Azure](/docs/gcp-azure) |
| Vault, Doppler, 1Password and Infisical | Per role | [Secret managers](/docs/secret-managers) |
| CloudWatch Logs, Datadog and syslog | Per role | [Logs](/docs/logs) |
| Developer laptops and AI agents | Per machine | [Laptops and AI agents](/docs/laptops-and-agents) |
| Alerts into Amazon SNS and CloudWatch alarms | | [AWS](/docs/aws#send-alerts-to-amazon-sns) |

## The two commands

One canary per machine, run on the machine:

```sh
curl -fsSL https://get.snitchwallet.com | sh
```

It prints a link. Approve the machine in your browser, then fund the address it prints. For automation, create an auth key in the dashboard (**Keys**, then **Auth keys for unattended installs**) and pass it instead of approving:

```sh
curl -fsSL https://get.snitchwallet.com | sh -s -- --authkey-file /path/to/key
```

One canary per role, run on your own computer and piped into the role's secret store:

```sh
curl -fsSL https://get.snitchwallet.com | sh -s -- --decoy env:- --name live-api | your-secret-store-command
```

`--decoy env:-` sends the decoy down the pipe as two `KEY=value` lines instead of writing a file. `--decoy json:-` sends one JSON object instead, for stores that keep a secret as JSON. Everything else, including the approval link and the address to fund, goes to your terminal on stderr.

## Things that apply everywhere

- **Name it for the alert.** `--name` is what the alert says was breached, so name the environment and role: `live-api`, `staging-workers`, `github-ci`. It defaults to the machine's hostname, and it's required with `env:-` and `json:-`, where that would be your own computer's name. Use letters, digits, `.`, `-` and `_`.
- **Fund each canary once.** Every command prints a bitcoin address. Send about $10–25 to it. The canary arms as soon as the payment is broadcast.
- **Never bake a canary into an image.** Run per-machine installs at first boot, never in an image or container build, or every copy shares one key and the alert can't tell you which one leaked.
- **The key never appears on your screen.** The installer refuses to print a decoy to a terminal, and prints nothing if registering the canary fails.
- **Auth keys can only add canaries.** They can't list, reveal or remove them, so they're safe in user-data, CI and config management. Give each one only the uses it needs and a short expiry.
- **Write $HOME, not ~, in decoy paths.** The shell doesn't expand `~` after `env:`, so write `--decoy "env:$HOME/.config/app/.env"`.
- **Taking the bait back.** In the dashboard, retire the canary and enter the address to send the bait to. Then move the coins there with any wallet, using the key from wherever you stored it. Only a payment to that address counts as you; anything else still fires an alert.
- **Tell your team.** Anyone who moves the coins sets off the alert, including a curious colleague.
