You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否在共享服务器等无头环境运行LiveShare?部署故障求助

Answers to Your Live Share & code-server Questions

1. Live Share on Shared Servers (No X.org Required)

Yes, Live Share can run on shared servers without an X.org environment. It’s built to work with headless VS Code instances like code-server, relying on web-based communication (HTTP/WebSockets) instead of GUI dependencies. As long as your server has network access and necessary ports are open, you can use it for pair programming.

2. Fixing code-server App Market 500 Error

The lscr.io/linuxserver/code-server:latest image often has compatibility issues with the VS Code Marketplace. Here’s how to resolve this:

  • Use the official code-server image instead: codercom/code-server:latest. This image is maintained by the code-server team and has better marketplace integration.
  • Example Docker run command:
    docker run -d -p 8080:8080 -v "$HOME/.config:/home/coder/.config" -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest
    
  • If marketplace issues persist, set the VSCODE_MARKETPLACE_URL environment variable to the official endpoint when starting the container:
    docker run -d -p 8080:8080 -e VSCODE_MARKETPLACE_URL=https://marketplace.visualstudio.com/_apis/public/gallery -v "$HOME/.config:/home/coder/.config" -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest
    
  • Verify your shared server’s firewall allows outbound connections to marketplace.visualstudio.com on port 443.

3. Official Support for Live Share on Remote Servers

Microsoft officially supports using Live Share with code-server. Once you fix marketplace access:

  1. Open code-server in your browser.
  2. Go to the Extensions tab (Ctrl+Shift+X).
  3. Search for "Live Share" and install the official extension published by Microsoft.
  4. Follow setup prompts to authenticate (GitHub or Microsoft account) and start sharing your workspace.

Note: Ensure your server has ports 54135-54139 open for direct peer-to-peer connections. If direct connections aren’t possible, Live Share will automatically use Microsoft’s relay service to facilitate the session.

内容的提问来源于stack exchange,提问作者d33tah

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 05:12:49