Home/ Docs/ VM workflow
VM Workflow

Run DraftPilot where the remote files live.

If your paper, code, or experiment logs live on a GPU VM, run DraftPilot there and open its workspace through a local SSH tunnel. The editor and PDF builder use the remote files directly.

Requirements

  1. SSH access from your local machine to the VM.
  2. DraftPilot installed on the VM, either as a binary or source checkout.
  3. The VM can access the paper folder and codebase folder.
  4. Local machine has DraftPilot CLI installed to create the tunnel.

Launch command

draftpilot launch \
  --host user@vm.example.com \
  --name PaperName \
  --paper /remote/path/to/paper \
  --main-tex main.tex \
  --codebase /remote/path/to/codebase \
  --open

Run this command on your laptop. The --paper and --codebase values are paths on the VM, not paths on your laptop. If DraftPilot is a source checkout rather than an installed binary on the VM, add --app-dir /path/to/draftpilot-on-vm.

How it works

Remote serverRuns beside the VM paper and codebase, so file paths are real VM paths.
Local tunnelThe local CLI opens an SSH tunnel and prints a local URL.
Browser/appYou view the UI locally while DraftPilot edits remote files.

Check the remote setup first

Connect to the VM with SSH and confirm that the paper folder, main TeX file, and linked codebase exist there. Each remote machine that compiles a paper also needs a TeX distribution with latexmk and SyncTeX.

ssh user@vm.example.com
ls /remote/path/to/paper/main.tex
ls /remote/path/to/codebase
command -v draftpilot
command -v latexmk

If the workspace opens but the PDF does not build, run draftpilot doctor --paper /remote/path/to/paper on the VM. See troubleshooting for build and SSH checks.

Why CLI is better than desktop for VMs

The desktop app folder picker cannot browse VM-only paths unless they are mounted locally. The CLI can directly tell the VM where the paper and codebase live.