You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/networking/port-forwarding.md
+46-10Lines changed: 46 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -60,18 +60,9 @@ For more examples, see `coder port-forward --help`.
60
60
> name, agent name, workspace name and username exceed 63 characters in the
61
61
> hostname, port forwarding via the dashboard will not work.
62
62
63
-
### From an arbitrary port
64
-
65
-
One way to port forward in the dashboard is to use the "Port forward" button to
66
-
specify an arbitrary port. Coder will also detect if apps inside the workspace
67
-
are listening on ports, and list them below the port input (this is only
68
-
supported on Windows and Linux workspace agents).
69
-
70
-

71
-
72
63
### From an coder_app resource
73
64
74
-
Another way to port forward is to configure a `coder_app` resource in the
65
+
One way to port forward is to configure a `coder_app` resource in the
75
66
workspace's template. This approach shows a visual application icon in the
76
67
dashboard. See the following `coder_app` example for a Node React app and note
77
68
the `subdomain` and `share` settings:
@@ -99,8 +90,53 @@ Valid `share` values include `owner` - private to the user, `authenticated` -
99
90
accessible by any user authenticated to the Coder deployment, and `public` -
100
91
accessible by users outside of the Coder deployment.
101
92
93
+
<!--- TODO: Update this image to match the rest on the page -->
102
94

103
95
96
+
### Accessing workspace ports
97
+
98
+
Another way to port forward in the dashboard is to use the "Open Ports" button to
99
+
specify an arbitrary port. Coder will also detect if apps inside the workspace
100
+
are listening on ports, and list them below the port input (this is only
101
+
supported on Windows and Linux workspace agents).
102
+
103
+

104
+
105
+
#### Sharing ports
106
+
107
+
We allow developers to share ports as URLs, either with other authenticated coder users or publicly. Using the open ports interface, developers can assign a sharing levels that match our `coder_app`’s share option in [Coder terraform provider](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app#share).
108
+
109
+
-`owner` (Default): The implicit sharing level for all listening ports, only visible to the workspace owner
110
+
-`authenticated`: Accessible by other authenticated Coder users on the same deployment.
111
+
-`public`: Accessible by any user with the associated URL.
112
+
113
+
Once a port is shared at either `authenticated` or `public` levels, it will stay pinned in the open ports UI for better accessibility regardless of whether or not it is still accessible.
114
+
115
+

116
+
117
+
This can also be used to change the sharing level of `coder_app`s by entering their port number in the shared ports UI. The `share` attribute of `coder_app`s defined using the terraform provider can be overridden by sharing the port, but is limited by the maximum port sharing level enforced by the template (Enterprise).
118
+
119
+
By default, OSS deployments allow all workspaces to share ports at both the `authenticated` and `public` levels.
120
+
121
+
#### Configure sharing level (enterprise)
122
+
123
+
Enterprise-licensed template admins can control the maximum port sharing level for workspaces under a given template in the template settings. By default, the maximum sharing level is set to `Owner`, meaning port sharing is disabled for end-users.
124
+
125
+

126
+
127
+
#### Configuring port protocol
128
+
129
+
Both listening and shared ports can be configured to use either `HTTP` or `HTTPS` to connect to the port. For listening ports the protocol selector applies to any port you input or select from the menu. Shared ports have protocol configuration for each shared port individually.
130
+
131
+
You can access any port on the workspace and can configure the port protocol manually by appending a `s` to the port in the URL.
0 commit comments