Configuration
There's nothing to configure to get started. This page is for when you want to know what's going on.
Who can get in
By default a request has to pass two checks:
- Your account. The tunnel is private: the Dev Tunnels relay lets through only the GitHub or Microsoft account that ran
coderemote up. - Your phone. The token in the QR code lets a phone enroll. From then on it signs in with its own key, made in its Secure Enclave and never leaving it, and the token alone opens nothing else.
coderemote deviceslists the phones;coderemote devices revokeremoves one.
Everything between the phone and the agent is end-to-end encrypted with the computer's key, which the QR code carries: the relay in between only forwards ciphertext. Opening a terminal, typing into or starting a coding agent and starting a build also ask for Face ID. coderemote devices policy sets how strict that is (never, commands, or commands and changes) and how long one check lasts (5 minutes, 30 minutes or an hour).
With coderemote up --allow-anonymous the first check is skipped. Either way, files and git stay inside the shared folder; a terminal is a real shell with your user's permissions.
A public link to a preview is the one exception: until it ends, anyone with it can open that one dev server, with neither check. It never reaches the agent, its files or its terminal.
Files on your computer
Everything lives in ~/.coderemote (%USERPROFILE%\.coderemote on Windows), readable only by you:
| Path | What it holds |
|---|---|
config.json | The access token, the id of this computer's tunnel and of its preview tunnel. Keeping it keeps every pairing. |
e2e/, lan/ | This computer's end-to-end key and the certificate phones on your network check. Replaced by rotate-token. |
devices/ | The phones enrolled with each shared folder, and its Face ID setting. Emptied by rotate-token. |
bin/ | The Dev Tunnels CLI downloaded on first run. |
agents/ | One entry per running agent, so status, kill and stop can find it. |
update.json | The latest version on npm and when up last asked, at most once a day. |
runtime/ | Only after the install script downloaded Node.js: that Node.js with coderemote installed into it, and in runtime/bin the coderemote and node commands it put on your PATH. |
Deleting the folder (keep runtime/ if the install script made it) resets Code Remote: the next up creates a new token and tunnel, and every device has to pair again.
Environment variables
| Variable | What it does |
|---|---|
CODEREMOTE_DEVTUNNEL | Path to a devtunnel binary to use. Otherwise one on your PATH is used, then the downloaded copy. |
CODEREMOTE_CODE | Path to VS Code's code command, for up --web. Otherwise code on your PATH. |
CODEREMOTE_NO_UPDATE_CHECK | Set to 1 and up no longer asks npm whether there's a newer version. |
The install scripts read a few of their own:
| Variable | What it does |
|---|---|
CODEREMOTE_VERSION | The version or npm dist-tag to install, such as 0.3.7 or next. Default latest. |
CODEREMOTE_PRIVATE_NODE | Set to 1 to download Node.js for coderemote even when yours is new enough. |
CODEREMOTE_NO_MODIFY_PATH | Set to 1 to leave your PATH and shell startup files alone; the script says which folder to add. |
The tunnel
Each computer has one tunnel. Its URL stays the same between runs, and up renews it each time so it doesn't expire. Share one folder at a time; to reach several projects, share their parent folder and the Git tab finds every repository inside it.
The tunnel carries the label coderemote, which is how the app finds your other machines. Previews use a second tunnel, labelled coderemote-preview, created on the first preview and deleted when the agent stops (how it works). coderemote tunnels lists both, with your other computers' tunnels.
A Dev Tunnels account may keep 10 tunnels. Computers you no longer use keep theirs until you delete them with coderemote tunnels delete.
In the app
- Machine Info (a machine's menu) shows its tunnel: the address, the account, who can get in, when it expires (pushed back every time
coderemote upstarts), the clients connected now, traffic so far, and how many ports are being previewed. - Settings › Connections lists the accounts your paired computers connect through. Each shows every computer running coderemote on that account, online or not, whether this iPhone is paired with it, and how many of the account's 10 tunnels are in use. To add a computer, run
coderemote upthere and scan its QR code.
The app only shows them: tunnels belong to the computers' owner, so you list and delete them on a computer signed in to the account, with coderemote tunnels. Touch and hold a machine in Connections to copy its tunnel ID for that. Removing a machine from the app's list only forgets it on that iPhone.
Troubleshooting
"Port 31580 is already in use"
Another agent or program holds the port. coderemote status shows agents; for anything else, see what holds it:
$ lsof -nP -iTCP:31580 -sTCP:LISTEN # macOS, Linux PS> netstat -ano | findstr :31580 # Windows
Stop it, run coderemote stop --all, or pick another port with --port.
The phone can't connect
Check that coderemote up is still running and the computer is awake and online. Make sure the phone signed in with the same account the computer uses (shown on the Access: line).
"Your Dev Tunnels account already has 10 tunnels"
The account is full and none of its tunnels was an idle preview tunnel that could go. The message lists them: delete the ones nothing uses any more, such as an old computer's, with coderemote tunnels delete <id>, then run coderemote up again.
The sign-in expired
up notices and opens the browser again. Without a browser, run coderemote login --device-code.
The Ports tab says "Update coderemote"
The computer runs a coderemote from before ports and previews. Run coderemote update, then restart coderemote up.
A preview says "nothing is listening on port …"
The dev server behind it stopped or restarted on another port. Start it again and reload; the Ports tab shows what's listening now.
Installing on Linux fails
The terminal support compiles on install and needs python3, make and a C++ compiler (build-essential on Debian and Ubuntu). Signing in needs libsecret-1-0.
Still stuck? See Support.