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: doc/guide.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -244,6 +244,25 @@ To avoid the warnings, you can use [mkcert](https://mkcert.dev) to create a self
244
244
trusted by your OS and then pass it into `code-server` via the `cert` and `cert-key` config
245
245
fields.
246
246
247
+
### Nginx reverse proxy
248
+
249
+
If you prefer to use Nginx instead of Caddy, here is a sample config (put e.g. in `/etc/nginx/sites-enabled/code-server`):
250
+
```nginx
251
+
server {
252
+
listen 80 [::]:80;
253
+
server_name your-domain-name-here.com;
254
+
255
+
location / {
256
+
proxy_pass http://127.0.0.1:8080;
257
+
proxy_set_header Host $host;
258
+
proxy_set_header Upgrade $http_upgrade;
259
+
proxy_set_header Connection upgrade;
260
+
proxy_set_header Accept-Encoding gzip;
261
+
}
262
+
}
263
+
```
264
+
It's highly recommended set up a LetsEncrypt certificate and HTTP->HTTPS redirect as well. In order to do this, run `certbot --nginx -d your-domain-name-here.com`.
265
+
247
266
### Change the password?
248
267
249
268
Edit the `password` field in the `code-server` config file at `~/.config/code-server/config.yaml`
0 commit comments