back to home

leaningtech / webvm

Virtual Machine for the Web

16,441 stars
3,046 forks
12 issues
JavaScriptSvelteCSS

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing leaningtech/webvm in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/leaningtech/webvm)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

WebVM 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. Table of Contents • Fork, deploy, customize • Running WebVM locally with a custom Debian mini disk image • Example customization: Python3 REPL • How to use Claude AI • Bugs and Issues • More links • Thanks to... • Versioning • License 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 WebVM now has access to machines in your own local Tailscale Network! The world wide web If you would like to access the public internet, you will need to set up an Exit Node on one of your _non-WebVM_ tailscale network devices. See the _"Advertise a device as an exit node"_ section of the Tailscale Exit Node quickstart guide for instructions. (The _“Use an exit node”_ section can be skipped, as WebVM automatically uses an available exit node once one is advertised). > [!NOTE] > While we support most network commands there are a few that rely on kernel-level features not available in modern browsers and are therefore not supported, most notably .You could use or for testing instead. (Depending on your network speed, you may need to wait a few moments for the Tailscale Wasm module to be downloaded.) Once that is set up: • Log in with your Tailscale credentials. • Go back to the WebVM tab. • The button in the Networking side-panel should be replaced by your IP address. > [!TIP] > You can also check your connection status by checking the dot colour on the "connect to tailscale" button (which should now show your tailscale IP). On local network connectivity it will be orange, global will be green. Using an authkey As an alternative to manually logging in, you can add your tailscale auth Key at the end of the webvm URL. It is recommended to use an ephemeral key. Selfhosting your tailscale network We also support headscale, a selfhosted open source implementation of the Tailscale control server. Though as headscale unfortunately doesn't support adding CORS headers. You will have to set up a proxy server to add them. Headscales instructions on doing so can be found here. Once ready, add the following line to your block in your nginx config file. To log in to your headscale network add to the webVM url. **Notes:** • If self hosting, replace "https://webvm.io" with your own url. • This is equivelant to the tailscale command line option. • If used with authkey, don't forget to seperate the URL fragments with a inbetween. Fork, deploy, customize • Fork the repository. • Enable Github pages in settings. • Click on . • Go to the section. • Select as the source. • If you are using a custom domain, ensure is enabled. • Run the workflow. • Click on . • Accept the prompt. This is required only once to enable Actions for your fork. • Click on the workflow named . • Click and then once more in the menu. • After a few seconds a new 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 job. You can now customize to suit your needs, or make a new Dockerfile from scratch. Use the workflow parameter to select it. • If you would like to use our full desktop Alpine image, you can find it's dockerfile **here**. • For more information on creating custom images, see our Custom disk Image documentation. Run WebVM locally with a custom Debian mini disk image • Clone the WebVM Repository • Download the Debian mini Ext2 image Run the following command to download the Debian mini Ext2 image: (*You can also build your own disk image by selecting the **"Upload GitHub release"** workflow option*) • Update the configuration file Edit to reference your local disk image: • Replace: With: (*Use an absolute or relative URL pointing to the disk image location.*) • Replace with the correct disk image type: • Build WebVM Run the following commands to install dependencies and build WebVM: The output will be placed in the directory. • Configure Nginx • Create a directory for the disk image: • Modify your file to serve the disk image. Add the following location block: 6, Start Nginx Run the following command to start Nginx: *Nginx will automatically serve the build directory.* • Access WebVM Open a browser and visit: . Enjoy your local WebVM! --- Example customization: Python3 REPL The workflow takes into account the specified in the Dockerfile. To build a REPL you can simply apply this patch and deploy. How to use Claude AI To access Claude AI, you need an API key. Follow these steps to get started: • Create an account • Visit Anthropic Console and sign up with your e-mail. You'll receive a sign in link to the Anthropic Console. • Get your API key • Once logged in, navigate to **Get API keys**. • Purchase the amount of credits you need. After completing the purchase, you'll be able to generate the key through the API console. • Log in with your API key • Navigate to your WebVM and hover over the robot icon. This will show the Claude AI Integration tab. For added convenience, you can click the pin button in…