Skip to content
ZeroZero

Remote hosts

Zero runs beside the files. To browse another machine, start it there with --remote, then run the command it prints on your computer. The desktop app opens that machine in a window of its own.

Install Zero on the host

Install the CLI alone on the remote machine; it needs no desktop app (Getting started):

curl -fsSL https://raw.githubusercontent.com/flexdinesh/zero/main/scripts/install.sh | sh -s -- --cli-only

The script needs no sudo and puts zero in ~/.local/bin (or ~/bin). Release archives (zero_<version>_linux_<amd64|arm64>.tar.gz) work too; put zero in ~/.local/bin.

Serve from the host

zero ~/code/foo --remote
  zero 1.4.0
  serving directory:  /home/dee/code/foo

  on your computer, run:
  zero connect 10.0.0.5:7971/<credential>

  stops 10 min after this if nothing connects, and 5 min after the last UI closes. `zero remote stop` stops it now.

It returns to your shell and keeps serving in the background, so you can close the SSH session. It binds every interface unless --host names one, on the first free port from 7971 to 7980 unless --port sets it. It serves every directory Zero already serves on that machine, and prints them all.

Without --remote, zero on a machine with no UI (an SSH session, or Linux without a display) prints a reminder and exits. It never opens a port by itself.

Connect from your computer

zero connect 10.0.0.5:7971/<credential>

The desktop app opens that machine in its own window, with its own tabs and settings. Connect to several machines and each gets a window. Zero saves the connection, so zero://<id>/ links reopen it. --no-open saves it and prints the link instead.

The printed addresses are a guess at what your computer can reach: the address your SSH session reached, then Tailscale addresses (they work from any network), then the rest. If they are wrong, edit the string, or pass --host (a Tailscale MagicDNS name works):

zero connect --host mybox 10.0.0.5:7971/<credential>
ssh -L 7971:localhost:7971 <host>
zero connect --host localhost 10.0.0.5:7971/<credential>

Security

The string is a password: anyone who has it and can reach the port can read the served files. Traffic uses TLS with a certificate pinned by the string, so a machine pretending to be the server is refused, and every request carries the string's token. The string has no expiry. It keeps working across restarts until you replace it:

zero remote rotate    # old strings stop working

Pages from a remote server cannot reach your computer: they get no folder dialog and no Reveal in File Manager, and cannot read another window's data.

When it stops

The server stops 10 minutes after starting if no window or browser connects, and 5 minutes after the last one closes. A hidden or minimized window still counts.

zero remote status    # state, clients, and the string again
zero remote stop      # stop now

--foreground keeps the server in that command's process instead, with no time limits: it stops with the process (Ctrl+C, SIGTERM). Use it in a container or under a service manager:

zero ~/code/foo --remote --foreground

The ghcr.io/flexdinesh/zero image runs it; the README's Docker section has the recipe.

Browser

zero ~/code/foo --remote --web

also prints a web: link. Open it in any browser; it signs in with a cookie and removes the token from the address bar. Browsers warn about the self-signed certificate, because they cannot pin it. That link is a password too.

Notifications

A connection's window notifies you as a local one does (Desktop app), with its own settings. Each notification starts with the connection's label, so you can tell it from one about this computer. If the host goes away, they resume when it returns.

Walkthroughs

Agents on the host publish with zero walkthrough publish (Walkthroughs). While the host serves with --remote, it prints a zero:// link that opens on the connected computer.

Containers

zero attach docker://web/src
  installing zero in docker://web/src
  zero 1.4.0
  attached to:  docker://web/src (zero 1.4.0 on 3f2a9c1b7d4e)
  web:          http://127.0.0.1:7971/

  ctrl-c to stop.

browses /src in the running container web, in your browser. Without a path, it serves the container's working directory. The container needs no shell and no published port, only a writable /tmp: zero copies itself into /tmp/.zero as the container's user, runs there through docker exec, and deletes that copy when you press Ctrl-C. It uses your current Docker context, so remote Docker hosts work too.

zero gets the copy from its image, ghcr.io/flexdinesh/zero, at its own version, for the container's platform (linux amd64 or arm64), so the first attach needs the network. Like zero browser, it serves 127.0.0.1 without authentication; --port and --no-open work the same.