You can set up a VS Code Server on an Ubuntu server without installing X Windows or any graphical desktop environment. VS Code Server is designed to run in headless mode and serve the VS Code experience through a remote client.
Here’s a high-level overview of how to do it:
Prerequisites
-
Ubuntu Server (no GUI needed)
-
SSH access
Use VS Code Remote Server
If you’re using Visual Studio Code’s official remote development features:
-
Install the Remote – SSH extension on your local VS Code.
-
Connect to your Ubuntu server via SSH from within VS Code.
-
VS Code will automatically install its server component on the remote machine — no GUI required.
This method is seamless and secure.