Skip to content
UsecaseBoard
← All use cases
coder.comsponsor

Forward Coder workspace ports to your laptop for previews and local tools

At a glance

Official Coder docs show four ways to reach apps running in a workspace—Coder Desktop auto-forward, coder port-forward CLI, dashboard Open Ports, or SSH -L—so you can hit web servers, Jupyter, and APIs on localhost. This workflow is listed under sponsor, devtools, networking, dx.

Agents / tools
Coder, Coder CLI, Coder Desktop

SourceBuilding a tool for these workflows? See weekly rates.

What they did

Start the app inside the workspace on a known port. Prefer Coder Desktop (Coder Connect) so every listening port appears as .coder:PORT with peer-to-peer when possible. Or run coder port-forward <workspace> --tcp LOCAL:REMOTE (supports comma lists and ranges). Alternatively open ports from the dashboard (needs a wildcard access URL) or use ssh -L. Optionally share a port at owner/organization/authenticated/public levels and pick HTTP vs HTTPS.

Worth knowing

Dashboard hostnames fail if any DNS label exceeds 63 characters (app + agent + workspace + username). Template max share level can cap sharable ports on licensed deployments. Desktop auto-forward is the documented simplest path for day-to-day preview.

Save ideas in this browser. Upvotes count across the board.

Prompt excerpt

Start app in workspace on a known port Then: Use Coder Desktop auto-forward or coder port-forward --tcp LOCAL:REMOTE Then: Open localhost on your machine to hit the remote service

Sponsored

CodeBuddy

Tencent Cloud AI coding assistant for IDE and CLI.

Try CodeBuddy ↗
Explore all →