WebVM Discord server Issues This repository hosts the source code for…
- User
User: WebVM Discord server Issues
This repository hosts the source code for https://webvm.io, a Linux virtual machine that runs in your browser.
Try out the new Alpine / Xorg / i3 graphical environment: https://webvm.io/alpine.html
WebVM is a server-less virtual environment running fully client-side in HTML5/WebAssembly. It's designed to be Linux ABI-compatible. It runs an unmodified Debian distribution including many native development toolchains.
WebVM is powered by the CheerpX virtualization engine, and enables safe, sandboxed client-side execution of x86 binaries on any browser. CheerpX includes an x86-to-WebAssembly JIT compiler, a virtual block-based file system, and a Linux syscall emulator.
Enable networking Modern browsers do not provide APIs to directly use TCP or UDP. WebVM provides networking support by integrating with Tailscale, a VPN network that supports WebSockets as a transport layer.
Open the "Networking" panel from the side-bar Click "Connect to Tailscale" from the panel Log in to Tailscale (create an account if you don't have one) Click "Connect" when prompted by Tailscale If you are unfamiliar with Tailscale or would like additional information see WebVM and Tailscale. Fork, deploy, customize deploy_instructions_gif
Fork the repository. Enable Github pages in settings. Click on Settings. Go to the Pages section. Select Github Actions as the source. If you are using a custom domain, ensure Enforce HTTPS is enabled. Run the workflow. Click on Actions. Accept the prompt. This is required only once to enable Actions for your fork. Click on the workflow named Deploy. Click Run workflow and then once more Run workflow in the menu. After a few seconds a new Deploy workflow will start, click on it to see details. After the workflow completes, which takes a few minutes, it will show the URL below the deploy_to_github_pages job.
You can now customize dockerfiles/debian_mini to suit your needs, or make a new Dockerfile from scratch. Use the Path to Dockerfile workflow parameter to select it.
Local deployment From a local git clone
Download the debian_mini Ext2 image from https://github.com/leaningtech/webvm/releases/ You can also build your own by selecting the "Upload GitHub release" workflow option Place the image in the repository root folder Edit config_github_terminal.js Uncomment the default values for CMD, ARGS, ENV and CWD Replace IMAGE_URL with the URL (absolute or relative) for the Ext2 image. For example "/debian_mini_20230519_5022088024.ext2" Build WebVM using npm, output will be placed in the build directory npm install npm run build Start NGINX, it automatically points to the build directory just created nginx -p . -c nginx.conf Visit and enjoy your local WebVM Example customization: Python3 REPL The Deploy workflow takes into account the CMD specified in the Dockerfile. To build a REPL you can simply apply this patch and deploy.
- Assistant
要在 Debian 上原生运行 WebVM 的本地部署,你需要准备环境,使 WebVM 的 x86 虚拟化能力在你的本地系统上正常工作。以下是详细说明,如何在本地获取和运行 WebVM:
环境准备
-
安装 Node.js 和 npm: WebVM 使用 npm 构建和管理依赖项。首先,你需要在 Debian 上安装 Node.js 和 npm。如果系统中尚未安装,可以通过以下命令进行安装:
sudo apt update sudo apt install nodejs npm -
安装 NGINX: WebVM 使用 NGINX 作为服务器来提供它构建的文件,因此,你还需要安装 NGINX:
sudo apt install nginx
获取并构建 WebVM
-
克隆 WebVM 仓库:
首先,在你想要存放项目的目录中克隆 WebVM 仓库:
git clone https://github.com/leaningtech/webvm.git cd webvm -
下载或构建 Ext2 镜像:
你需要一个 Ext2 镜像来提供虚拟机的文件系统。你可以从官方的 GitHub Releases 页面下载 Ext2 镜像文件:
-