{"id":15406807,"url":"https://github.com/dannyben/webvm","last_synced_at":"2025-03-01T12:33:13.195Z","repository":{"id":249053975,"uuid":"830478891","full_name":"DannyBen/webvm","owner":"DannyBen","description":"WebVM","archived":false,"fork":false,"pushed_at":"2024-07-18T12:12:07.000Z","size":1684,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T23:46:19.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dannyben.github.io/webvm/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DannyBen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-18T10:58:40.000Z","updated_at":"2024-07-18T18:59:39.000Z","dependencies_parsed_at":"2024-11-03T07:01:56.076Z","dependency_job_id":null,"html_url":"https://github.com/DannyBen/webvm","commit_stats":null,"previous_names":["dannyben/webvm"],"tags_count":0,"template":false,"template_full_name":"leaningtech/webvm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fwebvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fwebvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fwebvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fwebvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DannyBen","download_url":"https://codeload.github.com/DannyBen/webvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241367931,"owners_count":19951444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:25:29.014Z","updated_at":"2025-03-01T12:33:12.873Z","avatar_url":"https://github.com/DannyBen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebVM\n\n[![Discord server](https://img.shields.io/discord/988743885121548329?color=%235865F2\u0026logo=discord\u0026logoColor=%23fff)](https://discord.gg/yWRr2YnD9c)\n[![Issues](https://img.shields.io/github/issues/leaningtech/webvm)](https://github.com/leaningtech/webvm/issues)\n\nThis repository hosts the source code for [https://webvm.io](https://webvm.io), a Linux virtual machine that runs in your browser.\n\n\u003cimg src=\"assets/welcome_to_WebVM_slim.png\" width=\"95%\"\u003e\n\nWebVM 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.\n\nWebVM 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. \n\n# Enable networking\n\n- Click \"Connect via Tailscale\" in the page header.\n- Log in to Tailscale (create an account if you don't have one).\n- If you are unfamiliar with Tailscale or would like additional information see [WebVM and Tailscale](/docs/Tailscale.md).\n\n# Fork, deploy, customize\n\n\u003cimg src=\"/assets/fork_deploy_instructions.gif\" alt=\"deploy_instructions_gif\" width=\"90%\"\u003e\n\n- Fork the repository.\n- Enable Github pages in settings.\n\t- Click on `Settings`.\n\t- Go to the `Pages` section.\n\t- Select `Github Actions` as the source.\n        - If you are using a custom domain, ensure `Enforce HTTPS` is enabled. \n- Run the workflow.\n\t- Click on `Actions`.\n\t- Accept the prompt. This is required only once to enable Actions for your fork.\n\t- Click on the workflow named `Deploy`.\n\t- Click `Run workflow` and then once more `Run workflow` in the menu.\n- After a few seconds a new `Deploy` workflow will start, click on it to see details.\n- After the workflow completes, which takes a few minutes, it will show the URL below the `deploy_to_github_pages` job.\n\n\u003cimg src=\"/assets/result.png\" width=\"70%\" \u003e\n\nYou can now customize `dockerfiles/debian_mini` to suits your needs, or make a new Dockerfile from scratch. Use the `Path to Dockerfile` workflow parameter to select it.\n\n# Local deployment\n\nFrom a local `git clone`\n\n- Download the `debian_mini` Ext2 image from [https://github.com/leaningtech/webvm/releases/](https://github.com/leaningtech/webvm/releases/).\n\t- You can also build your own by selecting the \"Upload GitHub release\" workflow option.\n\t- Place the image in the repository root folder.\n- Edit `index.html`.\n\t- Uncomment the default values for `CMD`, `ARGS`, `ENV` and `CWD`.\n\t- Replace `DEVICE_TYPE` with `\"bytes\"`.\n\t- Replace `IMAGE_URL` with the name of the Ext2 image. For example `\"debian_mini_20230519_5022088024.ext2\"`.\n- Start a local HTTP server.\n- Enjoy your local WebVM.\n\n# Example customization: Python3 REPL\n\nThe `Deploy` workflow takes into account the `CMD` specified in the Dockerfile. To build a REPL you can simply apply this patch and deploy.\n\n```diff\ndiff --git a/dockerfiles/debian_mini b/dockerfiles/debian_mini\nindex 2878332..1f3103a 100644\n--- a/dockerfiles/debian_mini\n+++ b/dockerfiles/debian_mini\n@@ -15,4 +15,4 @@ WORKDIR /home/user/\n # We set env, as this gets extracted by Webvm. This is optional.\n ENV HOME=\"/home/user\" TERM=\"xterm\" USER=\"user\" SHELL=\"/bin/bash\" EDITOR=\"vim\" LANG=\"en_US.UTF-8\" LC_ALL=\"C\"\n RUN echo 'root:password' | chpasswd\n-CMD [ \"/bin/bash\" ]\n+CMD [ \"/usr/bin/python3\" ]\n```\n\n# Bugs and Issues\n\nPlease use [Issues](https://github.com/leaningtech/webvm/issues) to report any bug.\nOr come to say hello / share your feedback on [Discord](https://discord.gg/yTNZgySKGa).\n\n# More links\n\n- [WebVM: server-less x86 virtual machines in the browser](https://leaningtech.com/webvm-server-less-x86-virtual-machines-in-the-browser/)\n- [WebVM: Linux Virtualization in WebAssembly with Full Networking via Tailscale](https://leaningtech.com/webvm-virtual-machine-with-networking-via-tailscale/)\n- [Mini.WebVM: Your own Linux box from Dockerfile, virtualized in the browser via WebAssembly](https://leaningtech.com/mini-webvm-your-linux-box-from-dockerfile-via-wasm/)\n- Reference GitHub Pages deployment: [Mini.WebVM](https://mini.webvm.io)\n- [Crafting the Impossible: X86 Virtualization in the Browser with WebAssembly](https://www.youtube.com/watch?v=VqrbVycTXmw) Talk at JsNation 2022\n\n# Thanks to... \nThis project depends on:\n- [CheerpX](https://labs.leaningtech.com/cheerpx), made by [Leaning Technologies](https://leaningtech.com) for x86 virtualization and Linux emulation\n- xterm.js, [https://xtermjs.org/](https://xtermjs.org/), for providing the Web-based terminal emulator\n- [Tailscale](https://tailscale.com/), for the networking component\n- [lwIP](https://savannah.nongnu.org/projects/lwip/), for the TCP/IP stack, compiled for the Web via [Cheerp](https://github.com/leaningtech/cheerp-meta)\n\n# Versioning\n\nWebVM depends on the CheerpX x86-to-WebAssembly virtualization technology. A link to the current latest build is always available at [https://cheerpxdemos.leaningtech.com/publicdeploy/LATEST.txt](https://cheerpxdemos.leaningtech.com/publicdeploy/LATEST.txt). Builds of CheerpX are immutable and uniquely versioned. An example link would be:\n\n`https://cheerpxdemos.leaningtech.com/publicdeploy/20230517_94/cx.js`\n\nWe strongly encourage users _not_ to use the latest build. Please directly use a specific build to avoid unexpected regressions. Since builds are immutable, if they work for you now they will keep working forever.\n\n# License\n\nWebVM is released under the Apache License, Version 2.0.\n\nYou are welcome to use, modify, and redistribute the contents of this repository.\n\nThe public CheerpX deployment is provided **as-is** and is **free to use** for technological exploration, testing and non-commercial uses. Downloading a CheerpX build for the purpose of hosting it elsewhere is not permitted.\n\nIf you want to build a product on top of CheerpX/WebVM, please get in touch: sales@leaningtech.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Fwebvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannyben%2Fwebvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Fwebvm/lists"}