Motion

Reference

Connect flags, environment variables, ports, and bundle layout.

connect.sh flags

curl -fsSL https://motionis.xyz/connect.sh | sh -s -- [flags] <connect-token>
FlagMeaning
(none)Docker install (isolated volume).
--hostNative install (runs on the host, no Docker).
--root <dir>What the IDE/terminal can access. Native default: home dir. Docker default: isolated volume. --root / = whole machine.

Windows uses connect.ps1 with -Token <token> and -Root <path>.

connect.ps1 (Windows)

powershell -c "& ([scriptblock]::Create((irm https://motionis.xyz/connect.ps1))) -Token <token> -Root C:\"

motion.env

The native install stores its config in ~/.motion/motion.env (perms 0600):

KeyMeaning
MOTION_MODEnative or docker.
MOTION_SERVICEsystem, user, or empty (nohup).
MOTION_CONNECT_TOKENThe connect token (keep private).
MOTION_HUBThe hub WebSocket URL.
MOTION_WORKSPACEThe IDE root.
MOTION_STATE_DIRWhere daemon state lives (outside the root).

Bundle layout

A native bundle (motion-core-<os>-<arch>.tar.gz / .zip) contains:

motion-core/
  bin/   motion-daemon · caddy · node
  web/   the web IDE
  agent/ tunnel agent (agent.mjs + deps)
  Caddyfile
  VERSION
  run.sh        # or run.ps1 on Windows

The hub serves them at https://motionis.xyz/dist/motion-core-<os>-<arch>.{tar.gz,zip}, with a sibling .version file the CLI checks for updates.

Ports (native install)

Native installs pick free loopback ports at launch, so there are no fixed ports to remember. motion open prints the IDE URL; the daemon and web server ports are chosen automatically to avoid collisions.