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
The above script will download the latest release of code-server into
43
+
`~/.local/share/code-server/<version>`. It will symlink the installed release into
44
+
`~/.local/bin/code-server` so you'll need to make sure you have `~/.local/bin` in `$PATH`.
45
+
46
+
### Mac
47
+
48
+
**We are working on this in [#1542](https://github.com/cdr/code-server/issues/1542).**
49
+
50
+
```bash
51
+
brew install code-server
52
+
```
53
+
54
+
## Operation
55
+
56
+
There are several approaches to operating and exposing code-server.
57
+
58
+
Since you can gain access to a terminal from within code-server, never, ever
59
+
expose it directly to the internet without some form of authentication and encryption.
60
+
61
+
By default, code-server will always enable password authentication which will
62
+
require you to copy the password from the code-server output to access it. You
63
+
can set a custom password with $PASSWORD.
64
+
65
+
With all that said, let's go through some secure setups.
66
+
67
+
**note**: You can list the full set of code-server options with `code-server --help`
68
+
69
+
### SSH
70
+
71
+
A very secure and convenient approach is with [sshcode](https://github.com/codercom/sshcode) ([FAQ](https://github.com/cdr/code-server/blob/setup/doc/FAQ.md#sshcode))
72
+
to start code-server on any Linux machine over SSH. We highly recommend this unless you
73
+
need to access code-server from a machine without ssh such as an iPad.
74
+
75
+
### Self Signed
76
+
77
+
This example shows how to run code-server with a self signed certificate.
78
+
You'll get a warning when accessing but if you click through you should be good.
79
+
80
+
```bash
81
+
./code-server --host 0.0.0.0 --cert --port 8080
82
+
```
83
+
84
+
Now, visit `https://<your-server-ip>:8080` to access code-server.
85
+
86
+
**note:** Self signed certificates do not work with iPad and will cause a blank page so check out the Domain section below
87
+
88
+
#### mkcert
89
+
90
+
You can use [mkcert](https://github.com/FiloSottile/mkcert) if you want a self signed
91
+
certificate automatically trusted by your operating system:
92
+
93
+
You'd run `mkcert` locally to generate the certificate:
94
+
95
+
```
96
+
mkcert <server-ip>
97
+
```
98
+
99
+
And then transfer the certificate and key file to your server and run:
0 commit comments