mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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>
This commit is contained in:
co-authored by
Eric Paulsen
parent
44a826dc06
commit
8d4b6086f6
@@ -0,0 +1,34 @@
|
||||
# Configuring Port Forwarding
|
||||
|
||||
There are two ways to forward ports:
|
||||
|
||||
- The Coder CLI port-forward command
|
||||
- SSH
|
||||
|
||||
## The Coder CLI and port-forward
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
coder port-forward mycoderworkspacename --tcp 8000:8000
|
||||
```
|
||||
|
||||
For more examples, type `coder port-forward --help`
|
||||
|
||||
## SSH
|
||||
|
||||
Use the Coder CLI to first [configure SSH](../ides.md#ssh-configuration) on your
|
||||
local machine. Then run `ssh`. For example:
|
||||
|
||||
```console
|
||||
ssh -L 8000:localhost:8000 coder.mycoderworkspacename
|
||||
```
|
||||
|
||||
## Accessing the forwarded port
|
||||
|
||||
After completing either Port Forwarding method, open a web browser on your local
|
||||
machine to access the Coder workspace process.
|
||||
|
||||
```console
|
||||
http://localhost:<yourforwardedport>
|
||||
```
|
||||
Reference in New Issue
Block a user