17
17
- [ How does code-server decide what workspace or folder to open?] ( #how-does-code-server-decide-what-workspace-or-folder-to-open )
18
18
- [ How do I debug issues with code-server?] ( #how-do-i-debug-issues-with-code-server )
19
19
- [ Heartbeat file] ( #heartbeat-file )
20
+ - [ How does the config file work?] ( #how-does-the-config-file-work )
20
21
- [ Enterprise] ( #enterprise )
21
22
22
23
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -55,7 +56,7 @@ Feel free to file an issue to add a missing extension to the marketplace.
55
56
Defaults to ` ~/.local/share/code-server/extensions ` .
56
57
57
58
If the ` XDG_DATA_HOME ` environment variable is set the data directory will be
58
- ` $XDG_DATA_HOME/code-server/extensions ` .
59
+ ` $XDG_DATA_HOME/code-server/extensions ` . In general we try to follow the XDG directory spec.
59
60
60
61
You can install an extension on the CLI with:
61
62
@@ -184,9 +185,8 @@ code-server --log debug
184
185
Once this is done, replicate the issue you're having then collect logging
185
186
information from the following places:
186
187
187
- 1 . stdout.
188
- 2 . The most recently created directory in the ` logs ` directory (found in the
189
- data directory; see below for how to find that).
188
+ 1 . stdout
189
+ 2 . The most recently created directory in the ` ~/.local/share/code-server/logs ` directory
190
190
3 . The browser console and network tabs.
191
191
192
192
Additionally, collecting core dumps (you may need to enable them first) if
@@ -198,11 +198,31 @@ code-server crashes can be helpful.
198
198
as there is an active browser connection.
199
199
200
200
If you want to shutdown ` code-server ` if there hasn't been an active connection in X minutes
201
- you can do so by continously checking the last modified time on the heartbeat file and if it is
201
+ you can do so by continuously checking the last modified time on the heartbeat file and if it is
202
202
older than X minutes, you should kill ` code-server ` .
203
203
204
204
[ #1636 ] ( https://github.com/cdr/code-server/issues/1636 ) will make the experience here better.
205
205
206
+ ## How does the config file work?
207
+
208
+ When ` code-server ` starts up, it creates a default config file in ` ~/.config/code-server/config.yaml ` that looks
209
+ like this:
210
+
211
+ ``` yaml
212
+ bind-addr : 127.0.0.1:8080
213
+ auth : password
214
+ password : mewkmdasosafuio3422 # This is randomly generated for each config.yaml
215
+ cert : false
216
+ ` ` `
217
+
218
+ Each key in the file maps directly to a ` code-server` flag. Run `code-server --help` to see
219
+ a listing of all the flags.
220
+
221
+ The default config here says to listen on the loopback IP port 8080, enable password authorization
222
+ and no TLS. Any flags passed to `code-server` will take priority over the config file.
223
+
224
+ The `--config` flag or `$CODE_SERVER_CONFIG` can be used to change the config file's location.
225
+
206
226
# # Enterprise
207
227
208
228
Visit [our enterprise page](https://coder.com) for more information about our
0 commit comments