# A file between two machines

> A laptop, a desktop, a code. No server, no account, through the bucket you already have. How to build it with s3nd, what to watch, and the full guide.

Canonical: https://www.s3nd.sh/use-cases/file-between-machines · Markdown: https://www.s3nd.sh/use-cases/file-between-machines.md · Français: https://www.s3nd.sh/fr/use-cases/file-between-machines

A laptop, a desktop, a code. No server, no account, through the bucket you already have.

```sh
$ s3nd put ./contract.pdf
contract.pdf · 284 kB · expires in 1 day
K7QP2M4X

# on the other machine, whenever it is on
$ s3nd get k7qp-2m4x
Wrote /home/you/contract.pdf · 284 kB

$ s3nd rm K7QP2M4X
Burned K7QP2M4X
```

## What is actually going on.
### The problem
You have a file here and need it there. Email chokes on it, a chat app recompresses it and keeps a copy, the USB stick is in another room, and the hosted services want an account.

### What s3nd does about it
Both machines hold credentials for a bucket you own. s3nd put uploads the file and prints a code; s3nd get on the other side downloads it; s3nd rm burns it. The bytes go from one machine to the bucket and from the bucket to the other, and nothing streams through a service in between. The other machine does not have to be on when you send.

## The things that are easy to get wrong.
- **Run doctor first** — It performs the operations s3nd needs and reports what happened, including whether a lifecycle rule will delete expired transfers, the thing nobody discovers until a bill arrives.
- **Every machine holds the keys** — Fine for two or three machines you own. For a team, put a server in front and hand out tokens instead of S3 credentials.
- **Directories travel as archives** — tar cz ./project | s3nd put - --name project.tar.gz. The code goes to stdout and everything else to stderr, so it composes.

Packages: @s3nd/cli. [Without a server, in full](https://doc.s3nd.sh/docs/no-server)
