@@ -54,15 +54,7 @@ apply):
54
54
55
55
1 . Docker Desktop for Mac ** must** use version [ 2.5.0.1] [ docker-mac-url ] . This
56
56
specific version is required because of a recent downgrade to Linux Kernel
57
- 4.9 due to a [ bug] ( docker-bug-url ) .
58
-
59
- ### Dev URLs
60
-
61
- Currently, the local preview doesn't support [ dev URLs] [ devurl-url ] . Instead,
62
- you can use tools like [ ngrok] [ ngrok-url ] to preview webpages from inside an
63
- workspace.
64
-
65
- We are working on bringing Dev URL support to local previews in later releases.
57
+ 4.9 due to a [ bug] [ docker-bug-url ] .
66
58
67
59
### SSH
68
60
@@ -80,19 +72,19 @@ The local preview option does not work in an air-gapped deployment.
80
72
To install Coder, run:
81
73
82
74
``` console
83
- curl -fsSL https://coder.com/try.sh | PORT="8080 " sh -s --
75
+ curl -fsSL https://coder.com/try.sh | PORT="80 " sh -s --
84
76
```
85
77
86
78
> Note: you can edit the value of ` PORT ` to control where the Coder dashboard
87
- > will be available.
79
+ > will be available. However, dev URLs will only work when ` PORT ` is set to ` 80 ` .
88
80
89
81
When the installation process completes, you'll see the URL and login
90
82
credentials you need to access Coder:
91
83
92
84
``` txt
93
85
You can now access Coder at
94
86
95
- http://localhost:8080
87
+ http://localhost:80
96
88
97
89
You can tear down the deployment with
98
90
@@ -106,6 +98,90 @@ Password: yfu...yu2
106
98
Visit the URL, and log in using the provided credentials. The platform is
107
99
automatically configured for you, so there's no first-time setup to do.
108
100
101
+ ### Dev URLs
102
+
103
+ Coder allows you to access services you're developing in your workspace via [ dev
104
+ URLs] ( ../../workspaces/devurls.md ) . You can enable dev URLs after you've
105
+ installed Coder.
106
+
107
+ > If you do not want to enable dev URLs, you can use SSH port forwarding or
108
+ > tools like [ ngrok] [ ngrok-url ] to preview webpages from inside you workspace.
109
+
110
+ 1 . To use dev URLs, you must have a wildcard subdomain. One option to meet this
111
+ requirement is to use a service such as [ nip.io] [ nip-url ] to route domains to
112
+ a local IP address.
113
+
114
+ 1 . [ Update Coder] ( ../updating.md#update-coder ) with the following Helm values
115
+ added for either your local (` 127.0.0.1 ` ) or private (e.g., ` 192.168.1.x ` )
116
+ address:
117
+
118
+ ``` yaml
119
+ ingress :
120
+ host : " 127.0.0.1.nip.io"
121
+ devurls :
122
+ host : " *.127.0.0.1.nip.io"
123
+ ` ` `
124
+
125
+ Alternatively, you can use [dnsmasq][dnsmasq-url] to create local domains (e.g.,
126
+ ` http://dashboard.coder` and `http://*.coder`). This may be useful if you do not
127
+ want to rely on an external service/network or if your network has DNS rebinding
128
+ protection. Here's how to do this :
129
+
130
+ 1. Install dnsmasq
131
+
132
+ ` ` ` console
133
+ # Mac OS
134
+ brew install dnsmasq
135
+
136
+ # Linux (Ubuntu)
137
+ sudo apt-get install dnsmasq
138
+ ` ` `
139
+
140
+ 1. Create a dnsmasq configuration for the `.coder` domain
141
+
142
+ ` ` ` console
143
+ # Mac OS
144
+ sudo touch $(brew --prefix)/etc/dnsmasq.d/coder.conf
145
+ sudo vim $(brew --prefix)/etc/dnsmasq.d/coder.conf
146
+
147
+ # Linux (Ubuntu)
148
+ sudo touch /etc/dnsmasq.d/coder.conf
149
+ sudo vim /etc/dnsmasq.d/coder.conf
150
+ ` ` `
151
+
152
+ ` ` ` text
153
+ # coder.conf
154
+ address=/coder/127.0.0.1
155
+ ` ` `
156
+
157
+ 1. Add dnsmasq as DNS resolver on your machine
158
+
159
+ ` ` ` console
160
+ # Mac OS: this will only route
161
+ # .coder domains to dnsmasq
162
+ sudo mkdir -p /etc/resolver
163
+ sudo touch /etc/resolver/
164
+ sudo vim /etc/resolver/coder
165
+
166
+ # Linux (Ubuntu)
167
+ # add to top of the file
168
+ sudo vim /etc/resolv.conf
169
+ ` ` `
170
+
171
+ ` ` ` text
172
+ nameserver 127.0.0.1
173
+ ` ` `
174
+
175
+ 1. [Update Coder](../updating#update-coder) with these Helm values added to use
176
+ your new domains :
177
+
178
+ ` ` ` yaml
179
+ ingress:
180
+ host: "dashboard.coder"
181
+ devurls:
182
+ host: "*.coder"
183
+ ` ` `
184
+
109
185
# # Option 2: Docker Desktop
110
186
111
187
[Docker Desktop](docker-desktop-url) includes a standalone Kubernetes server and
@@ -155,7 +231,25 @@ curl -fsSL https://coder.com/try.sh | sh -s -- down
155
231
Because Coder runs inside Docker, you should have nothing left on your machine
156
232
after tear down.
157
233
234
+ If you added a custom DNS to use [dev URLs](#dev-urls), you can
235
+ revert these changes by uninstalling dnsmasq and removing the resolver config :
236
+
237
+ ` ` ` console
238
+ # MacOS
239
+ brew remove dnsmasq
240
+ sudo rm -r /etc/resolver/coder
241
+
242
+ # Linux (Ubuntu)
243
+ sudo apt-get remove dnsmasq
244
+ sudo vim /etc/resolv.conf
245
+ # remove "nameserver 127.0.0.1"
246
+ # and ensure you have another
247
+ # nameserver specified
248
+ # e.g "nameserver 127.0.0.53"
249
+ ` ` `
250
+
158
251
[docker-url] : https://www.docker.com/
252
+ [dnsmasq-url] : https://linux.die.net/man/8/dnsmasq
159
253
[docker-desktop-url] : https://www.docker.com/products/docker-desktop
160
254
[docker-k8s-docs] : https://docs.docker.com/desktop/kubernetes/
161
255
[kind-url] : https://kind.sigs.k8s.io/
@@ -167,3 +261,4 @@ after tear down.
167
261
[docker-bug-url] : https://github.com/docker/for-mac/issues/5044
168
262
[ngrok-url] : https://ngrok.com
169
263
[devurl-url] : https://coder.com/docs/workspaces/devurls
264
+ [nip-url] : https://nip.io
0 commit comments