进阶 zcode.z.ai 2026-11-25 14:51:22 · 0 阅读
第36章 Remote Development
Core Features
Remote Development
Remote connections let ZCode work inside a target host, a WSL distribution, or a Docker container. Project files, terminal commands, Git operations, and the ZCode Agent run in the target environment, while you choose projects, manage connections, and review results in the desktop app.
Connecting a device and creating a project are two separate steps: connect the device first, then choose folders on that device. A project can group several source folders on the same device; identical paths on different devices are still different locations.
When to Use It
Project code and dependencies are only available on a remote Linux server.
You need the GPU, internal services, databases, or a dedicated toolchain on a remote machine.
You develop on Windows, but the project requires a Linux environment and should run in WSL.
You want to isolate project dependencies in a local Docker container instead of changing the host environment.
The local machine is not suitable for running the project, but you still want the ZCode Agent to develop, debug, and verify it.
Before Connecting
MethodTarget and what to prepareSSHA Linux or macOS host reachable over SSH. Have the host, port, username, and a password or private key ready, or import the settings from your local SSH config.WSLA WSL distribution installed on this machine. The option appears only in the Windows desktop app, where you can choose the distribution and Linux user.DockerDocker is reachable on this machine and the target container is running. Pick it from the list of running containers or enter its name or ID.
Remote hosts can run Linux or macOS on x64 or arm64; the minimum versions are listed below. Native Windows hosts are not supported; for a Linux environment on Windows, use WSL. The target environment also needs whatever dependencies and toolchain your project requires.
Remote OSMinimum requirementUbuntu LTS20.04 or laterDebian10 or laterRHEL / CentOS8 or laterOther Linux distributionsglibc ≥ 2.28, kernel ≥ 4.18macOS (Intel / Apple silicon)macOS 12 Monterey or laterNative Windows, Windows ServerNot supported; connect to WSL insteadmusl-based systems such as Alpine; 32-bit, ARMv7, RISC-V, and other architecturesNot supported
CentOS 7 and Ubuntu 18.04 ship glibc older than 2.28 and are not supported.
The first connection prepares the remote service and the Agent runtime, so you do not need to install Node.js on the remote side beforehand. With the default download method, your machine downloads and transfers the installation resources. That does not mean the remote side can work without a network: model requests, plugin installation, and running the project may still need one.
Add a Device, Then Open a Project
Add a device: open Settings → Remote devices and select New connection. This page maintains your devices and how they connect. When the connection succeeds you return to device management; you are not asked to create a project right away.
Start working on a project: select New project next to Projects in the sidebar. In the Create project window, choose a Device first, then the Source folders. If the device has not been added yet, choose Add remote device… from the Device dropdown; once connected, you return to the project form.
Add a device (Settings → Remote devices)New connectionConnectedBack to device managementNo project is created yetOpen a project (sidebar Projects → New project)Choose deviceNot added yet? Add it from the dropdownChoose source folderCreate projectNew task
1234
1Choose the device2Existing projects on the device: Add to sidebar3Choose source folders4Create project
If the device already has projects, select Already have projects on this device? Add to sidebar and pick the project; there is no need to create it again. Recent projects in the device details under Settings → Remote devices also reopens projects.
Connect with SSH
In New connection, choose SSH.
Enter the Host, Port, and Username. The port defaults to 22. You can also paste a connection string such as developer@dev.example.com:2222 into the host field, and ZCode splits it into the matching fields.
Choose Password or Private key authentication. For a private key, choose the key file, and enter its passphrase if it has one.
If you already have a local SSH config, select Import from SSH config at the top right. Choosing a Host fills in the related fields; editing those fields by hand removes the link to that Host.
Expand Advanced options to choose the resource download method if needed, then select Add and connect. When you start the connection from another entry point, the main button may read Connect.
If the first installation or a version change needs confirmation, read the prompt and continue. Once the device is connected, choose a remote folder through the project entry.
Fill SSH settings1234Import from SSH config56
1Host and port2Password or private key authentication3Resource download method under Advanced options4Add and connect5Open Import from SSH config6Choose a Host to pre-fill the settings
Resource download methodWhen to use itDownload locally, then upload (default)Your machine downloads the runtime resources and transfers them to the target. Use it when the remote side cannot reach the download site directly, or when downloading locally is more reliable.Download on remote serverThe target host downloads the resources itself. It must reach the ZCode CDN and have download, extraction, and checksum tools.
ZCode connects with its built-in SSH client, and SSH config is only used to pre-fill the fields; ProxyJump, ProxyCommand, and other jump-host settings do not apply. To reach a host behind a bastion, set up local port forwarding first (for example ssh -L) and connect to the forwarded port.
Use WSL or Docker
WSL
In the Windows desktop app, choose WSL, then choose the Distribution and Linux user. If you leave them unset, ZCode connects with the system or distribution defaults. The user you specify must already exist in the distribution; file ownership and command permissions follow that user.
Use a regular user for everyday development. Files created as root may not be editable by a regular user later, so avoid connecting as root unless you need to.
Docker
After choosing Docker, switch between Select a running container and Enter a container manually. If the target container is not listed, make sure Docker is running and the container has started (run docker ps in a terminal to check), or enter the container name or ID directly. Once you are in the project, file paths come from inside the container.
1234
1Switch the connection type to Docker2Select a running container, or enter one manually3Enter the container name or ID4Add and connect
Choose Folders and Keep Working Remotely
Choose folder in the project form browses the file system of the target device, not your local files. Enter a path and select Jump, use .. to go up a level, or turn on Show hidden directories. Confirm to add the directory to the project, then select Create project. Choose your actual project directory, for example /home/developer/project.
1234
1Enter a path and jump2Show hidden directories3Go up a level4Choose folder
The screenshot uses an empty demo-project folder under the remote home directory (/home/developer/demo-project); choose your own project directory.
Once the project is open, you can read and write files, use the terminal, review Git changes, and have the ZCode Agent run tasks. Existing tasks keep their original working directory; editing a project's source folders does not move the data of existing tasks. The remote model configuration is managed and distributed by the desktop app, while project code and dependencies stay on the target device.
When your machine is offline: remote tasks are executed by the remote service. If you quit ZCode, put your machine to sleep, or disconnect, tasks still running in the remote service can continue, and you can review the results after reconnecting. Shutting down the remote host, stopping the container, or stopping / restarting the remote service does affect running tasks.
Status, Connection Logs, and Device Maintenance
In Settings → Remote devices, search by device name, address, or project, and expand a device to see its version, recent projects, and recent logs. Project rows also show their connection status. A device being online does not mean the project is ready; opening a project may still involve a short connection step.
StatusWhat to doConnectedOpen projects and continue tasks.Connecting / UpdatingWait for the current step to finish; open the details for progress and logs.Not connectedSelect connect to reuse the saved device configuration.Needs attentionFollow the prompt to install, update the remote side, update the desktop app, provide credentials, or confirm the device identity. The UI may show Installation required or Update required directly.Connection failedRead the error, fix the network, authentication, or target environment, then retry.
The device is connected. Its expanded recent logs show a successful update. There are currently no projects on this device.
The Collapse button at the top right of the connection wizard keeps the current flow and lets the connection continue in the background; reopen it from the progress indicator. In a regular connection flow, closing or canceling abandons the attempt. Once a remote update has started, closing works like collapsing, and the update keeps going. After the upload reaches 100%, extraction, verification, and startup may still be running, so wait until the connection actually succeeds.
The device menu actions have different effects:
ActionResultDisconnectDisconnects this machine; remote tasks keep running.Restart remote serviceRestarts the service on the target device and reconnects. Tasks running on that device are interrupted and do not resume automatically.Stop remote serviceStops the service on the target device and leaves it disconnected. Running tasks are interrupted.Reinstall remote serviceReinstalls the service to match this machine's version and keeps project and task data. Check the task impact shown in the UI before you run it.Remove deviceRemoves all local connections, credentials, and project records for this device. Remote services and data are not affected.
Remote service actions depend on the device state and version; the menu shows what is currently available. To report a connection problem, use the copy, download, or feedback options in the failure details or recent logs, rather than a screenshot of just "Connection failed".
Reconnect automatically at startup reconnects devices that were online in the last 7 days the next time ZCode starts. It is separate from a manual connection in the current session. If you do not want devices to reconnect after restarting the app, turn this option off on the Remote devices page. In the same place, Hide device names in project rows hides remote device names in the task list's project rows; hover to view them.
Push Local Configuration to the Remote
The Agent on the remote side reads the target device's own configuration, so the skills, MCP servers, plugins, and other items installed on your machine are not carried over automatically. Open Settings → Data sync (in the Data and statistics group), find the target device, and select Sync configuration; connect the device first if it is offline. The sync entries in the project menu and on the Skills, MCP, and Plugins pages open the same sync dialog.
123
1Device and connection type2Connected and last sync time3Sync configuration
The dialog opens on Overview, which compares the count and differences of each category between this machine and the remote. Select a category to see its items.
12345
1Category navigation on the left2Target device; check it before pushing3Local and remote counts for each category4Number of changes; select to open the category5Push all
Six kinds of user-level content can be pushed manually: Subagents, Plugins, MCP Servers, Skills, Commands, and Hooks. Model providers are distributed automatically from this machine and are not part of selection or Push all. Automatic sync starts once you open a project on the device; if it fails, check the reason in that category and retry.
Item statusDefault selection and resultPushMissing on the remote; selected by default and added when pushed.UpdateNewer on this machine; selected by default and updates the remote with your local version.DifferenceDifferent content, or newer on the remote; not selected by default. Select it to overwrite the remote with your local version.SyncedIdentical on both sides; nothing to push.Cannot syncCannot be selected; follow the note on the item.
Select the skills to push123Check the result45
1Select the skills to push2Status tag: Push means the item is missing on the remote3Push Skills4Changes to Synced after the push5The sample no longer counts as an item to sync
You can push a single category, or select Push all in the overview to handle everything selected. Items that exist only on the remote are never deleted by a push; if some items fail, each one shows its reason. Keep the device connected while a push is running; you can minimize the sync window and the sync continues, then select the progress entry to restore the window and view the results.
Keep the following in mind:
Sync currently goes one way, this machine → remote. It does not pull from the remote, and it does not sync chats or memory.
MCP environment variables and request headers may contain secrets; push them only to devices you trust.
Sync does not install runtime dependencies; the remote side still needs the commands and environment those items rely on.
To make sure newly pushed skills, MCP servers, plugins, and hooks take effect, start a new task after pushing; existing tasks do not all pick up these changes automatically.
Before editing remote configuration directly, check the scope shown on the settings page, This machine · User or Target device · User / Project, so you do not change the wrong device.
SSH, WSL, and Docker devices all support these sync actions.
FAQ
When should I choose "Download on remote server"?
Choose Download on remote server when the host reaches the ZCode CDN faster than your machine can upload. The host needs curl or wget, tar, and one checksum tool among sha256sum, shasum, and openssl. When the remote side cannot reach the download site, use the default Download locally, then upload.
Do remote connections use the HTTP proxy from Settings?
No. SSH connections and the Web Remote Control channel bypass the HTTP proxy in Settings, which covers outbound requests such as model and MCP traffic; see HTTP proxy scope. If the remote server itself needs a proxy, configure it in the remote shell environment.
Where should I look when a connection fails?
Start with the error under the failed stage and the last ERROR line in the connection log. Common causes include an unreachable SSH host, a wrong port, an incorrect username or password, an incorrect private key passphrase, missing download or extraction tools on the host, and a Docker container that is not running. To report it, use the copy, download, or feedback options in the failure details or recent logs.
Can Remote Control on a phone create a remote connection?
No. Adding SSH, WSL, or Docker connections and managing remote services happen in the desktop app. From the phone you can create projects and choose directories on devices the desktop has already connected; see Remote Control.
Next Steps
Remote ControlSign in with the same account in a mobile browser to view and operate ZCode tasks on your computer.ADE ToolsLearn how tasks, files, terminal, browser context, and the Review panel work together in one development environment.