Skip to content

docs: fix up port-forwarding #3403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions docs/ides.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ Connection and connect to your Coder workspace.](./ides/configuring-gateway.md)

Web IDEs (code-server, JetBrains Projector, VNC, etc.) are defined in the template. See [configuring IDEs](./ides/configuring-web-ides.md).

## Port Forwarding
## Up next

Port Forwarding lets developers securely access processes on their Coder
workspace from a local machine. A common use case is testing front-end
applications in a browser at `http://localhost:<yourforwardedport>` See
[configuring Port Forwarding](./ides/configuring-port-forwarding.md).
- Learn about [Port Forwarding](./port-forwarding.md)
34 changes: 0 additions & 34 deletions docs/ides/configuring-port-forwarding.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/images/icons/port-forward.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@
}
]
},
{
"title": "Port Forwarding",
"description": "Learn how to forward ports in Coder",
"path": "./port-forwarding.md",
"icon_path": "./images/icons/port-forward.svg"
},
{
"title": "Dotfiles",
"description": "Learn how to personalize your workspace",
Expand Down
33 changes: 33 additions & 0 deletions docs/port-forwarding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Port Forwarding

Port forwarding lets developers securely access processes on their Coder
workspace from a local machine. A common use case is testing web
applications in a browser.

There are two ways to forward ports in Coder:

- The `coder port-forward` command
- SSH

The `coder port-forward` command is generally more performant.

## coder port-forward

Forward the remote TCP port `8080` to local port `8000` like so:

```console
coder port-forward myworkspace --tcp 8000:8080
```

For more examples, see `coder port-forward --help`.

## SSH

First, [configure SSH](../ides.md#ssh-configuration) on your
local machine. Then, use `ssh` to forward like so:

```console
ssh -L 8080:localhost:8000 coder.myworkspace
```

You can read more on SSH port forwarding [here](https://www.ssh.com/academy/ssh/tunneling/example).