Skip to content

Chan manual

Devserver

Set up a devserver and connect to its terminals and workspaces from the Computers window.

The devserver runs chan on another machine for remote development. It can also run locally with a separate CHAN_HOME to isolate its state. Chan Desktop connects to the devserver as the client shell; sessions, window layouts, and terminals all live on the devserver.

Pick where to run it:

  • On macOS: a lima-vm, or a remote machine via ssh.
  • On Windows: the native x64 standalone CLI, a WSL sandbox, or a remote machine via ssh.
  • On Linux: an isolated devserver on the same machine (all platforms support CHAN_HOME=/path), a docker container, or a remote machine via ssh.

Install on the host

On macOS, Linux, or FreeBSD, install chan:

$curl -fsSL https://chan.app/install.sh | sh

On native Windows x64, run this from PowerShell:

PS>irm https://chan.app/install.ps1 | iex

The Unix installer writes ~/.local/bin/chan and the symlink cs -> chan. The Windows installer writes chan.exe, cs.cmd, and a Git Bash cs shim under %LOCALAPPDATA%\chan-cli\bin and adds it to your user PATH.

Start the devserver

$~/.local/bin/chan devserver start

In a new native Windows terminal, use chan devserver start.

This installs the devserver as a background service listening on localhost:8787, using the default service manager for your platform:

  • On Linux it uses systemd: a user-scoped service that survives logout once linger is on (chan enables it, or asks you to run sudo loginctl enable-linger).
  • On macOS it uses launchd: the service runs while you are logged in.
  • On Windows it uses chan's own daemon mode, which works on all platforms.
  • You can override the choice with --service=[auto,none,chan,systemd,launchd]. The actions are start, stop, status, restart, and join; --service goes after the action.
  • chan devserver run runs in the foreground.
  • chan devserver ls, connect, disconnect, and forget manage the desktop's connections to remote devservers. A connected devserver's workspaces are managed from a terminal on your desktop too: chan workspace serve /path --on NAME, chan close /path --on NAME, and chan workspace forget /path --on NAME, where NAME is the devserver's label or URL as chan devserver ls shows it and the path is on that machine.

Connect from the main window

Now add the devserver to Chan Desktop:

  1. On the Computers screen, click Add devserver at the bottom.
  2. Fill in Name, Address, and Connect script. Examples:
    • lima-vm from macOS:
      • Address: localhost:8787
      • Script: limactl shell default ~/.local/bin/chan devserver join
    • WSL from Windows:
      • Address: localhost:8787
      • Script: wsl ~/.local/bin/chan devserver join
    • Remote machine via ssh:
      • Address: localhost:9901
      • Script: ssh user@host -L 9901:localhost:8787 ~/.local/bin/chan devserver join
  3. Optionally tick Auto-hide control terminal on success so the terminal running the connect script hides itself once connected.
  4. Click Add devserver, then click Connect on the machine's row.
The Add devserver form. This is a live mock too: fill it in, add, and connect.

Open remote terminals and workspaces

The connected computer card offers New terminal and New workspace. Use these to work on the devserver. Registered workspaces appear beneath that computer; open a workspace window from its row.

Once connected, remote terminals and workspaces behave like local ones: run chan serve {path} in a devserver terminal to create a workspace on that machine, or chan workspace serve {path} --on NAME from a terminal on your desktop. Disconnecting keeps the remote sessions alive and running; reconnect and pick up where you left off.

The clipboard and file transfer work across the connection too: see Copy and paste freely and Download and upload freely on the Terminal page.

On Linux devservers managed by systemd with fdstore support, you can restart the devserver process without losing your shells: the PTY file descriptors are parked in the systemd fdstore while the devserver restarts, then loaded back up, so your agents continue working and your terminals are always alive.