Code-server: Websocket connection drops if user logged out from ssh

Created on 15 Jul 2020  路  5Comments  路  Source: cdr/code-server

I've installed code-server via sh script as root user. But after closing ssh connection from my mac terminal, on browser web socket connection drops too. Then it turns to 502 error page. After reconnect ssh from terminal and reload web page, 502 goes away and everything returning to normal.

I am not using ssh tuneling. I've nginx reverse proxy front of it. As a workaround, I've created screen session on another vm and connected as root to keep alive ssh connection and keep logged in status of root user.

Why this is happening? Do you guys have any idea? My main use case, turning my ipad to development machine.

Thank you for your help.

Most helpful comment

I had the same issue, for me it was an issue with systemd not starting services at boot under my user.
I fixed it by enabling user lingering for my user.
loginctl enable-linger username
This worked for me on Ubuntu 20.04.

All 5 comments

I had the same issue, for me it was an issue with systemd not starting services at boot under my user.
I fixed it by enabling user lingering for my user.
loginctl enable-linger username
This worked for me on Ubuntu 20.04.

@jinexists This worked very well for me too. Thanks!

Thanks @jinexists !

Lets document this in the FAQ.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nol166 picture nol166  路  3Comments

korzq picture korzq  路  3Comments

pchecinski picture pchecinski  路  3Comments

broady picture broady  路  3Comments

infogulch picture infogulch  路  3Comments