Coder Workspace File Transfer
Move large files to (or from) a Coder Cloud Development Environment reliably. The naive
path — rsync -e "coder ssh" — is broken on macOS. Use a coder config-ssh host alias
with a protocol-clean, PTY-free SSH channel instead.
When to use
- Uploading a directory, dataset, build artifact, or binary to a Coder workspace.
rsync -e "coder ssh"fails, desyncs mid-transfer, or hangs.- A copy over
coder sshcorrupts or never completes. - You need a resumable transfer over a flaky dev tunnel.
The one-liner
coder config-ssh # one-time per machine
rsync -avP -e "ssh -T" /local/dir <workspace>.coder:/remote/target/dir/
Instructions
Generate SSH host aliases (one-time per machine/workspace):
coder config-sshThis adds host entries to
~/.ssh/config. Note the alias for your workspace from the output — typically<workspace>.coder(e.g. workspaceLoom→ hostLoom.coder).Confirm you have GNU rsync (macOS ships the incompatible
openrsync):rsync --versionIf it says
openrsync, install GNU rsync:brew install rsyncEnsure the remote target directory exists:
coder ssh <workspace> -- mkdir -p /remote/target/dirTransfer — preferred (resumable):
rsync -avP -e "ssh -T" /local/dir <workspace>.coder:/remote/target/dir/-aarchive,-vverbose,-P=--partial --progress→ resumable.-e "ssh -T"disables PTY allocation — the essential fix.
Transfer — fallback (no resume):
scp -r /local/dir <workspace>.coder:/remote/target/dir/Download (reverse direction) — swap the arguments:
rsync -avP -e "ssh -T" <workspace>.coder:/remote/dir ./local/target/
What NOT to do
- ❌
rsync -e "coder ssh" src host:dst— macOSopenrsyncdesyncs against the remote GNU rsync; even with GNU rsync,coder ssh's PTY corrupts the byte stream. - ❌ Omitting
-e "ssh -T"— the default TTY allocation breaks rsync/tar pipelines. - ❌ Trusting the macOS built-in
rsync— always verifyrsync --versionreports GNU.
Why this works
coder config-ssh turns the Coder tunnel into a standard SSH host. Any TCP-clean SSH
tool (rsync, scp, sftp) then works directly, instead of being wrapped by coder ssh,
which forces a PTY. Removing the PTY (ssh -T) and using GNU rsync's protocol gives a
clean binary channel that survives large, resumable transfers.
Reference
Full write-up with the failure matrix and a concrete Loom example:
docs/coder-large-file-upload.md.