Skip to content

Commit 8d4b608

Browse files
sharkymarkEric Paulsen
and
Eric Paulsen
authored
chore: docs: add port-forwarding options (CLI & ssh) (#3394)
* chore: docs: add port-forwarding options * fix: code type Co-authored-by: Eric Paulsen <eric@Erics-MacBook-Air.local>
1 parent 44a826d commit 8d4b608

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

docs/ides.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,10 @@ Connection and connect to your Coder workspace.](./ides/configuring-gateway.md)
7878
## Web IDEs (Jupyter, code-server, JetBrains Projector)
7979

8080
Web IDEs (code-server, JetBrains Projector, VNC, etc.) are defined in the template. See [configuring IDEs](./ides/configuring-web-ides.md).
81+
82+
## Port Forwarding
83+
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).
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Configuring Port Forwarding
2+
3+
There are two ways to forward ports:
4+
5+
- The Coder CLI port-forward command
6+
- SSH
7+
8+
## The Coder CLI and port-forward
9+
10+
For example:
11+
12+
```console
13+
coder port-forward mycoderworkspacename --tcp 8000:8000
14+
```
15+
16+
For more examples, type `coder port-forward --help`
17+
18+
## SSH
19+
20+
Use the Coder CLI to first [configure SSH](../ides.md#ssh-configuration) on your
21+
local machine. Then run `ssh`. For example:
22+
23+
```console
24+
ssh -L 8000:localhost:8000 coder.mycoderworkspacename
25+
```
26+
27+
## Accessing the forwarded port
28+
29+
After completing either Port Forwarding method, open a web browser on your local
30+
machine to access the Coder workspace process.
31+
32+
```console
33+
http://localhost:<yourforwardedport>
34+
```

0 commit comments

Comments
 (0)