Skip to main content
boxd machine cp copies files in either direction. It works the same from your laptop and from inside a machine, and it does not need SSH keys or any setup. The console has a file browser for the same job, and the SDKs cover directories as well as files.

Upload and download

The side with the NAME: prefix is the machine. Everything else is your local disk.

Where paths land

The path after NAME: follows three rules: A bare relative path is the common case, so boxd machine cp ./notes.md myapp:notes.md puts the file in the home directory.

Whole directories

Add -r. The directory is tarred on the way out and untarred on arrival, so one call moves the whole tree. The destination is the parent to drop the directory into, not the name it gets:
Naming the destination after the directory nests it, so myapp:myproject gives you /home/boxd/myproject/myproject.
Copying from macOS also carries over the ._name AppleDouble files that tar creates for extended attributes. They are harmless, and find . -name '._*' -delete inside the machine clears them.

Piping instead of files

Use - in place of a path to read from stdin or write to stdout:
Piping into machine exec works too, so cat data.json | boxd machine exec myapp -- 'jq .' behaves like a normal shell pipe. For moving bytes into a file, cp - stays the cleaner tool. It skips the shell entirely and verifies the byte count on arrival. To write somewhere root owns, upload to /tmp first and move it with exec:

Between two machines

Every machine has the boxd CLI inside, so a machine can copy straight to another machine you own:
From your laptop there is no direct machine-to-machine copy. Download to your disk first, then upload to the other machine.

Limits

Uploads and downloads have different ceilings:
  • Uploads stream. Copying onto a machine has no practical size limit.
  • Downloads to your laptop move at most 4 MB per cp. A -r directory counts as one download of its tar.
  • From inside a machine, cp downloads at most 1 GB per file.
For anything above the download limit, stream it through exec instead, which has no cap:
And for large public assets, download them inside the machine with curl or git. That uses the machine’s own bandwidth rather than yours.

From the console

Open a machine and pick the Files tab. It is a file browser over the same operations:
  • Browse folders, with a .. row to go up and a path bar to jump anywhere.
  • Upload with the button, or drag files and folders from your desktop onto the table. A dropped folder arrives whole. Drop onto a folder row to upload into that folder instead of the one you are in.
  • Download a file, or a folder as a .tar.gz.
  • Copy, cut, paste, rename, delete from the right-click menu, with the usual shortcuts: Ctrl or Cmd with C, X, V, D for download, F2 to rename, Delete. Click, Shift-click and Ctrl-click select several rows, Ctrl or Cmd with A selects everything, and the arrow keys move the selection.
  • Anything that would overwrite an existing file or folder asks first, and a folder pasted or uploaded over a folder of the same name replaces it rather than nesting inside it.
Transfers show a progress bar with a cancel button. A folder holding more than 5,000 entries is listed up to that many, with a note to use exec for the full listing. The Files tab, the terminal and the desktop follow the machine’s access rule: its owner, and every member of the org when the machine is shared.

From the SDKs

Both SDKs read and write files, and manage directories:
These are what the console’s Files tab uses. The in-VM boxd CLI stays read-only for other machines’ files on purpose.