code-server: systemd unit won't persist

  • Web Browser: Chrome 81.0.4044.129
  • Local OS: Windows 10 10.0.18363 Build 18363
  • Remote OS: Debian 10
  • code-server --version: 3.3.0 52eeccaba1c20279592d790b053639b5ad8ac99d Note: running behind Apache reverse-proxy

Last night, I re-built my development server and installed Code Server 3.3 using the guide provided (thanks!). Previously, I managed it via a systemd service which launched it on start-up and kept it running – the guide now states to use ‘systemctl --user restart code-server,’ which works fine and launches it when the shell is open, but closes it when I close the shell. Is this behavior by design / is there any guidance for keeping it running?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I think I might have fixed it. Tried a reboot with this and works normally now: sudo loginctl enable-linger username Sorry for all of the the trouble; appreciate the work you guys put into this.

Same behavior with that command. Stays open for as long as the Terminal window is open.

If you run:

systemctl --user enable --now code-server

As mentioned in the guide, it should launch on startup.

restart is only for reloading from the config file.

If that doesn’t work, lmk and I’ll reopen this issue.