Running Code-Server in WSL2
See original GitHub issue- Web Browser: Chrome in Windows 10
- Local OS: Windows 10
- Remote OS: Ubuntu 20.04 and WSL2
- Remote Architecture: NA
code-server --version
: 3.4.1
I’ve tried to install Code-Server using the installation script and had this error:
Failed to connect to bus: No such file or directory
That is related to systemd
and WSL2 (WSL and WSL2 don’t support systemd, the PID 1 is Init).
Then, I’ve tried the Code-Server manual installation and every time I open WSL terminal I have to run:
$ code-server
info Using config file ~/.config/code-server/config.yaml
info Using user-data-dir ~/.local/share/code-server
info code-server 3.4.1 44f7c2724827e526eeaa6c2c151c520f48a61222
info HTTP server listening on http://0.0.0.0:8001
info - Using password from ~/.config/code-server/config.yaml
info - To disable use `--auth none`
info - Not serving HTTPS
Is there any option to start Code-Server when Windows/WSL starts?
Is running Code-Server in Docker inside WSL2 an option?
Any help is welcome. Regards.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Running Code-Server in WSL2 · Issue #1868 - GitHub
# Run this wherever you want the folder created and mapped to. # create a folder in the current directory cd (mkdir -ea...
Read more >Get started using VS Code with WSL - Microsoft Learn
Install VS Code and the WSL extension · Visit the VS Code install page and select the 32 or 64 bit installer. ·...
Read more >Working with Visual Studio Code on Ubuntu on WSL2
The easiest way to access your Ubuntu development environment in WSL is using Visual Studio Code via the built in Remote extension.
Read more >Using WSL 2 with Visual Studio Code
Open WSL either by launching the Windows Terminal and creating a new WSL tab or by launching the Linux distro that you installed....
Read more >VSCode in WSL2-Ubuntu - Medium
How to setup VSCode in Ubuntu 20.04 LTS run with WSL2 on Windows 10. ... Installation of the VS Code Server component in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another FYI – I was playing around last night with WSL2 Docker Containers on Windows.
It’s actually really freaking easy to spin up
code-server
via the container; I’m working on some simple scripting to iron out the edges and should have that ready in a couple days.Turns out that it’s really easy to add an automatic UPNP firewall port mapping, so that it can be exposed past the NAT without having to manually configure the router firewall, and by just mapping the one port thru the host, this gets stupid kinds of simple. I’m crafting a script for this, I’ll be back in a day or two.
I may just roll the whole thing up into an extended docker image with a few parameters.
FYI - I have a quick & dirty write up how I did code-server on WSL2:
https://fearthecowboy.com/tutorial/2020/09/17/Code-Serrver-On-WSL.html