port-forward
coder port-forward
Forward ports from machine to a workspace
coder port-forward <workspace> [flags]
Examples
- Port forward a single TCP port from 1234 in the workspace to port 5678 on
your local machine:
[48;2;235;229;236m [0m[38;2;255;70;113;48;2;235;229;236m$ coder port-forward <workspace> --tcp 5678:1234[0m[48;2;235;229;236m [0m
- Port forward a single UDP port from port 9000 to port 9000 on your local
machine:
[48;2;235;229;236m [0m[38;2;255;70;113;48;2;235;229;236m$ coder port-forward <workspace> --udp 9000[0m[48;2;235;229;236m [0m
- Port forward multiple TCP ports and a UDP port:
[48;2;235;229;236m [0m[38;2;255;70;113;48;2;235;229;236m$ coder port-forward <workspace> --tcp 8080:8080 --tcp 9000:3000 --udp 5353:53[0m[48;2;235;229;236m [0m
- Port forward multiple ports (TCP or UDP) in condensed syntax:
[48;2;235;229;236m [0m[38;2;255;70;113;48;2;235;229;236m$ coder port-forward <workspace> --tcp 8080,9000:3000,9090-9092,10000-10002:10010-10012[0m[48;2;235;229;236m [0m
Options
-h, --help help for port-forward
-p, --tcp stringArray Forward TCP port(s) from the workspace to the local machine.
[38;2;88;88;88mConsumes $CODER_PORT_FORWARD_TCP[0m
--udp stringArray Forward UDP port(s) from the workspace to the local machine. The UDP connection has TCP-like semantics to support stateful UDP protocols.
[38;2;88;88;88mConsumes $CODER_PORT_FORWARD_UDP[0m
Options inherited from parent commands
--global-config coder Path to the global coder config directory.
[38;2;88;88;88mConsumes $CODER_CONFIG_DIR[0m (default "/home/coder/.config/coderv2")
--header stringArray HTTP headers added to all requests. Provide as "Key=Value".
[38;2;88;88;88mConsumes $CODER_HEADER[0m
--no-feature-warning Suppress warnings about unlicensed features.
[38;2;88;88;88mConsumes $CODER_NO_FEATURE_WARNING[0m
--no-version-warning Suppress warning when client and server versions do not match.
[38;2;88;88;88mConsumes $CODER_NO_VERSION_WARNING[0m
--token string Specify an authentication token. For security reasons setting CODER_SESSION_TOKEN is preferred.
[38;2;88;88;88mConsumes $CODER_SESSION_TOKEN[0m
--url string URL to a deployment.
[38;2;88;88;88mConsumes $CODER_URL[0m
-v, --verbose Enable verbose output.
[38;2;88;88;88mConsumes $CODER_VERBOSE[0m
SEE ALSO
- coder -
Auto generated by spf13/cobra on 26-Jan-2023
See an opportunity to improve our docs? Make an edit.