Skip to content

Commit 13a2014

Browse files
authored
docs: fix up port-forwarding (coder#3403)
- Improve English - Make new page live in manifest.json - Add icon - Outdent page to root
1 parent 8d4b608 commit 13a2014

File tree

5 files changed

+42
-39
lines changed

5 files changed

+42
-39
lines changed

Diff for: docs/ides.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ Connection and connect to your Coder workspace.](./ides/configuring-gateway.md)
7979

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

82-
## Port Forwarding
82+
## Up next
8383

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

Diff for: docs/ides/configuring-port-forwarding.md

-34
This file was deleted.

Diff for: docs/images/icons/port-forward.svg

+1
Loading

Diff for: docs/manifest.json

+6
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@
9494
}
9595
]
9696
},
97+
{
98+
"title": "Port Forwarding",
99+
"description": "Learn how to forward ports in Coder",
100+
"path": "./port-forwarding.md",
101+
"icon_path": "./images/icons/port-forward.svg"
102+
},
97103
{
98104
"title": "Dotfiles",
99105
"description": "Learn how to personalize your workspace",

Diff for: docs/port-forwarding.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Port Forwarding
2+
3+
Port forwarding lets developers securely access processes on their Coder
4+
workspace from a local machine. A common use case is testing web
5+
applications in a browser.
6+
7+
There are two ways to forward ports in Coder:
8+
9+
- The `coder port-forward` command
10+
- SSH
11+
12+
The `coder port-forward` command is generally more performant.
13+
14+
## coder port-forward
15+
16+
Forward the remote TCP port `8080` to local port `8000` like so:
17+
18+
```console
19+
coder port-forward myworkspace --tcp 8000:8080
20+
```
21+
22+
For more examples, see `coder port-forward --help`.
23+
24+
## SSH
25+
26+
First, [configure SSH](../ides.md#ssh-configuration) on your
27+
local machine. Then, use `ssh` to forward like so:
28+
29+
```console
30+
ssh -L 8080:localhost:8000 coder.myworkspace
31+
```
32+
33+
You can read more on SSH port forwarding [here](https://www.ssh.com/academy/ssh/tunneling/example).

0 commit comments

Comments
 (0)